Jump to content

bind into materials


CinnamonMetal

Recommended Posts

You can bind any attribute in a material using Bind or Parameter VOP just like in your do in Attribute VOP SOP

Enumerate SOP doesn't have anything to do with it other that that it can help you create attribute with equivalent values to @ptnum or @primnum or similar per group enumerated values

Link to comment
Share on other sites

8 minutes ago, anim said:

You can bind any attribute in a material using Bind or Parameter VOP just like in your do in Attribute VOP SOP

Enumerate SOP doesn't have anything to do with it other that that it can help you create attribute with equivalent values to @ptnum or @primnum or similar per group enumerated values

I know you can bind any attribute into the material; from my experiments, without the enumerate sop, I can't bind any global attributes which typically reside on the geometry onto the material.

Link to comment
Share on other sites

3 minutes ago, CinnamonMetal said:

What if you wanted to bring in the @primnum and use it within an inline vop within a material ?

as I mentioned before

2 hours ago, anim said:

Enumerate SOP doesn't have anything to do with it other that that it can help you create attribute with equivalent values to @ptnum or @primnum or similar per group enumerated values

so yes, you can use Enumerate to create attribute that will allow you to access value that in CVEX context of Attribute VOP you can access through @primnum

but to do the same you can just create attribute using Prim Wrangle for example: @prim = @primnum;

or in case of accessing primitive number in material, just access it using Get Primitive ID VOP without needing any attribute

Link to comment
Share on other sites

  • 2 weeks later...

@anim The following code is shooting an error, but I'm only writing to color (Cd) within an inline vop, yes; I'm binding in the $prim & $numberid attribute ?

$Cd = 1.0;
if($numberid>2 && $numberid < 6){
    $Cd = {0.4,1.0,0.1};
}else($prim>8 && $prim<12){
    $Cd = {0.2,0.5,0.12};
    }

 

Edited by CinnamonMetal
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...