Jump to content
anamous

dispersion bsdf

Recommended Posts

I just tested the scene. Dispersion doesn't show up in the caustics, and it seems that the photon behavior has been changed yet again (9.5.260) - shaders that output only Cf aren't considered worthy of photon generation anymore, and you get the "not enough photons.." error message, which currently means that we can't use the raytracing version of the shader to color the caustics. I'll ask SESI about this.

cheers,

Abdelkareem

Share this post


Link to post
Share on other sites

..some test of mareks amazing shader with alex hipfiles. big thanks to alex and marek. I took alex prism and tessalate a lot with tiny little curlnoise.

Again, I'm loving this shader!

 

caustics2.jpgcaustics.jpg

Edited by tfreitag
  • Like 4

Share this post


Link to post
Share on other sites

Gorgeous threads guys ! You Bring us some Maxwell Rendering inside Mantra ... :wub:

 

Tom would it be possible to share the triangle .hip test scene with your exact setup ? I'm really curious about this nice dispersion that actually look REAL and not a dirty tricks like this one :

http://www.psyop.tv/psyop-releases-jf-nested-dielectric-open-sourced-shader/

Edited by sebkaine

Share this post


Link to post
Share on other sites

I would have one question about dispersion.

 

in many explanation i find on the web it say that dispersion is cause by a modification of the ior according to the wavelength of the incident ray.

but they only talk about refraction , only the refracted ray looks to be affected by dispersion.

 

in Mario shader both reflection and refraction are affected by dispersion.

So i would like to know what the rendering expert think about this ?

 

Does dispersion occur both for reflected and refracted ray in real life ?

It seem to me that is is logical that IOR variation modify both behavior , but i would like to be certain on what happen in real life !

 

Thanks for your help ! :)

Edited by sebkaine

Share this post


Link to post
Share on other sites
but they only talk about refraction , only the refracted ray looks to be affected by dispersion.

TRUE

in Mario shader both reflection and refraction are affected by dispersion.

I dont think so. Every rainbow you see in my renders is result of multiple refraction, or reflection of previosly refracted(dispersed) light.

Share this post


Link to post
Share on other sites

Thanks for your answer Alex ! :)

 

well in Mario shader the code is the following :

...
for(i=0;i<samples;i++) {         
	fresnel(-wo,n,1.0/ior,kr,kt,wr,wt);         
	w = getfilter(ramp,wl);         
	         
	Ft += specular(wt)*kt*w;      // transmit   
	Fr += specular(wr)*kr*w;      // reflect 

	wsum += w;         
	ior  -= dior;         
	wl   += dwl;      
}      

vector iwsum = CONE / wsum;      
F  = Ft*iwsum*Ktrans + Fr*iwsum*Krefl;
...

In fact in your shader the code is the following :

...
for(i=0;i<samples;i++) {         
	fresnel(-wo,n,1.0/ior,kr,kt,wr,wt);         
	w = getfilter(ramp,wl);         
	         
	Ft += specular(wt)*kt*w;      // transmit   
	Fr += specular(wr)*kr*w;      // reflect 

	wsum += w;         
	ior  -= dior;         
	wl   += dwl;      
}      

vector iwsum = CONE / wsum;      
F  = Ft*iwsum*Ktrans; //+ Fr*iwsum*Krefl; 
...

in case 1

- Fr and Ft are computed with the ior variation and then sum together

 

in case 2

- Fr and Ft are computed but only Ft is use , Fr is set as a comment 

 

In this post eetu offer an other simpler method to fake dispersion

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=16567

 

He offer 2 hip , again

in case 1 you have dispersion for reflection and refraction

in case 2 you have dispersion only for refraction

 

eetu himself is not sure about what is correct ... :)

 

So i just need to be sure ! So if you are 100% sure that's great !

 

Dispersion phenomena doesn't affect direct reflected ray , only the refracted ones !

 

Cheers

 

E

Share this post


Link to post
Share on other sites

Thanks for the link David, so it confirm what Alex say !

 

"The law of reflection doesn't depend on the light wavelength"

Edited by sebkaine

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×