absorption and scattering coefficients for liquids

General questions about Indigo, the scene format, rendering etc...
Post Reply
109 posts
User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

absorption and scattering coefficients for liquids

Post by OnoSendai » Fri Jan 12, 2007 8:16 pm

Jensen has a nice paper up on his site with a table full of absorption and scattering coefficients for many liquids - wine, coffee, milk etc..

http://graphics.ucsd.edu/~henrik/papers ... roperties/

The values are in units of 10^-2 mm^-1,
so i think you need to multiply them by 10 to get to the m^-1 that indigo uses now.

EDIT: the scattering coefficient can be used as is, once u have multiplied by 10. To get the absorption coefficient, subtract the scattering coefficient from the extinction coefficient (and multiply by 10).

Note that i have only implemented uniform scattering, so non-uniform scatters will not look 100% correct yet.

I haven't tried this data yet, if u get any results, pls post them!

nik
Last edited by OnoSendai on Tue Jan 16, 2007 6:58 pm, edited 1 time in total.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Fri Jan 12, 2007 8:23 pm

uh thank you. was wondering about the absorption and scattering of coffee... have been modeling my cup :mrgreen:

will try that when my cpu got some spare time :lol:

Phil
Posts: 154
Joined: Mon Nov 06, 2006 2:22 am
Location: St. Wendel, Germany

Post by Phil » Tue Jan 16, 2007 7:05 am

Hi,

super link really interesting!
Right now I have a lot of crash tryzingHi nik,

super link really interesting! :D

I am just playing with this and right now I have a lot of crash trying to render a glass of Merlot wine!
I do not know where the problems are coming from, I also use the 07 exporter, and I will investigate this more in detail.
At this point I have some questions:

@all:

1- Does anybody here achieve some good results with this?

2- What about the units in Blender?
I offen import obj files from CAD program, and in this case the units are in mm, so should I scale the model?

3- Does the sss function work with all lights (map, sunlight, emitters)?

Thanks in advance, regards

Phil

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Tue Jan 16, 2007 7:24 am

Hi, apparently there are crashes with SSS and sunlight, so if ur using sunlight, try using a mesh emitter instead (it will render faster as well)

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Tue Jan 16, 2007 8:42 am

I would love to test some milk or wine too,
but I feel somehow stupid with all these terms I don't understand :cry:

perhaps somebody could tell me how to translate the values from the Table into a Indigo material...

so what exactly are:
- Extinction Coefficient
- Scattering Coefficient
- Average Cosine
- % RMS Error
in Indigo language???

The first three are RGB values but I only see two possibilities for RGB in Indigo:
<scattering_coefficient_spectrum>
<absorption_coefficient_spectrum>
polygonmanufaktur.de

IanC
Posts: 147
Joined: Thu Aug 24, 2006 4:46 am

Post by IanC » Tue Jan 16, 2007 12:20 pm

Ono, the values for milk are about 0.9124 for the scattering and 0.9126 for the extinction.

That gives scattering of about 10, which seems fine, but absorption of 0.001 if you take one away from the other. This seems really small, am I just not understanding it, or is that right?

ryjo
Posts: 68
Joined: Tue Jul 04, 2006 6:16 am
Location: Pluton

Post by ryjo » Tue Jan 16, 2007 12:32 pm

Here is a render of milk inside glass:

Image

edit: The medium def:

Code: Select all

	<medium>
		<name>milk_scattering_medium</name>
		
		<ior>1.35</ior>
		<cauchy_b_coeff>0.0</cauchy_b_coeff>
		<precedence>10</precedence>

		<absorption_coefficient_spectrum> 
			<rgb> 
				<rgb>0.001 0.003 0.013</rgb> 
			</rgb> 
		</absorption_coefficient_spectrum> 
		
		<subsurface_scattering> 
			<scattering_coefficient_spectrum> 
				<rgb> 
					<rgb>11.873 13.293 14.589</rgb> 
				</rgb> 
			</scattering_coefficient_spectrum> 
          
			<phase_function> 
				<uniform/> 
			</phase_function> 
		</subsurface_scattering>
	</medium>

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Tue Jan 16, 2007 12:35 pm

OK... I read Nick's first post again, and think I now understand how to get
<scattering_coefficient_spectrum> & <absorption_coefficient_spectrum> set
So far so good :)

So I tried to get a glass Merlot & Chardonnay rendered using the following mediums:

Chardonnay

