-
Notifications
You must be signed in to change notification settings - Fork 2
SpectralIllusion
The SpectralIllusion recipe produces a color illusion similar to an illusion seen here, by Lotto and Purves. The creation of the illusion relies on a rendering principle tested in the SimpleSquare scene, that reflected spectrum is obtained as the product of reflectance and illuminant spectra.
Above, Mitsuba rendered the scene.
The parent scene contains a cube, modeled with rounded edges and 3 raised circular "pips": a "target" pip on the top face and "destination" and "reference" pips on the front right face. Each face of the cube has 25 facets, manipulated to use matte material, with reflectances chosen so that neighboring facets look different. The cube sits on a matte floor with beige-looking reflectance.
Two lights illuminate the scene. A yellow "sun" point light is located above, behind, and to the left of the cube and emits with a CIE "daylight" spectrum correlated to 4000K. A blue "sky" area light occupies a large circular plane above the entire scene and emits with a CIE "daylight" spectrum correlated to 10,000K. The emission spectra are scaled so that neither light dominates the scene.
The camera views the cube at an oblique angle, so as to view 3 faces of the cube, including one face that is shaded from the "sun" light.
The visual illusion involves the perceived colors of the "target" pip on the top face of the cube, and the "destination" pip on the lower right part of the front right face. Although the destination pip looks much brighter than the target pip, the two pips have very similar RGB values.
The target and destination pips receive different illumination, since the destination pip sits on a shaded face of the cube that receives little light from the "sun". The reflectance of the destination pip was calculated to compensate for illumination differences, so that the final RGB values (and indeed, reflected spectra) of the two pips would nevertheless match. The calculation used a principle tested in the SimpleSquare scene, that final reflected spectrum follows from the product of reflectance and illuminant spectra.
A third "reference" pip has the same reflectance as the target pip but sits on the shaded face with the "destination" pip. The target and reference pips appear similar in color, even though the reference pip is shaded from the "sun" and thus reflects quite a different spectrum (and has different RGB values).
Note: this illusion was produced with respect to a chosen target pixel and destination pixel, as opposed to whole pips. The quality of the RGB match between target and destination varies over the pip surfaces because there are illumination gradients.
The executive script MakeSpectralIllusion.m
produced the image above. It is located at here:
(path-to-RenderToolbox3)/ExampleScenes/SpectralIllusion/MakeSpectralIllusion.m
MakeSpectralIllusion.m
also produces a figure that examines the rendering in detail.
The top of the figure shows sRGB representations of 2 scene renderings. The image on the left is from an "initial" rendering, used to estimate the illumination impinging on the destination pip. The image on the right is from the final "clever" rendering that contains the visual illusion. The image on the right is the same as the large image at the top of this page.
The bottom of the figure shows the spectral distributions for the target and destination pixels. The location of the "target" pixel is marked with a blue square in the "initial" image. The location of the "destination" pixel is marked with a green circle.
The topmost plot shows the reflectance spectra specified for the target and destination pixels in the "initial" rendering, and for the destination pixel in the "clever" rendering. The reflectances are all different.
The middle plot shows the spectra of the illumination impinging on the cube, at the locations corresponding to target and destination image pixels. These illuminations were calculated for each pixel by dividing the pixel's rendered output spectrum by the specified reflectance spectrum of the corresponding cube facet. The inferred illumination at the "initial" destination pixel is approximately the same as the inferred illumination at the "clever" destination pixel, indicating that effects of interreflection are negligible for this scene.
The bottom plot shows the rendered output spectrum for each pixel, obtained directly from Mitsuba. The output spectrum of the "clever" destination pixel is approximately the same as the output spectrum of the "initial" target pixel, even though the corresponding cube locations have different reflectances and impinging illuminations.