Compile times and custom nodes.

Your feedback is very important to us. We are listening.

Compile times and custom nodes.

Postby Hans77 » Mon Dec 03, 2018 10:17 am

I looked around but couldn't find anything definitive. Apologies if this has been covered.

1) Is it relatively easy to create custom nodes via script? If so, could someone direct me to a tutorial, or an already existing node's script and just a few quick steps to get a custom node going? (Or reference me to a specific part in the manual?)

2) After making changes to a node graph (consisting of 1 single color node) on an Unlit shader takes 2 to 3 seconds for the changes to take effect. One of my cohorts claims that Shader Forge was faster w/ compiling changes - though, he didn't actually time the two, he's pretty certain that the same simple node setup would've compiled (or been pre-viewable) quicker in ShaderForge. If this is normal, is there perhaps any way to speed up this re-compile time? Perhaps some kind of setting isn't on, or the pc specs (i7-6700, 16ram, gtx 960) aren't up to snuff?

Thanks for any help!
Hans77
 
Posts: 9
Joined: Wed Nov 07, 2018 2:30 am

Re: Compile times and custom nodes.

Postby Ricardo Teixeira » Mon Dec 03, 2018 11:16 am

Hans77 wrote:I looked around but couldn't find anything definitive. Apologies if this has been covered.

1) Is it relatively easy to create custom nodes via script? If so, could someone direct me to a tutorial, or an already existing node's script and just a few quick steps to get a custom node going? (Or reference me to a specific part in the manual?)

2) After making changes to a node graph (consisting of 1 single color node) on an Unlit shader takes 2 to 3 seconds for the changes to take effect. One of my cohorts claims that Shader Forge was faster w/ compiling changes - though, he didn't actually time the two, he's pretty certain that the same simple node setup would've compiled (or been pre-viewable) quicker in ShaderForge. If this is normal, is there perhaps any way to speed up this re-compile time? Perhaps some kind of setting isn't on, or the pc specs (i7-6700, 16ram, gtx 960) aren't up to snuff?

Thanks for any help!


Greetings,

Thank you for getting in touch we would be happy to help.

1. Depends how comfortable you are with C# and Shader development. We're still working on the Node API documentation but you can check the wiki for additional information.

Node API - Amplify Wiki

2. Compiling varies based on shader complexity, can you share the shader for additional testing on our side? What's your current ASE and Unity version?

Thanks!

PS:I'm going to move this thread to General Discussion.
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Compile times and custom nodes.

Postby Hans77 » Tue Dec 04, 2018 2:00 am

