Jump to content

dispersion bsdf


anamous

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

Link to comment
Share on other sites

  • 5 years later...
  • 2 weeks later...
  • 7 months later...

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
Link to comment
Share on other sites

  • 5 months later...

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
Link to comment
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.

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...