Page 1 of 1

Alembic motion vector flag

PostPosted: Thu Apr 05, 2018 1:58 pm
by matthewwr
Hello again!

This might be a simple question, apologies if it is, I tried a bunch of things but I'm probably missing something obvious.

All of the shaders I am building are applied to alembic models, and to get correct motion vectors, I need to add the following line of code under the SubShader flag:

UsePass "Hidden/Alembic/MotionVectors/MOTIONVECTORS"

I am currently going into the generated amplify shader code and placing this command every time I modify my shader, is there a place I can add it in the amplify graph, or shader commands so I don't have to go into the code every time? :?

Thanks for the help!

Matt

Re: Alembic motion vector flag

PostPosted: Thu Apr 05, 2018 2:27 pm
by Amplify_Borba
Hey there, if you're using a standard surface shader, you'll have to add it manually after compiling.

Unfortunately, the only alternative would be to use a Shader Template, which would provide all the flexibility you need to add your own custom passes.

Please let me know if this helps, thanks!

Re: Alembic motion vector flag

PostPosted: Thu Apr 05, 2018 3:09 pm
by matthewwr
Interesting functionality! I'll give it a shot, it might even help me with some other issues I've been having. Thanks for the info once again!

Matt

Re: Alembic motion vector flag

PostPosted: Thu Apr 05, 2018 4:22 pm
by Amplify_Borba
We do recommend using Shader Templates for custom shader types, feel free to check out our samples provided with the ASE package in the AmplifyShaderEditor > Examples > Official > TemplateExamples folder.

We've also recently introduced multi-pass support to our templates, more information in the wiki page!

Don't hesitate to let me know if you have any further questions, thanks!