ykcosmo Posted April 17, 2007 Share Posted April 17, 2007 hi everyone, I have an object with surface and displacement shader. I want it to be the lambert shader on the base layer, and the blinn on the displaced part. how to do such layer material in vop? Quote Link to comment Share on other sites More sharing options...
Jordan Posted April 17, 2007 Share Posted April 17, 2007 hi everyone, I have an object with surface and displacement shader. I want it to be the lambert shader on the base layer, and the blinn on the displaced part. how to do such layer material in vop? erm.. u may want to try to create a composite shader by using such vop like ADD. Step01- create your base layer with lighting_model_vop which allow you to assign lambert. Step02- assign a add_vop and pipe your lambert ouput to the add_vop first input. Step03- assign another lighting_model_vop for your displacement blinn layer. Change the diffuse and ambient color to black and keep only its specular color to white. Assign a displace_along_normal_vop and normalize the P and N vector and pipe it to the blinn layer. Step04- pipe the output of your second lighting_model_vop to the second input of your add_vop. Step05- pipe the ouput of your add_vop to CF. That's it. enjoy doing your shader. j. Quote Link to comment Share on other sites More sharing options...
ykcosmo Posted April 17, 2007 Author Share Posted April 17, 2007 the lighting model vop has no p to connect with the displace along normal vop...... the problem is how to bring displacement shader into surface shader? I know rsl can do displacement within surface shader, how about vex or vop? Quote Link to comment Share on other sites More sharing options...
stu Posted April 17, 2007 Share Posted April 17, 2007 So, you want to change the shader only in those areas that are being displaced? Why not build a shader that does a mix based on the same texture map that you're using to displace the geometry with a separate displacement shader? Quote Link to comment Share on other sites More sharing options...
DaJuice Posted April 18, 2007 Share Posted April 18, 2007 What stu said. There's more than one way to go about it, but here's an example. I just used the displace pattern to mute the specular highlights on the flat parts. It looks the same as lambert, and is neater since you only use one lighting model vop. Small clip: http://www.pixelheretic.com/misc/mixshader.mp4 mixshader.zip Quote Link to comment Share on other sites More sharing options...
edward Posted April 18, 2007 Share Posted April 18, 2007 Another possibility although I've never tried is to export the data (via an exported parameter) from the displacement shader and then use dimport() (aka Import Displacement Variable VOP) in the surface shader. Quote Link to comment Share on other sites More sharing options...
DaJuice Posted April 18, 2007 Share Posted April 18, 2007 Another possibility although I've never tried is to export the data (via an exported parameter) from the displacement shader and then use dimport() (aka Import Displacement Variable VOP) in the surface shader. Check the shader I posted Edward. Quote Link to comment Share on other sites More sharing options...
alienox Posted April 18, 2007 Share Posted April 18, 2007 hi everyone, I have an object with surface and displacement shader. I want it to be the lambert shader on the base layer, and the blinn on the displaced part. how to do such layer material in vop? Not sure if this helps... displace.hipnc Quote Link to comment Share on other sites More sharing options...
ykcosmo Posted April 19, 2007 Author Share Posted April 19, 2007 thanks everyone:)that's what I want:) Quote Link to comment Share on other sites More sharing options...
MADjestic Posted April 19, 2007 Share Posted April 19, 2007 thanks everyone:)that's what I want:) And, what you likely know already, although the mighty and the terrible have already torn this post apart, a little side note. It's not a problem to use displacement in your Surf Shader. You can use your displacement shaders code\network easily as well (copy'n'paste em or export-import variables), actually in any context where it makes sense. Quote Link to comment Share on other sites More sharing options...
Dennis Sedov Posted January 21, 2008 Share Posted January 21, 2008 Sorry to bring this topic up, but I still dont get how to export params from displace shader into surface shader so I would get one material that does both color and displacement. Sorry for my stupidity, but I would appreciate a step by step guide. Quote Link to comment Share on other sites More sharing options...
Jason Posted January 22, 2008 Share Posted January 22, 2008 Sorry to bring this topic up, but I still dont get how to export params from displace shader into surface shader so I would get one material that does both color and displacement. Sorry for my stupidity, but I would appreciate a step by step guide. Would you like a guide in VOPs? Or native VEX? Quote Link to comment Share on other sites More sharing options...
Dennis Sedov Posted January 22, 2008 Share Posted January 22, 2008 Would you like a guide in VOPs? Or native VEX? VOPs would be perfect. I am not too much in VEX. Also if I built in with VOPs I can see the VEX after it =) 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.