Jump to content

Recommended Posts

Hello

i think it must be a general question, but after many tests, I have achieved nothing, so

in geo context i have Cd attr (red color on box)
How import color into my material vopshop network

the final image should be a half red/white cube


in attached file simple
example of what I mean       Cd_import.hip

 

Link to comment
Share on other sites

in shops, there's a specific vop called "shading layer parameter" which lets you access color, alpha and uvs.  but more generally, if you have an attribute on your geometry, you can access that my creating a parameter in your vop with the same name and type ("Cd", vector).  you can make it invisible in the parm ui so it doesn't show up like a normal parm.

 

any shader parm that exists on your geometry will be grabbed from the geo for each point being shaded.  this even works for standard materials -- you can override per vertex any shading parm by creating an attribute on your geometry with the appropriate name.

Link to comment
Share on other sites

thanks! this nodes work, but what if i want grab color not from the main branch as in my example

 
I tried to use getAttrib but it did not go

 

 

i see.  yeah, well, one issue is that you can't do op: references in shaders.  sadly, houdini doesn't pass those references down thru the ifd and into mantra, so mantra has no idea what to do with that file reference.  also, the get attrib vop needs to know the prim and point number, which isn't available in for the current position being shaded.

 

if you wan to grab color from some other piece of geo at render-time, i would suggest looking into point clouds.  (edit: like robert said above if i'd read ahead)

Edited by fathom
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

in shops, there's a specific vop called "shading layer parameter" which lets you access color, alpha and uvs.  but more generally, if you have an attribute on your geometry, you can access that my creating a parameter in your vop with the same name and type ("Cd", vector).  you can make it invisible in the parm ui so it doesn't show up like a normal parm.

 

Is "shading layer parameter" gone, I try to assign Cd to a material in order to bring it into C4D?

 

Many thanks, Robert

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