I am trying to convert “brdf data at MERL database” to “Tensor-tree BSDFs format”, but as I cannot find the details of the later format the conversion is not done yet.
For the “Matrix format”, I have already succeed in converting it and put them into tags. In this case, there is a table of “Matrix format”, so I can convert it.
Any help or advice would be appreciated.
*Brdf at MERL is open brdf data taken for 100 samples. The link is bellow.
What you are attempting is difficult, but not impossible. The best reference I can offer for the tensor tree XML data may be found in the linked report.
The simplest thing to do would be to resample the data into a set of Shirley-Chiu subdivisions and employ the undocumented Radiance tool rttree_reduce to produce the data segment of a tensor tree XML file. The better-documented tool wrapBSDF can handle the details of the XML tags and format. You can look at the Perl script genBSDF.pl in src/util to learn more specifics about how these tools are used.
while it may be not the most efficient approach, you should be able to
convert the MERL files into tabular data that pabopto2bsdf understands.
I have done that some years ago. Just be aware that the MERL data may be
out of range sometimes.
Thanks for your advice.
I read your linked report, and now succeed in resampling the MERL data to Shirley-Chui subdivisions.
The remaining challenge is to put them into curly braces.
If there is any document that explain the details of curly-braces rules, please refer to it.(I understood the overview by reading your linked report, but couldn’t get the details.)
“rttree_reduce” seems work for, but I hope the full-conversion consistently work in my own code.
Thank you for your advice, and also telling what should be aware of.
I will look at “pabopto2bsdf” to understand the conversion.
I’m now trying to make python-code that convert MERL-data to
tensor tree data that can put in ScatteringData tags in xml.
Your advice will to be helpful.