squardis 2 Posted October 5, 2016 Hi, Once Upon a time far far back in the old houdini, I saw a example of someone clipping all the point that are not in the viewport. Now I know it is possible with volumes. but I need a node / way that does that on points (for example Instances) Does anyone know? THNX Share this post Link to post Share on other sites
dimovfx 48 Posted October 5, 2016 With Volume SOP you can create Volume based on Camera View. Then you can use Gourp SOP with Bounding Volume to isolate points inside Camera Frustum. Share this post Link to post Share on other sites
iamyog 59 Posted October 5, 2016 in an attribWrangle: vector _ndc = toNDC("/obj/cam1", @P); float _errorx = ch("errorx"); float _errory = ch("errory"); float _errorz = ch("errorz"); if ((_ndc[0] < 0 - _errorx) || (_ndc[0] > 1 + _errorx)) removepoint(geoself(), @ptnum); if ((_ndc[1] < 0 - _errory) || (_ndc[1] > 1 + _errory)) removepoint(geoself(), @ptnum); if ((_ndc[2] > 0 + _errorz)) removepoint(geoself(), @ptnum); update the path to your camera, then set your error margins accordingly 5 1 Share this post Link to post Share on other sites
squardis 2 Posted October 5, 2016 I cant try it at the moment rightnow but if you scatter point I think it breaks becouse there is no volume am I right? Share this post Link to post Share on other sites
davpe 188 Posted October 5, 2016 you're not. the volume is created out of camera frustrum and used as a mask for grouping points. 1 Share this post Link to post Share on other sites
squardis 2 Posted October 5, 2016 38 minutes ago, iamyog said: in an attribWrangle: vector _ndc = toNDC("/obj/cam1", @P); float _errorx = ch("errorx"); float _errory = ch("errory"); float _errorz = ch("errorz"); if ((_ndc[0] < 0 - _errorx) || (_ndc[0] > 1 + _errorx)) removepoint(geoself(), @ptnum); if ((_ndc[1] < 0 - _errory) || (_ndc[1] > 1 + _errory)) removepoint(geoself(), @ptnum); if ((_ndc[2] > 0 + _errorz)) removepoint(geoself(), @ptnum); update the path to your camera, then set your error margins accordingly Is this a quicker approche in multithreading than the rest? And where to put this? ( wrangles are getting better and better, but still learning) Share this post Link to post Share on other sites
squardis 2 Posted October 5, 2016 6 minutes ago, davpe said: you're not. the volume is created out of camera frustrum and used as a mask for grouping points. Thanx!!! It works!!! straighth from my mobile and teamviewer and ofcourcse a big thnx to you guys!!! Share this post Link to post Share on other sites
davpe 188 Posted October 5, 2016 you're welcome. wrangle solution seems to be more elegant though. and will definitely perform faster with lots of geometry. Share this post Link to post Share on other sites