Questions about the grass in SimpleTerrain example

Node-based Shader Editor

Questions about the grass in SimpleTerrain example

Postby mrmongbat » Sat Jan 26, 2019 4:04 pm

I extracted the ApplyGrass file in the SimpleTerrain scene and was trying to understand how it worked but I'm quite confused.

https://youtu.be/-ApIv8w52Zk

Is this how it should work or am I doing something wrong? The Windzone direction doesn't seem to be affecting it very much, for example the grass in the upper left corner never seems to move much however I spin the Windzone?

I'm also wondering how I would use the wind variables in a new scene.
I tried creating a completely new scene, created a Windzone object and applied the material to a test mesh, in that scene nothing happens at all.

I also tried creating a new amplify shader and copying the vertex offset node-chain from the GrassBlades shader and applying to my test mesh in the new scene without any success, nothing happens, it's like the Windzone object doesn't exist in that scene.

Do I need to link the Windzone object to the shader somehow to get it to be affected by it?

Apologies for probably missing something quite simple :oops:, any help would be appreciated.
mrmongbat
 
Posts: 5
Joined: Sat Nov 10, 2018 4:14 am

Re: Questions about the grass in SimpleTerrain example

Postby Amplify_Borba » Mon Jan 28, 2019 5:04 pm

Hello!

In this sample we've added the custom shaded grass as a tree prefab, so that it can use a custom ASE shader that allows you to access Unity's wind zone.

Image

We've added the grass for this sample as a tree prefab since the alternative would be to override Unity's grass shader, which we don't recommend due to the lack of flexibility and also since, in our case, it could override users' own custom grass implementations.

In order to properly replace Unity's grass, you'll have to follow the steps shared in this post.

Regarding the wind zone behavior, I'm not too familiar with it but according to tests that we've ran before it seems to be behaving as expected. Having it set to Directional has it influence the whole terrain, and you'll need to tweak its parameters, as well as the shader itself, in order to see different results.

Please let me know if this helps.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 9 guests