shco Posted January 18, 2017 Share Posted January 18, 2017 I am trying to kill displacement when geometry gets a certain distance from camera. I've taken the geo bounds and was able to get that into black/white information in my shader. I am controlling the falloff with a fit range. I can multiply that black/white information against the displacement value and the geometry will not visibly displace. The problem I'm having is that it seems the geometry is still being subdivided in those areas. Anyone know how to kill that geometry creation when the displacement value is 0? Quote Link to comment Share on other sites More sharing options...
davpe Posted January 18, 2017 Share Posted January 18, 2017 (edited) are you talking about the whole objects stop computing displacement at a certain distance or just portions of a huge object that are too far from camera? in the first case you can do this multiple ways either on SOP or SHOP level. just measure how far the object is (distance VOP, for example) and then switch for a simplified shader at the certain threshold. at the second case I'm afraid it is currently not possible unless you split that object into more sections that behave as individual objects. I'm not aware of any renderer allowing you to dial in dynamic per-primitive displacement subdivision. you can only do amount of rendertime subdivision per object. If you want to compute less subdivisions when displacement is near nothing, try increasing Dicing flatness parameter in the object settings (Dicing>Dicing Flatness). that is sort of doing what you want, but again, it affects the whole object everywhere, not only at the distance. it is meant as an optimization tool for increasing performance at the price of lower precision. but it's worth trying. Edited January 18, 2017 by davpe 1 Quote Link to comment Share on other sites More sharing options...
shco Posted January 18, 2017 Author Share Posted January 18, 2017 Thanks for the reply David!! How would you switch the shader? Quote Link to comment Share on other sites More sharing options...
davpe Posted January 19, 2017 Share Posted January 19, 2017 you can have a switch node in either object or the shader that's driven by an integer attribute Quote Link to comment Share on other sites More sharing options...
asmartkid Posted November 23, 2019 Share Posted November 23, 2019 (edited) On 18/1/2017 at 10:15 PM, davpe said: are you talking about the whole objects stop computing displacement at a certain distance or just portions of a huge object that are too far from camera? at the second case I'm afraid it is currently not possible unless you split that object into more sections that behave as individual objects. I'm not aware of any renderer allowing you to dial in dynamic per-primitive displacement subdivision. you can only do amount of rendertime subdivision per object. If you want to compute less subdivisions when displacement is near nothing, try increasing Dicing flatness parameter in the object settings (Dicing>Dicing Flatness). that is sort of doing what you want, but again, it affects the whole object everywhere, not only at the distance. it is meant as an optimization tool for increasing performance at the price of lower precision. but it's worth trying. Just to confirm: there is no shader level solution yet for disabling displacement (and use bump mapping instead) according to a geometry attribute along a big object or for instance with a Heightfield mask, true? Edited November 23, 2019 by asmartkid 1 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.