Forum

> > Projects > Stranded III Dev. Blog
Forums overviewProjects overviewLog in to reply

English Stranded III Dev. Blog

121 replies
Page
To the start Previous 1 2 3 4 5 6 7 Next To the start

old Fluffy foliage at last!

DC OP
Admin Off Offline

Quote
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.

old Water

DC OP
Admin Off Offline

Quote
Whoops!
Long time no dev blog. Sorry! I've put a bit too much time into making a little traffic education game and some other small side projects like a browser based CS2D map viewer.

Water
Of course there's progress in Stranded III anyway. I've put a lot of time into water related stuff for instance.

I added a water shader with caustics, distortion, edge foam etc.
In theory there could be physical 3D waves too but this comes with some problems so I decided against it for now. Diving and related effects were improved as well.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/dive_pre.jpg

> Sea/Dive (click for gif)


I also added bubbles and other particle effects for water interaction. Unfortunately they are not really visible in the gif above.

Rivers and Lakes
Rivers and lakes are another topic which I covered in earlier dev blog posts already but they were not implemented in the new Godot version of Stranded III yet.
I changed that now. They use a slightly adjusted version of the sea shader for the water surface and they can be easily created with a nice little editor tools.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/river_pre.jpg

> Creating a River (click for gif)


The river tool works by clicking to set a point, moving the mouse to set the size and clicking again to confirm it. This is repeated as often as you like. When you're done with setting all points you confirm and the game carves a river bed into the terrain and fills it with water.

This feature still needs some tweaks. Sometimes the water is too high or river banks don't look clean enough. Some proper smoothing is missing at some points. But in general it works pretty well already.

Lakes work by clicking, moving the mouse to set the water level and then releasing. It will then fill the area with water. If it is enclosed. Otherwise it cancels to prevent that the whole map is flooded.

The water system uses a separate mesh, internally split up per terrain chunk. Basically a second heightmap just for water. This makes it easy to connect rivers and lakes seamlessly. Vertex colors are used internally to encode flow speeds for the shader. Those are automatically calculated based on height differences. You can also sculpt the water freely like the terrain. This allows you to form weird water blobs which wouldn't be physically possible in real world. Not sure if I'll add restrictions to this later. Right now it's only there for fine tuning auto generated water stuff but it also provides a way to manually create rivers and lakes.

There are plans to support different types of water. Some are safe to drink, others can cause diseases. But that's not fully implemented yet.

Undo/Redo
And finally a breakthrough in the history of Unreal Software!
I add map editors to most of my games but none of them had solid undo/redo feature.
The Stranded III map editor now has one. You can undo and redo multiple steps. You dislike the river you created? Undo. You overpainted the terrain textures in ugly ways? Undo. The mountain you sculpted looks stupid? Undo. Mistakes are finally allowed and you can easily recover from them.
To the start Previous 1 2 3 4 5 6 7 Next To the start
Log in to replyProjects overviewForums overview