First try to add grass in the game. I'm not sure it's a good technique. Doesn't work well for all view angles, and not so good for performances.

This uses the VoxelInstancer which automatically spawns meshes on the surface of the transvoxel world.
https://voxel-tools.readthedocs.io/en/latest/instancing/

#GameDev

@youen That looks really fucking good. I'm not familiar with that plugin/node type or best practices when working with voxel data, but I assume the grass is billboarded with the texture you posted. Are the billboards static and rotated to fixed angles, or are they camera-aligned? Can you lower the grass density (billboard count) and still get good results?

@kieraaa each instance is made of two static planes crossed at 90 degrees. If I lower the density, performances are better of course, but if the ground becomes visible between instances the effect doesn't really work.

One issue with other view angles is that it's not really independant on the drawing order, even if I use depth_prepass_alpha (works at close distance, but I think in the distance it fails because mipmaps make alpha not 100% opaque). I'll try to make a video showing the issue.

@kieraaa another technique I might want to try is to render a few 3D grass meshes in a texture each frame, and then use actual billboards (oriented to camera) to draw more instances. This could help achieve a good density, and fix issues when looking top down.

But I'd still have to find a good technique for order-independent alpha. Maybe I'll try alpha-to-coverage but I suppose for this I need MSAA? Probably not ideal for performances.

Grass is hard 😅

@kieraaa just made a video showing some issues https://mastodon.gamedev.place/@youen/116305693896098563

The first screenshot was kind of a "best case" 😁