Physically accurate ocean water test

I was wondering about that. I was talking to an underwater photographer and he mentioned how much colour gets shifted as you go deeper underwater. It’s all trivial stuff with spectrally defined scattering and absorbtion functions but you can only ever fake it in RGB. You might be able to fake it well in some cases, but often you’ll run into roadblocks pretty quick, I’ve found.

I’m working on converting Cycles to be a spectral renderer and while it isn’t going to be happening any time soon it would be awesome to see the results before and after for these cases.

ok,the scatter volume shader can have negative anisotropic values.this is what i meaned with adding/mix two shader with different anisotropic values.

pure water has a average anisotropic value of 0.924 .and a backscatter value of 0.0183.and a density of 1000kg/m³

here you can see my basic setup with pure water absorption only, with a density of 1000.the scatter setup is underneath and disconnected for the sake of renderspeed.no reflection used here,with one hdr lit and a simple ground plate to avoid light from the ground.

this water volume is 200x200x100m and i placed 200 redwhite 1m balls which are going from front left corner down to the right corner at the back from the water volume.

here you can see my basic setup

I agree,simple value input for absorption coefficient and scatter coefficient should be there. and a list for select the units you have put in or want to use,ie cm-1 or m-1 ect.and the density is wrong with Blender unit or meter.if you put 1000kg density per m³ then the absorption is multiplyed by 1000 too,that should disconnected from the absorption/scatter values.i have divided the values to fit the right density.

As far as I understand, density parameter is not related to mass… In my understanding, density is number of particles in unit volume. Kind of probability to get absorbed by given absorption color.

i am not exactly sure,but in the shader code is kg used and the density is simply a multiplyer for the absorption color and scatter color.but this is not the best way to give a material its density.

like you sayed.we need a input for absorption and scatter coefficient for real physical values.

look here, 1000 kg/m³ water is reference density in SI units.further down the list are many material densitys
http://www.sengpielaudio.com/calculator-densityunits.htm

edit,i think you are right.but density is confusing, it must be called concentration.
It must be beers law then.
(A)bsorbance=ecl
e=molar extinction coefficient (in this case,the RGB absorption and scatter color,peer BU)
c=concentration (density,which works as multiplyer for the absorption/scatter color)
l=pathlength (the volume or length the object has,in BU.no value here.the object size is taken from the volumetric center in the shader.)

edit.i found what kg stands for,its kernel globals not kilo gramms ,at line 41
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/kernel/kernel_volume.h

I am super new to this community and i am very much confused right now. Did you share your node setup for this result somewhere? If yes, where?
I am at a loss, maybe I just misunderstand something here, sorry for bother!