Jump to content
Sign in to follow this  
JJ FX

get prim normal

Recommended Posts

JJ FX    3

Hi,

trying to get the normal of the specific prim. However wrangle complains thats the wrong syntax.

vector norm;
getattribute(geoself(), norm, "primitive", "N", 0);

 

Share this post


Link to post
Share on other sites
Sepu    69

You can use the prim function instead if that isnt working. 

 vector norm;
norm = prim(0, "N", 0);

 

Share this post


Link to post
Share on other sites
JJ FX    3

oh I was looking for sth like this.

Actually when I used this, wrangle still complained for wrong syntax. Had to create new wrangle. And now both examples work.

So Im wondering. Do wrangles cache the code?

Edited by JJ FX

Share this post


Link to post
Share on other sites

There is a dedicated function called prim_normal() which returns the normal at a specific prim UV coordinate of any requested primitive.

Edited by konstantin magnus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×