In Karma it looks like the closest thing to such a function is the Karma ST Derivatives VOP, however I am not sure about its behaviour. it's almost as if the input is ignored altogether. and i can observe the following:
- If I plug a mtlxposition node into the input to provide a P to calculate the derivatives, the result does not change between a 'world' space or a 'object' space P, or even 'model'. Even if I plug a mtlxNormal node the result doesn't change.
- The derivScale output shows higher values on grazing angles, which makes sense as the micropolygons are diced in raster space and will increase in size and the surface becomes parallel to camera rays (or view vector), but there seems to be some areas of the geometry that have a higher value based on something else that is dependent on the topology density. Which makes me think that it is not doing what i want.
- I tried to plug derivS or derivT in an AOV for debugging. It behaves properly when plugged directly. however when I try to multiply cush vector with a mtlxmultiply, the output breaks and it becomes a colored rainbow of patches on the geometry. if i unplug the position from the Derivatives input, this result becomes black instead. See Screenshot 3.
I attached a couple of screenshots. In image 1 you can see the output of derivScale as it is. In image 2 I multiplied it's value with a Karma Camera Falloff node to cancel out the grazing angle variations in an attempt to flatten the appearance of this measurement across the shape of the geometry on screen, but i am still left with those areas that are more geometry dependent and i would like to get rid of those. Since a lot of these things in Karma are happening under the hood, I am not sure how i can achieve that and just seems a bit buggy to me.
The documentation states that the derivatives are calculated in the ST parametric space, which makes me assume are the S and T coordinated of each single micropolygon like in PRman as in dPdU and dPdV and should not depend on the mesh density in the UV coordinates at all?
My goal is to have those area values mostly flat across the whole silhouette. the pig head mesh closer to camera should not have those bright patches around the eyes and in the ears.
Any thought is appreciated.
R
Image Not Found
Image Not Found
