squardis Posted October 5, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
dimovfx Posted October 5, 2016 Share 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. Quote Link to comment Share on other sites More sharing options...
iamyog Posted October 5, 2016 Share 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 Quote Link to comment Share on other sites More sharing options...
davpe Posted October 5, 2016 Share Posted October 5, 2016 Quote Link to comment Share on other sites More sharing options...
squardis Posted October 5, 2016 Author Share 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? Quote Link to comment Share on other sites More sharing options...
davpe Posted October 5, 2016 Share Posted October 5, 2016 you're not. the volume is created out of camera frustrum and used as a mask for grouping points. 1 Quote Link to comment Share on other sites More sharing options...
squardis Posted October 5, 2016 Author Share 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) Quote Link to comment Share on other sites More sharing options...
squardis Posted October 5, 2016 Author Share 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!!! Quote Link to comment Share on other sites More sharing options...
davpe Posted October 5, 2016 Share Posted October 5, 2016 you're welcome. wrangle solution seems to be more elegant though. and will definitely perform faster with lots of geometry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.