Closed ioissss closed 3 months ago
Hi @ioissss
The position sample should be in world-space, and the pdf value does indeed seem wrong here. Could you provide a full reproducer ? What does the shape.surface_area()
method return ?
Hi @njroussel
Not the original author of the issue but this happens to any object with a small surface area (<1) as the pdf just returns the inverse area. You can easily reproduce it with small spheres or rectangles.
Oh that's totally expected and still mathematically sound -- if you integrate it over the surface, you'll still get 1.
I'll close this for now, unless there's something more too this issue.
I used the shape's
sample_position()
function to sample on a certain shape, but I found that the pdf in the resulting positionSample was greater than 1! In my understanding, the probability density function would not have a value greater than 1, but then this happened, the codes are as followed:the result is :
By the way, is the location of the sampling point obtained located in the object coordinate system? How do I translate it to the world coordinate system, I can't seem to get the transformation matrix for the corresponding object :)