Welcome to Gas Giant Forge, 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 Gas Giant
Realtime Fluid Simulation
Highly Customizable
To make your own gas giant from scratch, you can either:
[A] Right click in the Hierarchy tab, and select the "CW / Gas Giant Forge / Gas Giant (Full Fluid Sim)" or "Gas Giant (Slices)" option.
[B] Go to the menu bar, and select the "GameObject / CW / Gas Giant Forge / Gas Giant (Full Fluid Sim)" or "Gas Giant (Slices)" option.
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 "Cloud" GameObject has the SgtCloud component, which handles rendering of the high altitude clouds that swirl around. More info HERE.
[Only B] The "Cloud" GameObject has the SgtCloudBundle component, which is a texture atlas that stores all gas giant bands/slices. More info HERE.
[Only B] The "Cloud" GameObject has the SgtGasGiantFluid component, which runs a fluid simulation that is rendered on the gas giant. More info HERE.
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.
π‘ If you're not sure what Height value should be used, a good starting point is to make this 10% of your InnerMeshRadius setting.
[Only A] The gas giant surface is made of many separate texture bands. To modify or add more bands, select the "Cloud" GameObject, and change the SgtCloud component's CoverageBands setting. Each band uses a texture from the CoverageBundle setting, which by default contains many different textures.
The gas giant surface is colored using a portion of a color gradient. To modify this, select the "Cloud" GameObject, and change the SgtCloud component's Albedo settings. For example, the AlbedoVariationX/Y settings can be adjusted. You can also click the buttons to quickly modify them, like "Randomize Albedo Gradient Texture" or "Randomize Variation".
Examples of different color gradients on the same underlying gas giant.
SourceMaterial β The material used to render this component.
π‘ This material must use the Space Graphics Toolkit/Sky shader. You cannot use a normal shader.
UpperColor β This allows you to set the color of the atmosphere at high altitudes.
LowerColor β This allows you to set the color of the atmosphere at low altitudes.
Brightness β The Color.rgb values will be multiplied by this.
InnerMeshRadius β The radius of the meshes set in the SgtSharedMaterial.
OuterMesh β This allows you to set the mesh used to render the atmosphere. This should be a sphere.
OuterMeshRadius β This allows you to set the radius of the OuterMesh.
π‘ If this is incorrectly set then the atmosphere will render incorrectly.
Clouds β If your planet has clouds, set it here so they can be rendered with the sky.
Height β This allows you to set how high the atmosphere extends above the surface of the planet in local space.
Density β This allows you to adjust the fog level of the atmosphere.
Weight β This allows you to set the weight of the atmosphere.
π‘ Higher values concentrate the particles toward the surface of the planet; lower values give a more even distribution.
ColorWeight β This allows you to set the weight of the atmosphere colors.
π‘ Higher values push the Upper Color lower in the atmosphere.
Detail β This allows you to adjust how many samples are used to ray march the atmosphere/clouds.
SurfaceScattering β This allows you to adjust how atmospheric scattering applies on top of the planet surface.
CameraOffset β This allows you to offset the camera distance in world space when rendering the atmosphere, giving fine control over the render order.
DepthOpaque β This allows you to control how fast the opacity of the sky increases as the camera descends.
Lighting β Enables or disables lighting on the atmosphere.
LightingStart β The start point of the day/sunset transition.
0 = dark side, 1 = light side
LightingEnd β The end point of the sunset/night transition.
0 = dark side, 1 = light side
LightingSharpnessR β The sharpness of the sunset red channel transition.
LightingSharpnessG β The sharpness of the sunset green channel transition.
LightingSharpnessB β The sharpness of the sunset blue channel transition.
Scattering - Always enabled.
ScatteringStart β The start point of the day/sunset transition.
0 = dark side, 1 = light side
ScatteringEnd β The end point of the sunset/night transition.
0 = dark side, 1 = light side
ScatteringSharpnessR β The sharpness of the sunset red channel transition.
ScatteringSharpnessG β The sharpness of the sunset green channel transition.
ScatteringSharpnessB β The sharpness of the sunset blue channel transition.
ScatteringTerms β The size of each atmospheric scattering halo.
π‘ Higher values make the halo smaller. Use negative values for back scattering.
ScatteringPower β The strength of each atmospheric scattering halo layer.
This component renders a layer of volumetric clouds around a planet.
SphereMesh β The mesh used to render the clouds.
π‘ This should have a radius of one.
Density β The maximum density of clouds.
Resolution β The width/height of the generated cloud texture.
HighPrecision β Use a high precision cloud texture for smoother results?
Warp - This allows you to increase cloud detail toward the camera, allowing you to use a lower resolution texture that still looks sharp up close.
Color β The color of the clouds.
ShadowDensity β The density of the clouds when calculating lighting.
ShadowOffset β The depth of the light samples, which changes how the lighting looks.
CoverageTex β This texture defines where clouds appear around the planet.
π‘ This texture should use the equirectangular/cylindrical projection.
Coverage β Generate a coverage texture for the cloud rendering?
CoverageBundle β Β The coverage texture will be generated from this texture bundle.
CoverageBands β This allows you to add bands of texture from the CoverageBundle.
Visual β The texture index this band uses. This is based on the texture list in the CoverageBundle.
Height β The height of this band on the gas giant, where 0 is the south pole, and 1 is the north pole.
π‘ There are singularities at the poles, so your bands should end just before them.
Thickness β The thickness of the band relative to the latitude.
Offset β The longitudinal offset of the band texture.
Speed β The speed at which the band rotates aroundΒ the gas giant in revolutions per second.
Tiling β The amount of times the band texture is tiled around the gas giant.
Opacity β How visible this band is.
Albedo β Generate an albedo texture for the cloud rendering?
AlbedoGradientTex β If you want the CoverageTex to be colored, you can specify a gradient texture.
AlbedoVariationX β The GradientTex will begin from this coordinate.
AlbedoVariationY β The GradientTex will begin from this coordinate
AlbedoLatitudeX β The GradientTex will be offset by this amount based on the planet latitude.", "Latitude X");
AlbedoStrataY β The GradientTex will offset by this amount based on the AlbedoGradientTex.
CloudLayers β This allows you to control the settings for each cloud layer.
π‘ Cloud layers are defined in the CoverageTex texture's RGBA channels up to a maximum of 4 cloud layers.
This component allows you to add detail to the SgtCloud component. This can be added to a child GameObject.
CoverageTex β The texture used to define where clouds are, or how the clouds should be eroded.
π‘ This should be a single channel texture where the coverage is stored in the Red channel.
CarveEdge β This allows you to specify how much of the edges of the clouds will be carved by the CoverageTex.
CarveCore β This allows you to specify how much of the clouds overall will be carved by the CoverageTex.
Scale β The scale of the detail, where a lower number means more tiling.
Speed β The speed of the animation of this detail layer.
Offset β The rotational offset of this detail layer.
Channels β The cloud layers that will be eroded by this detail layer.
This component allows you to combine multiple gas giant slice textures into one larger atlas.
Slice textures can be defined using the SgtGasGiantTexture component for normal pre-made textures, or using the SgtGasGiantFluid component for a procedurally generated fluid sim.
Width β The width of this texture bundle.
π‘ This should be the same size or smaller than the textures in the Slices list.
Slices β This bundle contains these slices.
This component allows you to define a texture that can be added to a SgtCloudBundle.
This texture will typically be one horizontal band around a gas giant so they can later be combined to make many bands around the gas giant.
Source β The texture that will be added to the bundle.
π‘ This texture should be horizontally seamless/tiling.
π‘ This texture's import settings should have Texture Type = Single Channel.
π‘ This texture's import settings should have Channel = Red.
π‘ To save memory, this texture should have Advanced / Generate Mip Maps disabled.
This component allows you to add a fluid simulation to a SgtCloudBundle.
π‘ The fluid sim takes time to 'warm up' and reach a stable state. To speed this up, you can click the "Step Simulation x1000" button at the bottom of the inspector.
π‘ After you configure your fluid sim and it reaches a stable state, you should click the "Bake" button next to the InitialTexture setting so it instantly begins in a stable state.
Resolution β The resolution of the fluid sim.
π‘ The resolution of the simulation changes how it behaves, so you may need to tweak the <b>Constants</b> if you change the resolution.
InitialTexture β The baked initial state of the fluid simulation for instant startup.
Constants β The fluid simulation constants.
X = Pressure.
Y = Viscosity.
Z = Speed.
W = Turbulence.
Emission β The fluid emission constants.
X = Frequency.
Y = Amplitude.
Z = Brightness.
W = Sharpness.
Interval β The amount of seconds between each fluid simulation update step.
Power β The sharpness of the output fluid gradient.