Code: Select all

   <medium>
      <name>wine</name>
      <ior>1.33</ior>
      <cauchy_b_coeff>0.003</cauchy_b_coeff>
         <absorption_coefficient_spectrum>
      	   <rgb>
               <rgb>0.7586 1.6429 1.9196</rgb>
           </rgb>
         </absorption_coefficient_spectrum>
      <precedence>4</precedence>
      
      <subsurface_scattering>
         <scattering_coefficient_spectrum>
           <rgb>
               <rgb>0.053 0 0</rgb>
           </rgb>
         </scattering_coefficient_spectrum>
         <phase_function>
            <uniform><value>0</value></uniform>
         </phase_function>
      </subsurface_scattering> 
   </medium>

Merlot

Code: Select all

   <medium>
      <name>wine</name>
      <ior>1.33</ior>
      <cauchy_b_coeff>0.0</cauchy_b_coeff>
         <absorption_coefficient_spectrum>
      	   <rgb>
               <rgb>0.1547 0.1701 0.3443</rgb>
           </rgb>
         </absorption_coefficient_spectrum>
      <precedence>10</precedence>
      
      <subsurface_scattering>
         <scattering_coefficient_spectrum>
           <rgb>
               <rgb>0.030 0.047 0.069</rgb>
           </rgb>
         </scattering_coefficient_spectrum>
         <phase_function>
            <uniform><value>0</value></uniform>
         </phase_function>
      </subsurface_scattering> 
   </medium>
Here are some quick Renderings:

Image

Image

doesn't look very promissing at the moment... I realy hope I did something wrong :roll:
polygonmanufaktur.de

ryjo
Posts: 68
Joined: Tue Jul 04, 2006 6:16 am
Location: Pluton

Post by ryjo » Tue Jan 16, 2007 12:47 pm

ZomB,

I think your absorption_coefficient_spectrum is too low. This is what I get for Merlot:

absorption_coefficient_spectrum: 7.586 16.429 19.196
scattering_coefficient_spectrum: 0.053 0 0

I haven't tested this though...

IanC
Posts: 147
Joined: Thu Aug 24, 2006 4:46 am

Post by IanC » Tue Jan 16, 2007 1:05 pm

ryjo, thanks!

Thats a beauty of a render, btw.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Tue Jan 16, 2007 1:06 pm

ryjo wrote:ZomB,

I think your absorption_coefficient_spectrum is too low. This is what I get for Merlot:

absorption_coefficient_spectrum: 7.586 16.429 19.196
scattering_coefficient_spectrum: 0.053 0 0

I haven't tested this though...
hmmm... you did multiply the scattering_coefficient_spectrum AND the scattering_coefficient_spectrum by 10.

Nicks first post tells only about multiplying scattering_coefficient_spectrum :?:
OK I' try to Render Some Wine Over Night the way you say :wink:
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Tue Jan 16, 2007 7:07 pm

Both the coefficients should be mutliplied by 10, i've added a clarification to the first post now.

See the glass test post: http://www.indigorenderer.com/joomla/fo ... .php?t=637 for information on how to model the glass correctly for indigo.

You also need to make sure your glasses are the correct size, bearing in mind that indigo units are meters.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Tue Jan 16, 2007 10:11 pm

OK, here the result after 7h.... Merlot & Chardonnay

Image
polygonmanufaktur.de

User avatar
Camox
2nd Place Winner
Posts: 587
Joined: Sat Aug 05, 2006 5:28 am
Location: Berlin Germany
Contact:

Post by Camox » Wed Jan 17, 2007 1:52 am

@ZomB
Nevertheless, this already looks much better.
Have you provided with Blender or with c4d and xml edited ?

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Wed Jan 17, 2007 2:14 am

OnoSendai wrote:Hi, apparently there are crashes with SSS and sunlight, so if ur using sunlight, try using a mesh emitter instead (it will render faster as well)
Sorry to tell you dude, but it seems to crash with env_maps too, and also if you try to illuminate the Scene with a background Spectrum thing without other lightsources :(

Camox wrote:@ZomB
Nevertheless, this already looks much better.
Have you provided with Blender or with c4d and xml edited ?
At the moment I still use the old Exporter from BlackLizard, and edit the XML by Hand... after understanding the new medium system its quite easy :wink:
Learning Blender is still on my list, but I'm working on a big C4D (School) Project atm,
after this is done I move to Blender...

[/quote]
polygonmanufaktur.de

Post Reply
109 posts

Who is online

Users browsing this forum: No registered users and 40 guests