Jump to content

Mantra surface Globals VOP


rjpieke

Recommended Posts

I'm trying to build some Mantra shaders using VOPs ... and didn't get very far before coming up with my first "Am I missing something? Or, if not, why did SESI design it this way?" question.

Specifically, the Globals VOP ... it indicates (to me) that Cf and Af are inputs to the surface shader. But where would values for these come from if only the displacement shader runs before the surface shader? In SOP and POP land, colour and alpha end up in Cd and Alpha. So in my custom shader, I have to create Parameter VOPs to pull these in. Why wouldn't they be in the Globals VOP instead?

I think I've become a bit too RenderMan-focused these past years, so I don't yet understand/appreciate some of Mantra's differences :)

Link to comment
Share on other sites

I'm trying to build some Mantra shaders using VOPs ... and didn't get very far before coming up with my first "Am I missing something? Or, if not, why did SESI design it this way?" question.

Specifically, the Globals VOP ... it indicates (to me) that Cf and Af are inputs to the surface shader. But where would values for these come from if only the displacement shader runs before the surface shader? In SOP and POP land, colour and alpha end up in Cd and Alpha. So in my custom shader, I have to create Parameter VOPs to pull these in. Why wouldn't they be in the Globals VOP instead?

I think I've become a bit too RenderMan-focused these past years, so I don't yet understand/appreciate some of Mantra's differences :)

I've never used them before; so feel free to ignore them:). Perhaps these are the equivalents to the Renderman Cs and Os? Which are what, anyway?

Link to comment
Share on other sites

I'm trying to build some Mantra shaders using VOPs ... and didn't get very far before coming up with my first "Am I missing something? Or, if not, why did SESI design it this way?" question.

Specifically, the Globals VOP ... it indicates (to me) that Cf and Af are inputs to the surface shader. But where would values for these come from if only the displacement shader runs before the surface shader? In SOP and POP land, colour and alpha end up in Cd and Alpha. So in my custom shader, I have to create Parameter VOPs to pull these in. Why wouldn't they be in the Globals VOP instead?

I think I've become a bit too RenderMan-focused these past years, so I don't yet understand/appreciate some of Mantra's differences :)

I think the VOP simply grabs all variables which are read-able in the context. If they are read before they are written, the value seems to be 1.0.

The output VOP is the list of variables which are write-able.

Link to comment
Share on other sites

I think the VOP simply grabs all variables which are read-able in the context. If they are read before they are written, the value seems to be 1.0.

Is there a case when incoming Cf/Of would not be 1.0? eg. set by a property or perhaps the render might have a reason to affect transparency?

Not that Mantra supports it, but I was thinking in the case of LODs where there might be a crossfade between two models (at the LOD transition zone), Mantra might want to request a shader to fade out by setting incoming Of. In a way this'd allow a shader-writer to define how the fade-out and fade-in happen.

Thanks,

Jason

Link to comment
Share on other sites

  • 4 weeks later...

Cf and Of are not the equivellant of Cs and Os. Cs and Os are actually editable parameters (you can access them through the edit parameter interface) wheras there is no way to edit Cf and Of.

These simply exist in Mantra as a way for the shader to render something in the event that you have not explicitly attached anything.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...