5

Your way of calculating XYZ functions is probably the most efficient way to go about calculating accurate colors from a spectrum. It is standard practice afaik, for examples the books Physically Based Rendering (3rd) and Real-Time Rendering (3rd) both use this method. You can add the colors in RGB space, but only if you convert from sRGB to linear RGB first....


3

The choice of various tristimulus color spaces or spectral rendering matters when you're doing multiplicative color operations, like multiplying a light source color by a material reflectance. For these operations, the spectral approach is most accurate, and multiplying tristimulus color values is a pretty coarse approximation (and also depends a lot on the ...


2

How accurate it is to estimate rendering equation using wavelengths This is probably as accurate as it gets if you are using with the full form of Fresnel equation. then convert result to CIE XYZ This brings in two problems with respect to accuracy. If the spectral distribution of your illuminant is different from the one that is used by CIE, you would ...


2

Getting sRGB values outside [0, 1] is expected and normal when using spectral rendering. The sRGB gamut only covers a triangle in the middle of the CIE chromaticity space: (diagram from Wikipedia) The big "horseshoe" shape is the set of all physically possible chromaticities (CIE xy coordinates) from any possible spectrum. So your xy coordinates should be ...


1

I know this is an old question. I did write a spectrum->rgb converter, however all of its relevant parts for this question come from pbr-book source code. Specifically though, the answer is no. Constant index of refraction (which is actually a wave length dependent number, so taking it as a constant is more of an approximation really) does not produce a ...


1

Iridesence can be seen in several variations: diffraction as seen in CDs and DVDs (see Stam's SIGGRAPH 1999 paper on this), phase shifting and modulation in multi-layered surfaces as you see in oilspills on water, or structural coloration as you see in butterfly wings. (Also there is the related pearlescence). However, it's not trivial in any way, probably ...


1

The book distinguishes a spectral power distribution from a spectral response curve because they are not the same, they are adjoint. The thing about adjoints that makes them a little tricky to wrap your head around is that they typically have the same representation in software, but keeping them distinct is extremely important in computer graphics. Another ...


1

You can take a 1D Fourier transform of a row of pixels from the image; it will give you the horizontal frequencies present in that row. You could sample one row out of the image, or else average all the rows together to get an overall picture of the horizontal frequencies.


Only top voted, non community-wiki answers of a minimum length are eligible