I'm trying to cull faces that live completely outside of a camera frustrum, but unsure where to start.
I'm splitting/grouping a scene using two cameras. If I use the uvtexture->attribvop->delete method by tagging points in the camera frustrum, it can often miss a face/primitive that has points in both of the cameras.
Is there a different method that could produce the desired effect?
Cull faces outside of camera view
5833 2 1-
- alfyou
- Member
- 18 posts
- Joined: Dec. 2018
- Offline
-
- shadesoforange
- Member
- 203 posts
- Joined: July 2015
- Offline
I have this code as one of my presets on the wrangle:
This culls points, but can easily be restructured to be on faces.
Maybe this helps you?
vector ndc = toNDC(ch("camNode"),@P); float ov = chf("padding"); if(ndc[0]-ov<0||ndc[0]+ov>1||ndc[1]-ov<0||ndc[1]+ov>1||ndc[2]>0) { removepoint(0,@ptnum); }
This culls points, but can easily be restructured to be on faces.
Maybe this helps you?
Manuel Köster - Senior Technical Artist @Remedy Entertainment
https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
https://www.remedygames.com/ [www.remedygames.com]
http://shadesoforange.de/ [shadesoforange.de]
https://twitter.com/ShadesOfOrange_ [twitter.com]
-
- MilanB
- Member
- 161 posts
- Joined: Nov. 2018
- Offline
-
- Quick Links


