Jump to content
thoma.v

Oriented Bounding Box of Polygon Face

Recommended Posts

Hi folks!
In VEX I can import the axis-aligned bounding box of a single polygon face with primintrinic(). Is there anything I can do to get the oriented bounding box too?
The reason for this is that I'd like to project UVs onto the face according to the bounding box orientation. The long side should be U and the short V.
Any ideas?

ps: FOREACH does not work for me. It's simple to slow!

Share this post


Link to post
Share on other sites

hi,

why don't you just use UV Unwrap SOP? it has two inputs, if you feed an oriented bounding box (bound SOP) in the second one it will act as an oriented box projection.

Share this post


Link to post
Share on other sites

Hey David,

thanks but unfortunately this won't work. I need to assign the UVs to a large mesh, for every frame and hence I'd like to avoid the FOREACH SOP. Is there anything else I could try?

Share this post


Link to post
Share on other sites

sure there is a way in VEX but I have never explored that route.

Share this post


Link to post
Share on other sites

take a look at the attached file. its using vex to compute the oriented bounding box around prims.

hth.

petz

 

obb.hipnc

  • Like 5

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

×