magneto Posted December 28, 2014 Share Posted December 28, 2014 Hi, I am using plain noise and numeric value displacements without using any texture maps. Is there a way to blur the displacements in a shader? Since I am also using noise, I tried lowering the roughness but it removes a lot of noise detail, way beyond simple surface smoothing. Is point cloud filtering the way to go? I didn't try it yet because I wanted to do actual surface blurring, not a proximity one, i.e. using the surface connectivity. But I don't know if there is such a thing in shaders? Thanks. Quote Link to comment Share on other sites More sharing options...
edward Posted December 28, 2014 Share Posted December 28, 2014 Are you using antialiased noise? eg. http://www.sidefx.com/docs/houdini13.0/nodes/vop/aanoise 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 28, 2014 Author Share Posted December 28, 2014 Thanks Edward. I am using the default noise vop in Mantra Surface material which is Turbulent Noise. I now changed it to Anti Aliased Noise. I kept roughness at 0.5 but lowered Max Octraves, and it did what I wanted. Is this what you wanted me to try? Out of curiosity if I needed a generic way to blur displacement details, is there a way to do this? I would appreciate any insight on this since I am sure shading experts do this with their eyes closed Quote Link to comment Share on other sites More sharing options...
edward Posted December 31, 2014 Share Posted December 31, 2014 I'm not sure but I wouldn't be surprised if the best choice will depend on how you're deriving your displacements in the first place. Do you really want "blurring" per se though as opposed to just "antialiasing" to avoid artifacts? 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 31, 2014 Author Share Posted December 31, 2014 Thanks Edward. You are right. I am not sure if anti-aliasing would work though. Let's say I generate some values in memory without using noise or a texture map where the result is like this: I wanna be able to blur this image so that the smaller details are lost and the resulting displacement is smooth and doesn't have much detail. Or let's say you are using Voronoi Noise and want to smooth the edges by blurring the result: Maybe like you said I might be thinking about it wrong Quote Link to comment Share on other sites More sharing options...
edward Posted December 31, 2014 Share Posted December 31, 2014 You could try to approximate the averaging the neighbouring displacements by using derivatives. However, the limitations will be the accuracy of the derivatives that you have and a limited filter radius because the derivatives will be more inaccurate as you move away from your shading point. However, if your underlying geometry is a flat grid, then your derivatives will be good enough. For arbitrary geometry, not so much. A better way will be generate enough information for your shader so that it can calculate an accurate displacement for the radius around any point in the base geometry. I've never tried this myself but I've seen some approaches where they generate something like an SDF (or perhaps a closest point transform field) so that this can be done. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 31, 2014 Author Share Posted December 31, 2014 Thanks Edward, it makes a lot of sense. Lastly how can I use derivatives in shaders? I haven't done this before, so not sure if it's easily doable in SHOPs. Or do you mean texture filtering by this? Quote Link to comment Share on other sites More sharing options...
edward Posted December 31, 2014 Share Posted December 31, 2014 http://www.sidefx.com/docs/houdini13.0/nodes/vop/shadingderiv FYI, some reference info from the RSL docs that may be useful: https://renderman.pixar.com/resources/RPS_17/basicAntialiasing.html (but take note of VEX differences: https://www.sidefx.com/docs/houdini13.0/shade/transitioning ) 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 31, 2014 Author Share Posted December 31, 2014 Thanks Edward, I will experiment with these. Happy new years Quote Link to comment Share on other sites More sharing options...
fathom Posted February 21, 2015 Share Posted February 21, 2015 i've always been a bit curious about how to best antialias a displacement calculation. i mean, consider that displacements themselves have a major impact on the shape of the resultant geometry which is what you would normally use as a basis of your antialiasing. polygons that are slivers BEFORE displacement would potentially be hit with a filtering hammer regardless of what they would look like post displacement. without knowing the result of the displacement, it would seem like a distance-based approach would be more fitting... 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.