select points in front of camera

   8942   5   2
User Avatar
Member
53 posts
Joined: June 2009
Offline
hi everyone.
i want to create a group of points that i view in each frame or a group of points that are in front of camera.

does Houdini have a tools or trick to do that?
User Avatar
Member
1529 posts
Joined: July 2005
Offline
you can use the uvtexture sop to project a uvset from the camera.

- “perspective from camera”
- select your cam

in a group sop select group ‘by expression’

$MAPU >= 0 && $MAPU <= 1 && $MAPV >=0 && $MAPV <= 1

Best,

G
User Avatar
Member
53 posts
Joined: June 2009
Offline
that's nice, but has a problem.

points that are in back of the camera, selected too :shock:

like this :

http://www.freeimagehosting.net/image.php?57c27dc12b.jpg [freeimagehosting.net]
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
This expression works:

$MAPU>0&&$MAPU<1 && $MAPV>0&&$MAPV<1 && $MAPW>0&&$MAPW<1

You also have to manage the w depth component (which is “real” handy btw).

Make sure that the UV Texture SOP is set to point mode and the same for the Group SOP that this expression is being typed in to.

All the points in the camera frustrum should be picked up with this expression. Try feeding in a box SOP with a lot of divisions.
There's at least one school like the old school!
User Avatar
Member
53 posts
Joined: June 2009
Offline
thanks jeff and keyframe.
User Avatar
Member
26 posts
Joined: Dec. 2010
Offline
Thank You Guys

There my Version Selection Points From Camera for Houdini 17 + Promotion for Primitives and Colorize
Edited by cool1986vfx - Feb. 25, 2019 15:22:22

Attachments:
Camera_select_Points.hip (196.6 KB)
Camera_Selection.JPG (173.6 KB)

  • Quick Links