If you're viewing the offline pdf documentation, view the latest online documentation HEREarrow-up-right.

The Ultimate Gas Giant Rendering System

This asset is designed to work in Unity 2021 LTS, Unity 2022 LTS, Unity 2023, and Unity 6, with the Built-In Render Pipeline, URP, and HDRP.

This asset includes a volumetric atmosphere and cloud system, and a fluid simulation system. All example scenes are in the "Plugins/CW/Gas Giant Forge/Scenes" folder. These show you what fully configured gas giants look like.

Fly From Space
Through The Rings
Through The Gas Giant
Realtime Fluid Simulation

Required Packages

triangle-exclamation
chevron-rightPackage Installation Guidehashtag

Open: Window / Package Manager

Install Package: Burst

Install Package: Mathematics

Install Package: Collections

Done!

circle-exclamation

This means you're using an outdated version of the Collections package.

In Unity 2021 (and possibly other versions), the Package Manager states that Collections 1.2.4 is the latest version you can install, but this is incorrect. To update to the latest version and fix this error, you must manually open the YourProjectFolder/Packages/manifest.json file. Inside this file, you will see one line that looks like this:

You must change it to version 1.5.2, like this:

In the end the manifest will look like this:

You can now save this manifest.json file, and return to Unity. Unity should then automatically update Collections to the latest version.

Making Your Own Gas Giant

There are two types of gas giants in Gas Giant Forge:

  1. Full Fluid Sim - The whole gas giant surface is one big fluid simulation.

  2. Slices - The gas giant is made from thin bands/slices of static textures and small fluid simulations.

circle-info

Both gas giant types are fundamentally the same. The Full Fluid Sim gas giant just has one large fluid sim band/slice, whereas Slices comes pre-configured with many bands/slices. Both can be fully customized.

Example of a Full Fluid Sim gas giant.

To make your own gas giant from scratch, you can either:

  • Right click in the Hierarchy tab, and select "CW / Gas Giant Forge / Gas Giant (Full Fluid Sim) (Radius = 500)".

  • Go to the menu bar, and select "GameObject / CW / Gas Giant Forge / Gas Giant (Full Fluid Sim) (Radius = 500)".

This will create a new GameObject called "Gas Giant" with 2 child GameObjects:

  • The "Sky" GameObject has the SgtSky component, which handles rendering of the core atmosphere of the gas giant. More info HERE.

  • The "Sky" GameObject has the SgtShadowSphere component, which casts shadows from the gas giant onto the rings. More info HERE.

  • The "Cloud" GameObject has the SgtCloud component, which handles rendering of the high altitude clouds that swirl around. More info HERE.

  • The "Cloud" GameObject has the SgtCloudBundle component, which is a texture atlas that stores all gas giant bands/slices. More info HERE.

  • The "Cloud" GameObject has the SgtGasGiantFluid component, which runs a fluid simulation that is rendered on the gas giant. More info HERE.

  • The "Rings" GameObject has the SgtRingSystem component, which renders volumetric rings around the gas giant. More info HERE.

  • The "Ring" GameObject has the SgtRingParticles component, which renders small asteroid particles inside the volumetric rings. More info HERE.

  • The "Ring" GameObject has the SgtShadowRing component, which casts shadows from the rings onto the planet. More info HERE.

The gas giant surface is updated using a fluid simulation. To modify its settings, select the "Cloud" GameObject, and change the SgtGasGiantFluid component's settings. To quickly see results from your changes, you can click the "Step Simulation x1000" setting.

circle-info

The simulation settings are very sensitive, so I recommend changing them by small amounts like 10%.

By default, the gas giant has a radius of 100 meters, and the clouds extend 10 meters above the surface. To adjust this, select the "Sky" GameObject, and change the SgtSky component's InnerMeshRadius and Height settings.

circle-info

If you're not sure what Height value should be used, a good starting point is to make this 10% of your InnerMeshRadius setting.

To change the color of the gas giant, find the "Cloud" GameObject and change the SgtCloud component's Color and Color2 settings. You can also click the "Randomize Color Hue" button to quickly modify them.

The core of the gas giant below the clouds is colored by the "Sky" GameObject's SgtSky component, which cam be controlled with settings like RayleighColor.

circle-info

You can hover the mouse over any inspector setting, and it will tell you what it does.

Required Scene Components

circle-exclamation
circle-exclamation
circle-exclamation

Last updated