#flipcode

#flipcode
Welcome to the chatterbox... 
#flipcode forumspace!

Browsing Gallery

LiAR isn't a raytracer


 




liar (1) raytracer (1)



 
Bramz (9)LiAR isn't a raytracer - 2006-12-04 09:50:55
Avatar of user Bramz
Registered: unknown
Posts: 17

Here's a render by my own modest little ray tracer/photon mapper LiAR isn't a raytracer. What you're seeing is three car models from Live for Speed with team skins of PHD-Motosports of which I'm the "official sponsor", in the wonderful Uffizi gallery.

The body surface is using the famous Ashikhmin & Shirley BSDF. The glass of the windows and head lights use some modified fresnel equations. Because the glass is modeled as a single intersection, I had to cramp the double air-glass-air interface + the attenuation by the glass medium in one BSDF. In a nutshell:

where and are the resulting reflectance and transmittance, is your usual fresnel reflectance, , the transparency of the glass medium (Beer's law) for orthogonal incidence, and the internal angle of the refracted rays (Snell's law).

Dirtysouthafrican (2)Re: LiAR isn't a raytracer - 2006-12-04 10:58:32
Avatar of user Dirtysouthafrican
Registered: unknown
Posts: 312

Some closeups would be nice, but it looks pretty awesome. Would a double interface not give more realistic effects?

Bramz (9)Re: Re: LiAR isn't a raytracer - 2006-12-04 11:18:26
Avatar of user Bramz
Registered: unknown
Posts: 17

Dirtysouthafrican (2006-12-04 10:58:32) wrote:

Would a double interface not give more realistic effects?

Sure, but the model doesn't model it that way. So, that's why the "hack". As long as it is thin enough (but not too thin), and you're away far enough, you shouldn't see much difference.

Dirtysouthafrican (2)Re: LiAR isn't a raytracer - 2006-12-05 10:05:18
Avatar of user Dirtysouthafrican
Registered: unknown
Posts: 312

Real programmers make their own art =)

Bramz (9)Re: LiAR isn't a raytracer - 2006-12-06 11:08:39
Avatar of user Bramz
Registered: unknown
Posts: 17

Then I would end up trying to model a car using planes and sphere ... mmmh, for some reason I don't want to see that happen ;)

Ono-Sendai (17)Re: LiAR isn't a raytracer - 2006-12-08 09:20:13
Avatar of user Ono-Sendai
Registered: unknown
Posts: 530

Bramz:

Dunno if you know about it, but the Radiance ray tracer used a model like this for their glass, e.g. some kind of closed form equation for a series of bounces of light in a pane of glass.

Dirtysouthafrican (2)Re: Re: LiAR isn't a raytracer - 2006-12-08 09:28:55
Avatar of user Dirtysouthafrican
Registered: unknown
Posts: 312

Ono-Sendai (2006-12-08 09:20:13) wrote:

Bramz:

Dunno if you know about it, but the Radiance ray tracer used a model like this for their glass, e.g. some kind of closed form equation for a series of bounces of light in a pane of glass.

You may be referring to something analogous to the Fabry-Perot equation:

Fabry-Perot, also Wikipedia article

Basically each internal reflection adds to the main reflection by a phase, and the infinite series of reflections is a geometric one, which can be summed. The wikipedia article is probably a the quickest overview.

Ono-Sendai (17)Re: LiAR isn't a raytracer - 2006-12-08 09:35:44
Avatar of user Ono-Sendai
Registered: unknown
Posts: 530

Hmm.. i'm not sure if the width of the glass panes is small enough, and the surface regular enough, for phase-related effects like interference to come into play.

I think the Radiance ray tracer just dealt with the result of a series of reflections using fresnel terms, without considering interference.

Bramz (9)Re: LiAR isn't a raytracer - 2006-12-11 04:26:07
Avatar of user Bramz
Registered: unknown
Posts: 17

Well, the derivation is simple enough for me not to expect I would be the first. So I'm not surprised Radiance has something similar, in contrary. Apart from them having split up the thing for TE and TM waves (which is of course the right thing to do), it doesn't differ from what I have. They also seem to apply Beer's law for medium attenuation, just like I do.

Indeed, the approximation assumes incoherent sum of the terms: the pane is thin enough for the reflections/transmissions to have local (coincident) appearance to the camera, but not thin enough to have any phase correlated effects. The light source is assumed to be incoherent as well.

Still, maybe I will write it down someday, or maybe not =)

Bramz


 
You need to log in in order to reply to this topic.
generated:July 3, 2009, 9:54 pm
Generated on July 3, 2009, 9:54 pm



© 2007 Lionel Brits

This page validates as XHTML 1.1 RSS 2.0 posts


Theme © 2006 Lionel Brits