Godot Version
4.7.1
Question
Hello, my question is primarily: what options are there in the realm of shaders for moving fog cards? (or is animating their movement with keyframes the preferred option?)
Using the GPUParticle system, I made some Particle Billboarded fog with handpainted fog textures I made in GIMP. In doing this I determined that for my use case this option was too expensive to achieve the visuals I was aiming for.
For reference I am trying to achieve something close to the large distant mountain fog cards seen in Skyrim.
After noclipping around in Skyrim to get a closer look I’m pretty certain I know mostly how these were done (not billboarded, don’t seem to be part of a particle system), so I’m most of the way there. However, I intend on having lots, like lots of hand-placed distant mountain fog to cover and wrap around distant elevated terrain.
So with a large quantity of fog cards in mind, would it be more performant to just simply animate the fog cards movement via keyframes in Godot, or are there methods for doing this with shaders that save on performance?
edit: I should clarify my question applies to both moving the fog card in world space and in making the texture itself shift/move around to imitate how clouds shift around and warp with the air as they move.
Better to animate everything in shaders.
Fog cards could be sprites, 3D sprites, noise based animations on quads, or 2D fluid sims (think Stam solver with falloff at the edges).
One thing that is hard to achieve in Godot is depth sprites, because they dont work nicely with the depth prepass pipeline phase.
Other ways of achieving fog effects include: fog volumes, volumetric noise textures (look up volumetric cloud shaders), and even 3D fluid sims (navier stokes equations in 3D). Also the basic depth fog environment setting can go a long way without adding any volumes.
I wouldnt say fog cards are particle systems, but a particle system made of fog cards can visually simulate fog or whisps of water vapour or smoke.
Perfect exactly what I needed to know, thank you!
Thankfully I’m familiar with most of these methods, although only conceptually through years of learning about game dev without applying it anywhere until recently. Currently going through them all and learning about how to implement them.
I did one unshaded billboarded fog card particle system, looked okayish but was too expensive and will probably revisit for other applications.
Then the one below just put the fog card on a quad mesh by itself and it looks good but in both unshaded and per-vertex shading it’s hard for it to look like it has any depth to it (the latter disappears in dark conditions, only looks good when sun is facing it directly, messed around with albedo/emission which sort of helped but still lacks depth).
Have never worked with volumetric fog or volumetric volumes but again I’m familiar conceptually with how they work. Right now a volumetric solution is kind of my last choice as they can be rather expensive but it will probably end up being what I go for (and also using fog cards to supplement it visually). Baking fluid sims is beyond me but sounds like fun to dive into.
If the depth fog bit you’re referring to is the one under WorldEnvironment then I will most definitely be using that regardless in some capacity.
However I’m aiming for a very particular shape of fog, similar to in the image below.
If I do a volumetric cloud solution that just runs low enough to pass through the top of the terrain I think I could get something in the realm of this by having another large volume which covers most of the terrain and subtracts the cloud/fog (positioning would be interesting) to sort of mimic a ramp affect look.
Although I’m also currently looking at this, while nowhere near as dynamic as volumetrics, the clouds in The Witness are like the only solution that comes to mind when I think of the depth of the cloud of fog I want to communicate, even if it’s static.
The Art of The Witness - Clouds - Art of Luis
Theres a couple of projects on github that do volumetric cloud that I am sure you could find on google.
For the mountain cloud layer, that looks like something that could be achieved with a particle system, or even just instances that fade out when the player gets close.
Volumetric fog requires a shape …
And you can configure a fog shader on the material
This approach looks promising to me however it might not create the preferred type of fog - 3d fast noise lite is easily available.
There is a fog volume sample in the godot demo projects folder.
I would try these, and MeshInstances with noise shaders.