POV-Ray : Newsgroups : povray.off-topic : Re: stochastic (monte-carlo) tracing : Re: stochastic (monte-carlo) tracing Server Time
7 Sep 2024 07:22:27 EDT (-0400)
  Re: stochastic (monte-carlo) tracing  
From: Ray Bellis
Date: 13 Sep 2008 10:30:36
Message: <48cbce8c$1@news.povray.org>
Severi Salminen wrote:

> Ok, I'll try. Let's assume we have found the first intersection point
> along the ray. Instead of choosing a random new direction (if it is a
> diffuse surface) you can do this:
>
> 1. Pick a random point on a light source.
> 2. Check if it is visible or not.
> 3. If it is, add the radiance it contributes. You must take the
> cosine term into account as well as the ratio of solid angle of the
> source and hemisphere (the last one thus handles the distance of the
> light source).
> 4. After this you can continue tracing the path normally. But if the
> ray next hits the same light source, ignore it as otherwise you have
> calculated it twice.

Do you still trace some random diffuse rays too?  Otherwise how do you end 
up with diffuse inter-reflection?

In either event the maths sounds pretty tricky :(

It also appears to mean that you need to treat your light sources 
differently to normal objects.  At the moment my light sources are just 
high-ambient primitives.

Ray


Post a reply to this message

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