POV-Ray : Newsgroups : povray.off-topic : Re: stochastic (monte-carlo) tracing : Re: stochastic (monte-carlo) tracing Server Time
10 Oct 2024 01:40:48 EDT (-0400)
  Re: stochastic (monte-carlo) tracing  
From: John VanSickle
Date: 12 Sep 2008 12:14:10
Message: <48ca9552@news.povray.org>
Severi Salminen wrote:
> Ray Bellis wrote:
>>> Very nice images! Path tracing really gives very realistic
>>> result with very little tweaking. Nice!
>> What's a good place to discuss algorithms?
>>
>> I've written a simple stochastic tracer in Java and I'm struggling with 
>> doing diffuse inter-reflection, and getting enough rays to hit my ambient 
>> "light sources".
> 
> I think Off-topic is the best place. If you mean this news server. (You
> can answer to this post and the follow-up will be posted in the correct
> group.)
> 
> I have also done my own renderer:
> 
> http://www.saunalahti.fi/~sevesalm/ssRay.html
> 
> Still a lot of work to be done...

Now if you want to get really realistic:

* Instead of shooting RGB rays, shoot photons of a particular wave 
length, selected randomly from the spectrum of the light source at the 
emission point;

* at each surface of intersection, calculate the chances of refraction, 
reflection, absorption, and possible emission, and either shoot the 
photon off at another angle, or count it as absorbed and start a new photon;

* Remember that the angle of refraction is dependent on wavelength. 
Voila:  Rainbows are built in.

* Do constructive and destructive interference so that you can produce 
realistic iridescence.

* A photon isn't drawn on the screen unless it hits the virtual film. 
Then you calculate its RGB value, and add that to the pixel at that 
point in the screen.

Regards,
John


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.