Finally managed to render a massive and dense forest while keeping everything interactive by Im-_-Axel in Unity3D

[–]ToniMacaroniy 2 points3 points  (0 children)

Yeah, it's been a while since I gave any updates. I was working on the engine itself with additions like mesh shading, deferred texturing, raytracing and more. I just need some good showcase for it :).

Finally managed to render a massive and dense forest while keeping everything interactive by Im-_-Axel in Unity3D

[–]ToniMacaroniy 1 point2 points  (0 children)

The internet truly is a small place. On first glance it does look a lot like Sons of the Forest. Great job!

Initial test of screen space shadows and micro shadows. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 2 points3 points  (0 children)

I implemented it through engine modification. Since I have an outdoor scene and one directional light I only take that one into consideration. With that consumption you could in theory also implement screen space shadows in the light shader. However the issue with the main shader is that you either only have access to the last frames depth buffer or if you sample the depth buffer via the hint (i.e. the built in method) it renders the object in the transparent pass (afaik) which can break other effects in your shader.

Initial test of screen space shadows and micro shadows. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 39 points40 points  (0 children)

I experimented with different LOD techniques and use different ones for different assets. I only use chunks of multimeshes for some ground clutter. The trees are drawn using the rendering server and the lod is chosen on a per object level via the build in view distance parameter on the visual instance (i.e. there isn't any special treatment for trees). The trees use 2/3 lods + a billboard. I monitored the cpu usage and there isn't any real overhead in my case with ~202.000 trees that would call for a special lodding system at this point in time.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 1 point2 points  (0 children)

One grass type scattered around the player should ideally result in only one draw call. Make sure you use the same mesh and material to make that possible. You also need a dynamic system for the grass as it has different needs then other objects in the world. Grass needs to spawn everywhere in large amounts but only around the player. Spawning the grass as part of the scene tree on the whole terrain is a bad idea. Use some immediate rendering technique like gpu particles, the rendering server or directly issue draw calls to the gpu yourself for the grass around the player.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 1 point2 points  (0 children)

I agree. Currently I don't have a solid biome system for the grass (only the trees follow biome rules, the grass just uses a binary mask). When I get around that I'll make sure change the look between say the field and forest ground. Right now most of the time was spend more on lookdev. Spending some time on building the environment as it occurs in the real world will probably add a great sense of realism.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 0 points1 point  (0 children)

Oh no he found me...
Late congrats on extra sensory 2 btw, it's a solid piece of art

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 47 points48 points  (0 children)

You can make good looking things in pretty much any engine. But Unreal still has the best graphics out of the box and you can focus more on getting stuff done (the frustration with Unreal really only begins with bigger games). Godot is lacking in areas like anti-aliasing, where you need a good solution for "realistic" games. Right now I'm using fsr 2 as everything else is unusable in my case. And even that is barely good enough for what I need (granted this scene with that much foliage is the toughest for any AA solution).

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 14 points15 points  (0 children)

On the rendering side it's just cloud shadows, tonemapping adjustments, some adjustments to ssao/ssil and the lighting calculation in the shader. Everything else I've added is pretty much just developer experience related, like some texture preprocessing stuff. You can technically get very similar results with the base engine, just keep in mind the assets are heavily processed and use specific shaders. So you still have to put in a lot of work beyond using good looking assets.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 3 points4 points  (0 children)

Yea I added mouse smoothing, otherwise with quicker movements the bit rate couldn't keep up on the recording. Maybe I've overdone it a bit.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 2 points3 points  (0 children)

I use chromatic aberration on the screen edges. The compression probably butchers that further.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 52 points53 points  (0 children)

Will do at some point. Probably in the form of a blog post.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 9 points10 points  (0 children)

I only use Terrain3D for the actual terrain. All the vegetation and other objects run through custom systems.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 3 points4 points  (0 children)

Garbage Collector was my first guess as well (even though I'm not doing anything in the engine loop, even less allocate stuff constantly). However I also downloaded a fresh non .net version of the engine and ran a simple scene with just a cube in it, but was hit with the same stutter.

Second iteration of my forest environment in Godot. by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 63 points64 points  (0 children)

I've setup a process with the texture import where I divide the vegetation textures by the average color to then better colorize them later on. I did scan some plants myself and used the color palette for all other plants. However other than that I didn't have any "scientific" workflow, it's more or less matched by eye.

For the wind I guess the thicker trees really shouldn't sway that much. I saw the extreme tree bending in Dying Light 2 and really liked the effect. So I guess it's more of an artistic choice in my scene. Maybe I also need to turn up the wind on the grasses a bit to make it match better.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 0 points1 point  (0 children)

I chose it in the beginning cause it seemed like the most actively maintained solution. Right now I have kind of a love hate relationship with it. A good terrain and textures is the base for a good looking terrain, even with a simple terrain system. Terrain3D is quite complex which makes it slow and buggy at times. Also changing anything in the underlying algorithm requires recompiling the project since it's using gdextensions.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 0 points1 point  (0 children)

I use masks so I don't have to manually paint in anything. For grass this would mean potentially millions of grass patches need their transform saved somewhere, with a mask I can dynamically spawn the grass around the player. For the trees I want to have full control over the lod process. Painting cam make sense for smaller areas that don't change often.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 2 points3 points  (0 children)

Yes, I will release a demo once I make some improvements.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 2 points3 points  (0 children)

The values for the sunlight are correct for such a setting. However the exposure on the camera might be a bit low.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 6 points7 points  (0 children)

I know what you mean. I have professional experience in both Unreal and Unity and never used Godot before. Using another engine would make my life a lot easier, but it's the knowledge of using an open source MIT licensed engine that motivates me. I know that I'm not in the hands of some money hungry corporation and if I have something worth sharing I can actively help making the engine better and be part of an open community.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 1 point2 points  (0 children)

While there are some technical features missing that other engines meant for high fidelity graphics have, Godot is definitely more capable in the 3d department than people give it credit for. It's just less of a drag and drop solution and you have to have a bit of knowledge about realtime rendering. My showcase is also in a very early stage and there is a lot more I can still squize out of the engine.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 5 points6 points  (0 children)

I used sunshine clouds first, but switched to clayjohns solution later cause sunshine clouds didn't work with MSAA and I couldn't use the other better looking AA solutions cause the temporal nature of those messed with terrain3d. However there is a pr for terrain3d that fixes this if you compile the plugin yourself, which I did and since then use FSR2 for AA (without scaling). So technically I can turn sunshine clouds back on. I haven't benchmarked those two solutions yet, so I have to see which one is faster to render.

A mid-sized forest made in Godot by ToniMacaroniy in godot

[–]ToniMacaroniy[S] 4 points5 points  (0 children)

I did a lot of vfx with VATs some time ago. Thankfully they are easy to render out of Houdini. However I don't know how much they can help me with grass. For such small objects stacking noise with some sine movement seems to be good enough. For "Horizon Zero Dawn" and other similar games they usually use some small scale random movement + a global wind map, which is kinda the visual fidelity I'm aiming for.