Closed namedtoaster closed 2 years ago
It's unlikely that this is a pbrt bug.. One suggestion would be to add enough printing/logging statements to understand what is happening differently in that dark patch vs pixels right next to it. i.e. if you render a single pixel image in the dark region (e.g. using --cropwindow
) and then one a few pixels away where it's lighter, it may become clear why it's behaving so differently even though it, presumably, shouldn't be...
Thanks @mmp. I determined it was because of how I calculated which BTF to load. Got it working now, thanks 👍
I am doing one of the exercises from the book and trying to implement a cloth material using a BTF as described by https://cg.cs.uni-bonn.de/aigaion2root/attachments/sattler-2003-efficient.pdf
I have created a new cloth material which allocates a new BTF as part of the ComputerScatteringFunction instance of the cloth material. Inside reflection.cpp, the f method of the BTF loads the correct BTF texture sample based on the incoming and outgoing ray directions.
I am just testing with a simple plane right now, but I am getting weird results. I am not sure how to proceed. Any thoughts?