View Full Version : measuring curvature in PrMan
I have a high amplitude bump map that looks good everywhere except in areas of high curvature (tight concave and convex corners). In these areas the normals are pushed too far in relation to each other and result in some unwanted artifacts.
One possible solution is reducing the bump amplitude in areas of high curvature, or where the normal directions are changing rapidly. What's the best way to do this in PrMan?
Thanks


rendermaniac
08272005, 12:55 PM
This may be useful to you http://www.affine.org/curvature.html
Simon
Thanks! I will take a look at this. I should have mentioned also that this is a PointsGeneralPolygons object.
rendermaniac
08272005, 05:55 PM
dPdu and dPdv can be tricky with polygons  by default they use the local object space axes  which is usually exactly not what you want. In this case you'd need to make sure you have very good UV's and calculate it yourself using s and t  using du(P,s) and du(P,t) (I think...).
Simon
Agreed. Polygons make the problem more fun. :) In PrMan u an v parameters are defined as the x and y coords in object space. Since the model is a complicated terrain model I don't think the u and v parameter space will be that useful. Any polygon perpendicular to the xy plane will have strange parameterization.
I will try the shader you mentioned using the derivatives of P with respect to s and t instead of u and v and see what happens.
A lowertech option I was thinking of was baking out an ambient occlusion brickmap and using the darkcolored nooks and crannies as a multiplier for the bump magnitude. Unfortunately I need to reduce the bump in convex high curvature areas as well.
If I just knew the derivative of the surface normal with respect to a unit change in P, that would give me a measure for curvature, right? Given that du, dv, Du(), and Dv() might be unreliable on a PointsGeneralPolygons object, does anyone know how you would find the surface normal change per unit change of P in SL?
rendermaniac
08282005, 11:16 PM
To get any neighboorhood information in SL I think you'll need to use derivatives or raytracing. Otherwise some pointcloud DSO type thing might work.
Simon
CGTalk Moderation
08282005, 11:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©20002014, Jelsoft Enterprises Ltd.