rjpieke Posted March 20, 2009 Share Posted March 20, 2009 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 Quote Link to comment Share on other sites More sharing options...
Jason Posted March 21, 2009 Share Posted March 21, 2009 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? Quote Link to comment Share on other sites More sharing options...
crunch Posted March 21, 2009 Share Posted March 21, 2009 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. Quote Link to comment Share on other sites More sharing options...
Jason Posted March 21, 2009 Share Posted March 21, 2009 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 Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted April 14, 2009 Share Posted April 14, 2009 (edited) This also applies for VOP VEX Light SHOPs where the Cl variable shows up in the Globals VOP. Personally, I've always enjoyed emitting uninitialized variables into the scene. Edited April 14, 2009 by Wolfwood Quote Link to comment Share on other sites More sharing options...
Allegro Posted April 14, 2009 Share Posted April 14, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.