"Principled v2" feedback/discussion thread

been a while that I dove into complex IoR (I built a complex IoR node setup for the spectral branch) but for the polarization, if you are assuming no polarization, the best you can do is to just take the mean of the two polarizations (basically pretending you get one polarization 50% of the time, and 50% the other)

I think the most correct you can get this stuff with RGB is to determine for Illuminant E, what the correct linear RGB values for those IOR spectra are, pushing that through the math to get your actual color, and then presumably shifting that color to the sRGB whitepoint (which is D65)
But I’d have to have a good think about whether that’s correct. It might work just fine if you go D65 right away, or you might not actually want to shift the whitepoint, since this is a reflectance spectrum and not an emission spectrum…
This stuff becomes much more straight forward if you are simply thinking about it per wavelength.

At any rate, your outcomes here look great so if you are doing something wrong, it can’t be completely wrong.

this is what I had in the spectral branch (red stuff is wavelengths / spectral data, and the sines and cosines in that node group are calculated from the normal and incoming vectors. Incoming is just part of the node setup. It’s a bunch of dot products, multiplications, and subtractions to get these four trig expressions out)

You can see I’m doing both polarizations here and just weighting them 50:50

And I also looked at just the raw colors of these reflectances, showing you what is being contributed by each:

As you can see here, RS has a more intense coloration when looking straight on whereas RP more strongly reacts towards the edges. Averaged together they give a more even result overall.
I believe the two corresponding values are roughly what’s now built into Principal v2. Presumably you’d have set the angle to 0 and whatever° Principled wants for the second input to get the closest match there

If you want more info, that post in that thread, as well as the surrounding posts, should contain quite a lot more relevant stuff.
Later down that thread I also did thin film bubbles, which was far trickier to accomplish and quite maddening at times.

2 Likes