mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.8k stars 429 forks source link

Fix the EXR multilayer channels nomenclature in G-buffer mode #355

Closed pbrt4bounty closed 1 year ago

pbrt4bounty commented 1 year ago

Recently I have some issues loading the rendered files using G-buffer into Blender that can't load the image because some channel names. Following the tips from the Blender devs I changed some names: 'Nsx', 'Nsy', and 'Nsz' to "Ns.X", "Ns.Y", and "Ns.Z" This respect the nomenclature for this EXR format in a few viewer applications( Tev, DJV..) that show this chanel as 'Ns(X,Y,Z)' The unique question before create a pull request are if Pbrt-4 need this separate channels or can manage the new way. If I remember correctly, this aligns with an earlier change we made to 'Variance' channel. What do you think, @mmp ?

pbrt4bounty commented 1 year ago

Apparently the problem loading the files was on the Blender side and they have already fixed it. In any case, I am going to leave this report open for a few more days, in case someone wants to contribute their opinion. Cheers..!

mmp commented 1 year ago

I don't see any problem with changing the naming from the pbrt side, if a better naming scheme will work better in other programs. (I don't think that the naming is discussed in the book and I assume it wouldn't be too disruptive to existing users of the current names.)

pbrt4bounty commented 1 year ago

Thanks Matt. Basically, this are the difference: Current naming.. imagen New naming.. "P.X", "P.Y", "P.Z", "N.X", "N.Y", "N.Z", "Ns.X", "Ns.Y", "Ns.Z", imagen

I'll create a pull request in the next hours.. Cheers..!

pbrt4bounty commented 1 year ago

I've planned to use this as a base to implement basic support for user-programmable AOVs (Arbitrary Output Variables). If I can find free time :)