Jump to content
Alexey Vanzhula

Getting view 2d rect from 3d geometry

Recommended Posts

you can maybe generate your square in SOPs using toNDC() then bbox and isolate front face then back to object space fromNDC() 

then use hou.GeometryViewport.mapToScreen() to get viewport coordinates of any of it's points

if you have any object level transform you may need to apply it before using mapToScreen()

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, anim said:

you can maybe generate your square in SOPs using toNDC() then bbox and isolate front face then back to object space fromNDC() 

then use hou.GeometryViewport.mapToScreen() to get viewport coordinates of any of it's points

if you have any object level transform you may need to apply it before using mapToScreen()

Thanks! I'll try it.

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

×