Dev Blog

Hi, this is the Stranded III development blog (see also Forum Thread, Comment Thread).

Overview (121 Entries)

Entry 121 - Fluffy foliage at last! - February 15, 2026

Fluffy foliage at last!
When I first saw the fluffy stylized tree video by Pontus Karlsson I was instantly in love with that amazing foliage. So I tried to achieve something similar in Godot.
The approach is pretty smart: The foliage geometry consists of quads. Each single quad uses the full UV space. The quads are rendered like billboards which always face the camera. Some upscaling makes it more dense and some shaking and rotating simulates wind.
Unfortunately my shader skills are still very limited so I had to rely on the work of others. Luckily I found this great Godot shader by FaRu85. Turns out that he was inspired by the same video.

I modified the shader a bit to make it fit my needs. I replaced the static fresnel color with a dynamic backlight solution so now the plants don't have a bright fresnel effect at night anymore.
Also I'm using a full RGBA texture to allow showing details on the leaves. Unfortunately it doesn't look as good as I expected because the more details the leaves have the more you notice that they intersect each other a lot. Therefore I added a shader setting for the texture intensity which allows me to easily tweak it and find the right balance.
Additionaly I made a variant where not the full texture space is used for the foliage. Only the top left quarter of the texture is rendered as billboarded foliage. The rest can be used for details like berries which are rendered differently.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/fluffyfoliage.png

Here's the backlight stuff aka cheap pseudo subsurface scattering:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/fluffyfoliage2.png


Navigation Meshes
I also tried to get Godot's navigation meshes to work. Navigation meshes are used by AI controlled characters to find paths in the 3D environment. It gave me quite a headache, but it's working fine now. Except for some occasional issues that I still have to solve. The nav meshes are built dynamically on a background thread and are split into chunks so only small parts of the world are baked at a time to make things fast.

Here's what the nav mesh stuff looks like in debug mode:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/navmesh.png

The turquoise shapes are the nav mesh (walkable areas). Holes in it mean that the area is either blocked by colliders (e.g. rocks in foreground) or that the terrain is too steep (big hole in background). Magenta lines are connections between nav mesh chunks.

When meshes with collision are added/removed/changed the game automatically rebuilds the nav meshes.

You can even control the nav mesh behavior of objects explicitly if you want to. So for instance if something has a box shape anyway you can tell the game to use a box for nav mesh creation instead of the actual collider geometry.

Disqus

blog comments powered by Disqus