POV-Ray : Newsgroups : povray.binaries.images : Motecarlo path tracing with MegaPov 1.2.1 : Re: Motecarlo path tracing with MegaPov 1.2.1 Server Time
2 Aug 2024 18:13:09 EDT (-0400)
  Re: Motecarlo path tracing with MegaPov 1.2.1  
From: Severi Salminen
Date: 16 Feb 2008 17:00:11
Message: <47b75ceb@news.povray.org>
Severi Salminen wrote:

> At present I can only draw the balls with one color by finding
> ray-sphere intersections. So no lighting at all. But at least it works.

And now I can do a lot more. May I proudly present the first real render
of my simple ray tracer! Sorry, no checkered floor :( I took maybe 30+
minutes or so on one core. The depth was 3 (ie. you can see balls
illuminated by indirect lighting from surfaces that were lit directly).
There are no optimizations and it can only handle balls of various
colors. But I still love the simplicity! No settings to tweak, just let
it go.

The hardest part was to figure out that I had a lousy algorithm for
producing randomly distributed rays over hemisphere area. They were sooo
not random and produced some odd artifacts. Now I use something like this:

y = sqrt(rand(0..1))
theta = acos(y)
phi = 2*pi*rand(0..1)

x = sin(theta)*cos(phi)
z = sin(theta)*sin(phi)

And then I rotate it according to the intersection point normal. Things
to do in near future:

1. Optimizations to make it faster :) Have to look at that portal thing.
Fidos, any good source of info on portals??
2. Have to check that I'm actually doing everything now properly. It
looks OK to me but you never know.
3. More objects.


Post a reply to this message


Attachments:
Download 'render1.jpg' (19 KB)

Preview of image 'render1.jpg'
render1.jpg


 

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