Hello Ricardo,
(By the way, this is Hans W., the one who's been contacting you directly recently)

Thank you very much for the response. I looked at the node API documentation you linked and it is completely sufficient. Thank you! I apologize for not finding it myself. The VFX guy here will reference it and I'll ask some questions if we get stuck. Speaking of which...

Looking at the currently available pin data types, it appears structs aren't supported. Is this true? Was curious if, assuming there currently isn't a way to add a struct pin (input or output), there are plans to add struct pins in the future.


Regarding the compile time>
The node setup I referenced is extremely simple. Just a color (RGB) node plugged into an output node of an Unlit shader.It takes 2 to 3 seconds for the viewport to update once a Color Node is connected or disconnected from the Output Node.

Thanks again!

P.S.
I forgot to write down the Unity and ASE versions:
Unity : 2018.2.14f1
ASE: 1.6.1


One more question:
Is there a way to make a function out of nodes while in the graph editor (of an amplify shader) - like how it can be done in UE4?

Currently, the only way I could find to accomplish something similar is to:
- create an amplify Shader Function via the Unity UI
- then copy paste the nodes you want into it
- delete the nodes in the original
- then drag the newly-created function back in there and wire the inputs and outputs on function back up

I'd assume if UE4-style shader function creation were possible, it'd just add the shader function to the same folder as the Amplify Shader in which it was created.
Hans77
 
Posts: 9
Joined: Wed Nov 07, 2018 2:30 am

Re: Compile times and custom nodes.

Postby Ricardo Teixeira » Tue Dec 04, 2018 6:00 pm

Hans77 wrote:Hello Ricardo,
(By the way, this is Hans W., the one who's been contacting you directly recently)
Thank you very much for the response. I looked at the node API documentation you linked and it is completely sufficient. Thank you! I apologize for not finding it myself. The VFX guy here will reference it and I'll ask some questions if we get stuck. Speaking of which...
Looking at the currently available pin data types, it appears structs aren't supported. Is this true? Was curious if, assuming there currently isn't a way to add a struct pin (input or output), there are plans to add struct pins in the future.
Regarding the compile time>
The node setup I referenced is extremely simple. Just a color (RGB) node plugged into an output node of an Unlit shader.It takes 2 to 3 seconds for the viewport to update once a Color Node is connected or disconnected from the Output Node.
Thanks again!
P.S.
I forgot to write down the Unity and ASE versions:
Unity : 2018.2.14f1
ASE: 1.6.1
One more question:
Is there a way to make a function out of nodes while in the graph editor (of an amplify shader) - like how it can be done in UE4?
Currently, the only way I could find to accomplish something similar is to:
- create an amplify Shader Function via the Unity UI
- then copy paste the nodes you want into it
- delete the nodes in the original
- then drag the newly-created function back in there and wire the inputs and outputs on function back up
I'd assume if UE4-style shader function creation were possible, it'd just add the shader function to the same folder as the Amplify Shader in which it was created.



Hello Hans,

No problem, happy to answer any questions you might have!

Regarding the compilation time, this is actually the time Unity takes to handle the shader(with ASE or without). I'm not sure what could be causing it to take so long on your side, pretty much 1s/instant in my machine. Any additional details we should be aware of?

I'm afraid you can't place structs, we do list the generic OBJECT but it's ignored by most nodes. You can use structs as required but only with Custom Expression nodes.

Can you elaborate on a specific Struct usage that you might require? We would be happy to elaborate on how to achieve it.

Looking forward to additional questions!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Compile times and custom nodes.

Postby Hans77 » Wed Dec 05, 2018 10:49 am

Thank you for the reply.

So we found out the problem for the compile times: disconnected from cache server. Having changed it to local, the compile times are just like Unity.

The VFX guy here however likes how Shader Forge does it, where you can still use the graph interface while it's compiling in the background - so you're never waiting for it to compile before you can dis-/connect stuff.

Also, sorry to bump it, but is it possible to create shader functions from within the graph editor? I was wrong, UE4 doesn't have this ability - where you can select multiple nodes, right click them and convert them to a shader function (that'd prompt you to give it a name, and maybe specify the folder to save the function in, but defaulting to the same directory as the ASE shader the function was created in.) Does that make sense? Seems it could considerably increase workflow speed. But maybe there are some technical limitations that I'm unaware of.

Thanks for any help!
P.S. By all means, let me know if I should change the title of this thread, or maybe move these other questions to a new post. I apologize in advance if this is getting out of control.
Hans77
 
Posts: 9
Joined: Wed Nov 07, 2018 2:30 am

Re: Compile times and custom nodes.

Postby Ricardo Teixeira » Wed Dec 05, 2018 11:08 am

Hans77 wrote:Thank you for the reply.

So we found out the problem for the compile times: disconnected from cache server. Having changed it to local, the compile times are just like Unity.

The VFX guy here however likes how Shader Forge does it, where you can still use the graph interface while it's compiling in the background - so you're never waiting for it to compile before you can dis-/connect stuff.

Also, sorry to bump it, but is it possible to create shader functions from within the graph editor? I was wrong, UE4 doesn't have this ability - where you can select multiple nodes, right click them and convert them to a shader function (that'd prompt you to give it a name, and maybe specify the folder to save the function in, but defaulting to the same directory as the ASE shader the function was created in.) Does that make sense? Seems it could considerably increase workflow speed. But maybe there are some technical limitations that I'm unaware of.

Thanks for any help!
P.S. By all means, let me know if I should change the title of this thread, or maybe move these other questions to a new post. I apologize in advance if this is getting out of control.



Hello,

Thanks for letting us know, not sure if there's anything we can do in regards to that but I'll pass it on the devs.

Not sure what you mean about Shader Forge, do you happen to be using the live preview on ASE?(the green button in the middle next to the save) If so, you can turn it off, use the canvas and save manually without interruptions.

With the live update on it will save every time you make changes to the shader, just like Unreal.

Regarding Shader Functions, that's actually planned and will definitely be a good addition. Just like Unreal Blueprints, the ideia is to be able to collapse networks into single nodes and to generate functions directly in the canvas.

Feel free to ask any question you might have, happy to elaborate!

Thanks!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Compile times and custom nodes.

Postby Ricardo Teixeira » Wed Dec 05, 2018 11:16 am

Hans77 wrote:The VFX guy here however likes how Shader Forge does it,ff.


Just to add to my last reply, if you have not already checked it, it's important to note that ASE works a bit differently from Shader Forge; understanding how the Material and Shader mode work is critical.

Hope it helps!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests