ShaderFX and outputing results to Redshift/Arnold

ShaderFX and outputing results to Redshift/Arnold

dkrelina
Advocate Advocate
5,017 Views
10 Replies
Message 1 of 11

ShaderFX and outputing results to Redshift/Arnold

dkrelina
Advocate
Advocate

I'm working with ShaderFX to create custom animated textures. I've made a set of nodes that outputs animated RGB and Grayscale values. I would like to pass the results of these nodes back into Maya to connect to a set of Redshift or Arnold shaders for rendering with raytracing.

 

My goal is to use ShaderFX/hardware rendering as a sort of previz tool for shader development and pass the results back to Redshift or Arnold for the production renders. Is it possible to make certain channels from ShaderFX visible to Maya? I see that you can "Expose" certain incoming values (ex. float, color, bool, etc.) but not outgoing ones.

 

Maybe another way to access the outgoing results would be to save the ShaderFX graph as custom code (GLSL, HLSL, etc.) and then re-import into Maya, perhaps through a script? How would this be done?

 

Cheers!

Accepted solutions (1)
5,018 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable

I'm wondering the exact same thing. ShaderFX has a vertex color node which I'd love to use except I can't output the ShaderFX node into the input, say a color map, of a regular maya shader.

Message 3 of 11

dkrelina
Advocate
Advocate

Thanks @Anonymous. Have you had any further luck with this? I'm still really interested in sending results from ShaderFX to Maya to use with other renderers. I had a look at the ShaderFXShader node in the Hypershade again. There's only one OutColor channel. It would be great if there was a way of outputting multiple custom channels.

 

Let's give a shout to @mspeer. He usually has something insightful to say 🙂

 

Does anyone else have deeper knowledge of ShaderFX and adding custom output channels?

0 Likes
Message 4 of 11

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

@dkrelina and @Anonymous.

 

Sorry, but it does not work that way.

A renderer does not simply take Maya calculated output values and feed this into further rendering.

All the nodes used have to be supported by the renderer.

 

So the workflow should be done the other way around.

1. Choose a renderer.

2. Build a network with supported nodes (and use native materials of the renderer for best results).

(3. Only if needed add parts of the network to a GPU shader for preview inside Maya.

With Arnold for example you can set one shader for rendering and an other for Viewport display, based on the used Input connections at the same Shader Group)

Message 5 of 11

dkrelina
Advocate
Advocate

Thanks @mspeer for clearing this up.

 

My interest in ShaderFX was initially due to realtime feedback in the displacement tessellation. I was intrigued by the possibility of creating high-detail models/surfaces and seeing results in the Viewport in realtime. My past experience working with Arnold/Redshift with displacements was quite time consuming, spending long amounts of time waiting for the results to calculate (especially for displacements with animation). ShaderFX gives you the results immediately.

 

As I started learning ShaderFX, I found it to be a superior tool in my workflow for the following reasons:

  1. Real-time displacement tessellation (visible in the Viewport, both animated and static).
  2. Near-final results in diffuse, glossy, reflections, visible in the Viewport.
  3. Ability to work with a diverse range of simple math nodes (sine, exponent, mod, floor, etc.) give you higher degree of design control.
  4. Ability to work with code control nodes (if-else, repeat loops, input checking, etc.) allowing you to build graphs in a modular way.
  5. Ability to work with custom code.
  6. Ability to save Group Nodes and access them in the library to re-use in other projects.

If I were to work with either Arnold or Redshift, I assume that I would need to re-build my nodes in the Hypershade using Maya's default nodes. Is this correct? Is it possible to connect the result from Maya's default nodes to a ShaderFX shader and then see the results in the Viewport in real-time? For example, to preview real-time displacement?

 

Thanks!

Message 6 of 11

mspeer
Consultant
Consultant

Hi!

You can't connect other shaders to ShaderFX.

ShaderFX creates GPU shaders as used in Game Engines or Viewport, you can't, and don't want to, mix this with other stuff, this would make them useless and every speed advantage would be gone.

ShaderFX makes only sense if you only use GPU shaders for the complete project.

 

Here i can preview an animated displacemed object with 80 fps for a Maya or Arnold material in Maya Viewport.

The Maya and Arnold shaders will already be translated to GPU shaders to be visible in Viewport (if supported).

However to see the final result and work without any limitation you have to choose your main renderer for rendering.

 

You can rebuild your networks with the shaders supported by the renderer you use, and you can also export and re-import these networks. There are also a wide range of Utility nodes available to achieve what you want.

Message 7 of 11

dkrelina
Advocate
Advocate

Thanks, how are you managing to see the real-time displacement with an Arnold shader? Do you connect displacementShader.displacement >to> aiStandardSurfaceSG.displacementShader ? Are you adding subdivisions to the mesh or is the displacement done another way?

0 Likes
Message 8 of 11

mspeer
Consultant
Consultant

Hi!

It looks like you missed the update for Smooth Mesh Preview in Maya 2017 Update 3:

http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=GUID-50A6338F-ACBE-472C-9C81-D1820CD61048

 

Yes, you need to connect to the displacement Attribute in the Shading Group.

0 Likes
Message 9 of 11

dkrelina
Advocate
Advocate

That looks like a nice feature. I will have to look into it.

 

Regarding building custom node graphs within Maya's Hypershade, is it possible to save a selection of nodes as a Published Asset/Group Node? (in the same way as in ShaderFX?) I find this way of working, with nested nodes and functions to be quite intuitive and organised. What kind of workflow do you recommend?

0 Likes
Message 10 of 11

mspeer
Consultant
Consultant

Hi!

 

Yes, you can create an Asset.

However, there are currently no grouping and nesting possibilities in Node Editor, but using Bookmarks + multiple tabs helps.

Message 11 of 11

dkrelina
Advocate
Advocate

Thanks @mspeer! You saved my day once again!

 

giphy

0 Likes