TextureEvaluator.GetColor(), Ray Differential parameters?

Hi :wave:,

I’m trying to improve the results from the method:

TextureEvaluator.GetColor( Point3d uvw, Vector3d duvwdx, Vector3d duvwdy )

So I assumed using the duvwdx, duvwdy ray differential parameters might help.

However, I have no idea how to construct these vectors. I tried to follow the documentation and reference Pharr Humphreys, “Physically Based Rendering”, chapter 11. (Chapter 10.1.1 in the version I found. pg. 601.)

But… it’s a bit over my head. From what I can gather these two vectors duvwdx, duvwdy are x,y offsets (one pixel sample?) in the a tangent plane of the first parameter uvw? :man_shrugging:

Any thoughts @nathanletwory? I noticed you had a code comment about using these parameters in the overridden method of GetColor you posted here.

Any help would be much appreciated, I’m pretty new to this area of the API. :pray:

Btw, the PBR book is these days for free available on the internet at Physically Based Rendering: From Theory to Implementation .

In RhinoCycles I sample textures in this way:

So I get the half pixel values U and V based on the width and height of the texture respectively. This gives the vector I need.

When the texture is image based the vector is reset to be just zeroes.

The same vector is used for both the duvwdx and duvwdy cases.

1 Like

Amazing! :raised_hands: Thanks for being so helpful and for the link!
Have a great day!