Deviner Posted September 2, 2014 Share Posted September 2, 2014 Helloi think it must be a general question, but after many tests, I have achieved nothing, soin geo context i have Cd attr (red color on box)How import color into my material vopshop networkthe final image should be a half red/white cubein attached file simple example of what I mean Cd_import.hip Quote Link to comment Share on other sites More sharing options...
fathom Posted September 2, 2014 Share Posted September 2, 2014 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. Quote Link to comment Share on other sites More sharing options...
Deviner Posted September 3, 2014 Author Share Posted September 3, 2014 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 Quote Link to comment Share on other sites More sharing options...
Robert Posted September 3, 2014 Share Posted September 3, 2014 If you want to use attributes from other geometry sources you could transfer the attributes to the geometry you are shading or you could access the attributes with point cloud nodes in the material. Quote Link to comment Share on other sites More sharing options...
fathom Posted September 3, 2014 Share Posted September 3, 2014 (edited) 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 September 3, 2014 by fathom 1 Quote Link to comment Share on other sites More sharing options...
Deviner Posted September 5, 2014 Author Share Posted September 5, 2014 point cloud works wellThanks for the replies! Quote Link to comment Share on other sites More sharing options...
VisualConduct Posted February 16, 2016 Share Posted February 16, 2016 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 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.