Jump to content
CinnamonMetal

Renderman Shading Language guru ?

Recommended Posts

I'm looking for someone who has some old school renderman shading language knowledge along with shading in VOPS in Houdini.  As I'm having a hard time trying to figure out what I'm doing wrong in VOPs with regards to translating my code as an exercise; surely everyone can't be throwing their renders to redshift etc for rendering ?

 

Share this post


Link to post
Share on other sites

RMB on the vops and look at the vex code. It should line up extremely similar.

Share this post


Link to post
Share on other sites

@LaidlawFXI assume you a familiar with RSL, as I updated my attempts at understanding here. I don't understand why I'm not atleast getting a color on the grid, I honestly can't find what I'm doing wrong, if anything is wrong ?

Share this post


Link to post
Share on other sites

Your best bet is to deconstruct a mantra shader to see what it is doing. VEX and RSL are similar but mantra and renderman both have their quirks that make them different. 

With pbr your color output with no lighting is called emission. Look at some of the simpler shaders like diffuse to see an example. Otherwise just multiply color by the bsdf. 

Share this post


Link to post
Share on other sites

I'm in transit for the next few days, so no Houdini in front of me. Edit... Unless realtors are being a pain in the arse...

So the way I transitioned from the two languages I started with basic shaders. The new physical models are far more complex now adays, than when I switched. To find a simple example go to the material library and drop down a basic diffuse. Then go check it out in vops.

So one of the biggest first bumps is to render a constant shader in mantra. There are 4 combination of render engine unlike renderman last I worked with it. The default option on Mantra is not PBR, but raytrace. The main difference as far as shading with these render engines, is they are a combination of two geometry processes and for practical purposes will say two shading methods. Raytrace, and micropolygon are the geometry processes, and the non-pbr and PBR methods are for shading. So it's important to place a mantra rop and change the render engine so you can shade correctly when developing such as you are.

For PBR to make a constant shader wire a parameter or constant into a bind export called Ce (i.e emission). In the basic diffuse example this is contained in the Compute lighting vop, which is really just a custom export vop for mantra myriad render layers.

For PBR to make a diffuse with color. Take a Lambert vop that exports a f (bsdf) the yellow wire and multiple it with the color from a constant or parameter vop into the output parameter and variables.

For a non-pbr shader to make a constant shader wire a constant or parameter into the color (Cf) on the output parameters and variables vop.

For a non-pbr shader to make a diffuse shader wire the color from the lambert vop and multiple it with the color from a constant and parameter color and then wire it into the color (Cf) on the output parameters and variables vop.

Sorry for the basic, it's actually the one of the biggest gotcha when switching between the two. The harder stuff is actually easier.

Edited by LaidlawFX

Share this post


Link to post
Share on other sites
15 hours ago, LaidlawFX said:

For PBR to make a constant shader wire a parameter or constant into a bind export called Ce (i.e emission). In the basic diffuse example this is contained in the Compute lighting vop, which is really just a custom export vop for mantra myriad render layers.

For PBR to make a diffuse with color. Take a Lambert vop that exports a f (bsdf) the yellow wire and multiple it with the color from a constant or parameter vop into the output parameter and variables.

For a non-pbr shader to make a constant shader wire a constant or parameter into the color (Cf) on the output parameters and variables vop.

For a non-pbr shader to make a diffuse shader wire the color from the lambert vop and multiple it with the color from a constant and parameter color and then wire it into the color (Cf) on the output parameters and variables vop.

Sorry for the basic, it's actually the one of the biggest gotcha when switching between the two. The harder stuff is actually easier.

I assume you are leading up to the answer to my question ? :) From my previous post.

15 hours ago, LaidlawFX said:

For PBR to make a constant shader wire a parameter or constant into a bind export called Ce (i.e emission). In the basic diffuse example this is contained in the Compute lighting vop, which is really just a custom export vop for mantra myriad render layers.

I know that compute lighting works for all types of engines within Mantra :) For the first example, once this is done, where should it plug the bind into Ce of compute lighting ? Otherwise, when creating the Ce attribute is it of color, but if I must connect it to Cd of compute lighting, it doesn't match ?

 

Share this post


Link to post
Share on other sites
On 10/11/2018 at 6:38 PM, CinnamonMetal said:

I assume you are leading up to the answer to my question ? :) From my previous post.

I know that compute lighting works for all types of engines within Mantra :) For the first example, once this is done, where should it plug the bind into Ce of compute lighting ? Otherwise, when creating the Ce attribute is it of color, but if I must connect it to Cd of compute lighting, it doesn't match ?

 

Country hoping ain't easy, and is very time consuming, lol.

Compute Lighting does a lot of the old black magic internal to it so you don't have to think about it. It's just and hda so you can see how everything is split up inside. The key part is you don't need to plug Ce into anything. The Bind parameter/option to use as an export option from the parameter is all you need. That is what passes the value to mantra, or better said what mantra is looking for from the compiled shader. So if you dive into the compute lighting you'll see many of those "dead ends" for parameter vops. Their names will correspond to the Mantra Extra Image planes vex varriables. For the standard ones they are just toggle boxes now a days. But to understand it you can make a custom variable called foo in your shader and add the extra image plane and the vex variable called foo. Not what you are after I know. I have not directly answered your question :P Trying to point out the flow from the basics. Once you get those humps the  rest is quite easy. 

Cd is only the term as deifned in SOPs. Once you get in to the material land Cd is only used as a bind import and then multiplied against some other variable. Then they stop using the term Cd anywhere else in that context. Cd used to mean Color Diffuse, but that logic is long gone in the age of albedo and PBR. Legacy YEAH! If you really want you could call your SOPs attribute Albedo to make it easier and instead of importing Cd, you import albedo for instance. You won't see the color in the viewport with Cd, but it's more of an understanding of the oddity of Mantra versus Renderman than anything practical.

Hopefully, my non-answer answer makes more sense now, lol.

Share this post


Link to post
Share on other sites

Country hoping is not easy, I assume within the European Union; or did you take a plane outside of Europe ? ;)

If you don't use compute lighting vop, if I understand correct; you can switch between the sub-renders within Mantra, correct ? :) 

42 minutes ago, LaidlawFX said:

But to understand it you can make a custom variable called foo in your shader and add the extra image plane and the vex variable called foo. Not what you are after I know. I have not directly answered your question :P Trying to point out the flow from the basics. Once you get those humps the  rest is quite easy. 

Create a parameter/variable within the compute lighting vop ? I too am accustomed to use diffuse, recently understanding the new method, which as you mentioned is Albedo :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×