CinnamonMetal Posted October 8, 2018 Share Posted October 8, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted October 9, 2018 Share Posted October 9, 2018 RMB on the vops and look at the vex code. It should line up extremely similar. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 9, 2018 Author Share Posted October 9, 2018 @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 ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted October 10, 2018 Share Posted October 10, 2018 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. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 10, 2018 Author Share Posted October 10, 2018 Simple shaders for diffuse ? What do you mean multiple color by the bsdf ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted October 11, 2018 Share Posted October 11, 2018 (edited) 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 October 11, 2018 by LaidlawFX Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 12, 2018 Author Share Posted October 12, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted October 14, 2018 Share Posted October 14, 2018 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 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. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 14, 2018 Author Share Posted October 14, 2018 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 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 Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted October 22, 2018 Share Posted October 22, 2018 So another not answer, answer that should help you. Just getting back into life again. I went from France back to the US. Oh the fun. Attached is RenderExport.hip It's a simple setup that show the variables flowing from sops to materials to mantra. It has a grid with an array of attributes P, N, uv, rest, foo. Foo is just a relative attribute as it could be anything, in this case is just a copy of the UV attribute. A material shader builder that imports them with an array of nodes that you can cross wire to see how they work. It purposely does not use any of the components of the principled shader core so you can see how the info flows. If you want you can assign the principled shader core and keep unlocking the hdas and deleting the components that don't matter until you get down to these basic components. This was roughly how the shader were written in H9-H14 or so, and at that time was when the transition was easiest from Renderman to Mantra as the 1 to 1 was very apparent. The shader core make that switch a lot harder to see. Which is why most of what I am saying is complete non-sense, besides the fact that I am not actually answering your question directly. lol. There are 4 mantra ROPs each set to the different render engine so you can flip between them and see how the shading works. Also there are a series of different BSDF connections you can make to see those basic components. The easiest way to answer is to keep cross wiring that setup until you understand it. Then the direct RSL conversion will make sense. This way you can see how the data flows across the different components of Houdini. At any point you can RMB and see the VEX of those compiled connections. You can switch between the different render engine no matter what, but you will notice the shading is different due to the inherit difference between the PBR shading, raytrace shading, and micropolygon shading. Look at the fooExported bind export vop and the mantra rop extra image planes and you can see how the variables get passed to the render engine. So now when you look in the Compute Lighting vop you can see how all those connections are made. And how BSDF is broken into it's sub-components to be read by mantra. Apologies again for presenting more a small lego set than an answer. This should help you more. It was the biggest issue going from Mental Ray and Renderman to Mantra. It's that key difference maker, that makes it make sense. RenderExport.hip 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.