Jump to content

promote via wrangle


Follyx

Recommended Posts

Drop down an attribute wrangle that runs over primitives.

Fetch the value using the point function and assign it to a new attribute.

f@my_promoted_attrib = point(0,"my_point_attrib",0);

You may notice the problem with this, however. I am fetching the attribute from point zero. So to do it right, you would have to loop over all the points for a given primitive and then average them to produce a single result.

It just make more sense to use the provided attributePromote node.

Link to comment
Share on other sites

from a point wrangler you can do this :

Quote

setprimattrib(0, "promoted_prim_attribute_name", @primnum, v@point_attribute, "set");

Instead of "set", you can also put:
add,min, minimum,max, maximum,mult, multiply,toggle,append.

 

 

 

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