Jump to content

Layer Material


Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. :P

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 9 months later...
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?

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...