Hi, I disoverd your thread just now, after searching for the possibility to enhance my blender renderers.
At some point you can do what ever you want, you will never reach pure realism with what is built it in cycle, I learned that pretty fast.
Amazing work so far from you. I´m glad that somebody already took the effort to dive into this. I really can´t understand why people don´t use the spectral render engines, they always talk about photorealistic renderings, but don´t implement spectral rendering!
I don´t understand how you do it, are you doing programming or are you building nodetrees to handel the light data correctly?
I was initially using nodes to do all of this. A simple version of it is possible with just nodes, but the performance of it is much worse than what can be achieved in code. I later started modifying Cycles code in order to implement it properly, which is an ongoing effort.
Yep, the work on moments is pretty interesting. I have experimented with a 3-coefficient representation of spectra which seems like good option if writing a new engine. Retrofitting something like that onto Cycles wouldn’t be worth it though.
I’m happy to but they might not be what you expect. By ‘using nodes’ what I really mean is that I create all materials in greyscale but changes slightly based on the ‘wavelength’ being rendered. Then I brought all those images back in to the compositor and combined them together with their corresponding wavelength.
The concept behind the materials comes from ‘thin film interference’, so based on the angle, wavelength, IOR of each material, and thickness of the film, you can work out a percentage of light that is transmitted and reflected. Because the transmission amount depends on the wavelength, it looks colourful. Understanding the thin film equation should give you the knowledge you need to be able to create such a material, but any attempt to do it in a regular RGB renderer will be confusing because there are so many unanswerable questions.
i made some test render,with latest daily git build blender 2.90.2 for rgb renderings,and the latest spectral build from graphicall
for this test i modeled a simple tank which is 50m deep with a marbletexture around, to avoid lighting from the site or unterneath.
in this tank i added a volume absorption with real absorption values from measured clear water.for the light i used a sun light with 1000 watts,to get real sun light strength.i adjusted the exposure at the outside from the watertank,to a filmic grey (.18) to make sure the light intensity at the watersurface is correct (as correct this test can be ofcourse).
i loaded the image from the dev blender site topic as image as plane,and reduced the specular from the image to 0 to avoid reflection errors.
i have parent the camera above 1m to the plane image with a widelens of 11mm (very similar to the video)
keep in mind i left the exposure to the adjustment at the surface,this is why there appear darker the deeper its get.
here the render.
rgb 10m underneath the watersurface
That’s a pretty nice test! Thanks for conducting it.
I think once I have a ‘spectrum curves’ node (what I’m working on now) that will allow us to specify the absorption spectrum much more accurately, as currently even the spectral version is using an RGB to spectrum upsampling process which is obviously not as accurate as using the real values. Still, the colour from the spectral result looks much more pleasing to me.
I’ll let you know once custom spectra can be used (which will also open the doors to cool experiments like fluorescent lighting).
Hi, sorry I didn’t get back to you on this one. I’ve been trying to find the files but haven’t found them after a computer change The process should be relatively well documented above if you want to follow along, but soon enough the spectral build will be capable of very similar things.
its fun,here another test.i found a interesting paper,here some reference shots at 6m waterdeep from.
i am not sure if the guys who hat shot this images are using camera lighting,i guess this could aldulterated the colors,if the lamps gives some red wavelength back ie.however here the images.
yes, spectrum curve nodes would be great too.i hope it would be possible, to set as many absorption points as you want.this way you could rebuild full spectral absorption measurements you could find in the net.especially if you make it possible to render fluorescent light,you could make the wavelength spectrum more wide in the node too.UV-VIS-IR (ie)
and yes to me the whole spectral colors of the test renderings are closer to the fotos vs the rgb renderings.the spectral gives instant a realness,vs the rgb is that lacking.
For those interested, there is now a build which contains a ‘Spectral Curves’ node (found in the colour node dropdown) which can be plugged into any BSDF colour socket. This will allow for a much more varied set of imagery to be created than before.
i have read the topic at dev blend about negative wavelength.usally its represent the path length,means peer unit path length,that amount of energie gets absorped.(ie)if you have the absorption spectrum of water with m-1 in the graph,then the absorpion means that wavelegth geths absorped peer meter path length with a intensity lost shown in the y axis at the graph(thats the negative absorption peer m) .in our case with scatter or absorption shader peer m or BU.
here the absorption coefficent spectrum of water m-1
good explanation
further the absorption is usally a attenuation of the wavelength amplitude.based on beer lamberts law.
e ^wavelength m-1(the negative intensity at its wavelegth) * pathlength(simplified)
if a light ray goes trough the volume ,then the ray intensity multiplyed by the formula above,you get the attenuated intensity in the medium.
Oh, you’ve managed to get it building? If so, the node should be in Colour, at the bottom. If you’ve just downloaded the latest build from GraphicAll, because there is an issue building, it is not yet up to date and doesn’t contain the spectral colour node.
i think i found a small bug.in this test the absorption values in all 3 rgb channels are 0.0001.the sun light has a color of white (1,1,1).high densitys,in this case 100 gives this greenish color,expected color is neutral grey absorption.