SpeedTree template

Node-based Shader Editor

SpeedTree template

Postby cAyou » Wed Jan 16, 2019 2:20 pm

Hi there !
In our project we would like to take the advantage of the speedtree base shader for our foliage bought on the asset store (from the speedtree library) but add more stuff into it.
At first I thought I would simply need to call the same function they call on their base shader (which is SpeedTreeVert) but it looks like it's too custom to use it normally on an ASE base standard.
So I'm trying to create a custom template to use on all various kind of speedtree custom shader we would like to make.

On the template documention, you specify that we have to set the keyword "ase_vdata" on the vertex data struct, but it looks like the one that speedtree uses is inside an include file (SpeedTreeVertex.cginc). How do I do then?

I would appreciate some help here :D
Thanks !

ps: Every cginc and shaders from speedtree can be found on the built-in shader archive for any Unity version.

edit: if it's impossible to achieve this, I would understand, and we will just write a custom shader by hand, as we don't want to add anything too fancy. But it would be cool to have a speedtree template to shader with the community :)
cAyou
 
Posts: 39
Joined: Mon Oct 29, 2018 7:12 pm

Re: SpeedTree template

Postby Amplify_Borba » Wed Jan 16, 2019 3:45 pm

Hey there, in order for you to be able to use the template in a correct manner, you'll always have to place the required vertex function(s) within the template.

This is of the utmost importance since many nodes perform calculations in the vertex function for efficiency purposes, and send values to the fragment function through interpolators.
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

Re: SpeedTree template

Postby cAyou » Wed Jan 16, 2019 5:54 pm

Hum, because the shader has multiple pass, I would have to add the speedtree vertex struct (and every else I need) for each pass manually (instead of using #include SpeedTreeCommon.cginc). Looks horrible haha :D
I think we will just make our own custom shader by hand, if at some point you want to make a template that will use speedtree, that will be great !
cAyou
 
Posts: 39
Joined: Mon Oct 29, 2018 7:12 pm

Re: SpeedTree template

Postby Amplify_Borba » Thu Jan 17, 2019 10:04 am

You are correct, it would take considerable effort to implement.

We do have the request for a Speedtree compatible template registered, hopefully we can tackle it in the near future, thank you for your feedback!
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 0 guests

cron