[Released] Advanced Terrain Grass

ATG is a grass rendering solution which was built to replace the detail rendering system of Unity’s terrain engine in order to get rid of almost all spikes on the CPU — which usually are caused by new grass patches coming into sight when your camera is moving. So ATG will help you to reduce work on the CPU – but at the same time it might add some more costs on the GPU side.

Next to this initial purpose ATG offers significant improvements regarding lighting and wind animation.

ATG is not an authoring tool: It simply takes the grass and details you have added to your terrains and takes over their rendering. That being said ATG is compatible with any 3rd party authoring solution that allows you to create grass density maps for built in terrains within the Unity editor like e.g. Terrain Composer, Map Magic, World Creator or Gaia. Runtime distributed grass currently is not supported.

Get it on the asset store

Benefits
ATG was built to avoid major spikes on the CPU and gives you quite stable and reliable costs per frame, or — in order to be more specific — time slices and shifts work from the main thread to a worker thread and the GPU.

It lets you use advanced lighting features such as physically inspired specular highlights and translucent lighting and enables any grass prototype to even cast real time shadows.

Limitations
ATG is mostly suitable in case you are CPU bound.

ATG needs DX11, Metal (tested on OS X – not iOS) or OpenGLCore (Linux or Windows, Mac is not supported). Xbox One and PS4 should be fine as well although i have not been able to test it.

ATG currently only works on squared terrains and does not support Detail Resolutions < 256. Billboarded grass is not supported either.

ATG currently does not support lightmaps. And it does not support real time lightmaps as well, which — unfortunately — is by design, as Unity does not let us access real time lightmap data from script.

Fast moving cameras currently may cause grass to just pop in. A speed of 6 (fpc) – 10 just should be fine.

13 Likes

Preview of ATG’s lighting and wind features:

5 Likes

look awesome

date release and price?

i have submitted it more than a week ago. so it should hit the asset store within the next 2 weeks i hope.
price is 27eur + vat.

I really like the lighting. It looks better than anything I have seen. Can you also post a video which using screen space shadows such as:

This one:

Or this one:

You mentioned a fast camera speed can be an issue. Any chance of fixing that? I plan to use it for a flight sim when in close range of the ground.

1 Like

This is exciting. How is it different from using uNature as a grass solution.

What about simple but amazing feature of pigment map?

It’s described here on pages 52-56

thanks.

[quote=“Elecman, post:5, topic: 676786, username:Elecman”]
Can you also post a video which using screen space shadows such as:
[/quote] sorry, not now. but i just works of course (tested with Next-Gen Soft-Shadows).

well, that is very special – and would need to initialize multiple cells within a given frame. or use rather large cell sizes. so it is probably nothing atg will support right out of the box – but should be rather simple to implement.
in case you are going to work on this just come back to me to find out the most elegant way.

oh, it uses a totally different approach and derives grass distribution directly from the built in terrain, always, ever.
not to mention its shaders.

1 Like

that pigment map would have to be created by your terrain shader like rtp, mega / micro splat, cmu or cts as the grass manager does not know how the terrain actually gets rendered. once you have that map it is just a few lines in the shader code.

I understand, for example megasplats have this feature. You can render terrain into texture. It’s than used for macro texture feature.

Although those few lines of shader code would be still appreciated :wink:
Looking forward to new grass solution!

cmu has it too. so it might come with one of the next updates.

finally… good looking unity grass! nice work

Does this also let you plant unity detail grass using the direction the terrain normals are facing? So no more just straight up floating grass on angles of the terrain going up or on cliff areas.

yes. it actually is the preferred way to render at least smaller grass entities.

Hey lars big fan of AFS v4 and 5. You were able to get lightmapping in those packages anyway we can get lightmapping with this new grass package as well? Latest version of unity 2017 has a great lightmapping feature called shadow mask its pretty much like in unity 4 how dual lightmaps used to work. Be great to have this new grass/detail system working with unitys new shadow mask lightmapping.

baked light maps may come in the future.
precomputed real time gi however is impossible – at least with unity 5.6 or 2017 – as there is no api to access the real time light maps.

Just a really rough version using NGSS:

https://www.youtube.com/watch?v=oeAczbFdb5g

3 Likes

Thanks, that looks really nice!

Hi @larsbertram1 ,

This looks great.

Just wondering if this is a replacement for AFS or something that can work in conjunction with it?

Thanks

doc