Jump to content

Access Primitives in Y axis ?


CinnamonMetal

Recommended Posts

A.) don't use a for-each to loop over all primitives, use a primitive wrangle. they inherently loop over all primitives.

B.) assuming you have vertex or point normals already, before the wrangle, promote N to a primitive attribute.

C.) in your prim wrangle, compute dot(@N, {0,1,0}). something like this:

float d = dot(@N, {0,1,0});

float threshold = 0.75; // closer to 1.0 = more sensitive

if(dot > ch("threshold")) {

    // do whatever

}

 

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