select points in front of camera

   3669   4   2
User Avatar
Member
33 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
1482 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
33 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
2511 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
33 posts
Joined: June 2009
Offline
thanks jeff and keyframe.
  • Quick Links