XaiJu
x4fab
x4fab

patreon


Another feature for tracks

Procedural grass! Got it working, thanks to GRID devs for all those great ideas. At its core, similar to smoke, same bunch of particles generated on GPU side, although here, it’s being regenerated each frame.  Still some work to do, but in general, I think, it already looks pretty decent (although, texture, I think, could use some work). 

Grass is synced with ground color and lighting (apart from grass texture, which gradually fades out with distance), so it doesn’t pop up. Normals are also synced, although there is a bit of an issue with smoothing those normals for now in some extreme cases with low poly hills.

Two types of grass are generated, a lot of vertical bits all over the place, and a few horizontal bits nearby to cover transitions and make it look acceptable if camera would to look straight down:

For the whole thing to work, track config needs to have a list of grass generating meshes. Plus other options if needed, for example, certain meshes can stop grass from growing underneath them:

It’s definitely way too high, working on some ways to adjust it for the whole track and, hopefully, something for adjusting for certain areas:

As for performance, for now on Brands Hatch, it reduces FPS from 120 to 110 (with camera over track and a lot of grass visible at sides, in general, it mainly depends on how much grass is visible and how much space it takes on screen; even though it’s alpha testing, there are a lot of bits to draw). Hopefully I’ll find a way to optimize it some more, and add some option for reduced density just in case.

Here is how it looks on Highlands. Hopefully some track-specific textures for grass would make the whole thing more diverse:

Thank you for all the support! If you have any suggestions, please let me know. :)

Another feature for tracks

Comments

Thank you! No magic there, not even some basic testing, patch expects a list of grass meshes or materials from track config to spawn grass on top. There is also some color check, surface should be green-ish, which can also be adjusted globally or in certain area, allowing to create colored grass, like so: https://i.imgur.com/xLN9vJ5.jpg

Ilja Jusupov aka x4fab

This is amazing! How exactly will these shaders detect if a texture is actually grass and not just concrete or sand? I feel sandy tracks like Laguna Seca and Sonoma Raceway will have these problems...

Zip Zap

Sounds great, I look forward to it. Will be brilliant for langer tracks where the grass will no longer hugely affect the polycount.

Yes, for blending between road and grass, there is no need to add anything apart from extra line in config (check out this transition on Skidpad: https://i.imgur.com/4kRm554.jpg). Also, working on this thing right now, the idea is to be able to define areas in config and/or with meshes (with textures?) adjusting different grass parameters, such as size, grass type and color masking, in different areas. Configs would allow to define simple shapes like circular, oval or rectangular areas with a certain falloff at the edges, and extra meshes would allow to define more complicated shapes

Ilja Jusupov aka x4fab

Yes, I think it’s better to just turn it off with new grass, would save a bit of FPS and reduce problems with 3D grass being out of sync with surface colors

Ilja Jusupov aka x4fab

Looks great that’s an amazing idea. could it be possible to mask certain areas with a texture/ alpha channel

Stunning work as always. Thank you for your effort again. How you deal with „Original“ 3D Grass? Will it be rendered or ignored if the new one is configurated? Maybe a idea to increase performance.

Just WOW. This will make my track look so much better. I've been struggling with making the grass look proper. I love this Ilja! You're a beast!

Incredible!

Wow, almost forgot about that one, great idea :D

Ilja Jusupov aka x4fab

Looks amazing. Now we just need a feature that allows Gary's honda racing lawnmower to actually mow that grass :D

awesome

Wow that addition will raise the bar once more! Awesome stuff mate


More Creators