I was toying with the idea of writing a GPU path tracer for a problem I'm trying to investigate, then it occurred to me, it might be best to ask here first

I want to trace micro-displacements to integrate materials at a given scale and obtain data about their BRDF. In practice, obtain synthetic BRDFs, in a similar way that you would do for BRDF acquisition of real world materials, but in a virtual world.

I was thinking to write a small ad-hoc tracer, and use for it either a distance function field, a vector displacement or maybe a point cloud. I need the raytracer to be opensource, because I have to be absolutely certain of the math involved.

What do you think? Mitsuba could be an option as it traces volumes and that seems to be used to integrate cloth weave patterns, which is very similar to what I want to do. The only issue with it is that it's not too fast at doing that... Any other ideas?