POV-Ray : Newsgroups : povray.programming : where to start? Server Time
16 Apr 2024 14:36:14 EDT (-0400)
  where to start? (Message 1 to 3 of 3)  
From: jazzman
Subject: where to start?
Date: 2 Jun 2010 06:10:00
Message: <web.4c062d6c837e9567f03b622c0@news.povray.org>
Hello programmers!
I am a programming student and would like to think of an efficient way of
splitting the Ray-Tracing problem to multiple threads.
According to my understanding, the current development version of POV-Ray is
working on doing this.

My question is:
Where can I get information about the algorithm POV-Ray is using?
Can someone refer me to a specific file in the "source" directory of the source
code which is responsible for the top-level ray-tracing?

Thanks in advance,
jazzman


Post a reply to this message

From: clipka
Subject: Re: where to start?
Date: 2 Jun 2010 06:36:20
Message: <4c063424$1@news.povray.org>
Am 02.06.2010 12:07, schrieb jazzman:
> Hello programmers!
> I am a programming student and would like to think of an efficient way of
> splitting the Ray-Tracing problem to multiple threads.
> According to my understanding, the current development version of POV-Ray is
> working on doing this.
>
> My question is:
> Where can I get information about the algorithm POV-Ray is using?
> Can someone refer me to a specific file in the "source" directory of the source
> code which is responsible for the top-level ray-tracing?

I would suggest diving into it at "TraceTask::Run()", in the file 
"source/backend/render/tracetask.cpp". This is the method run for every 
rendering thread.

Concentrate on the simplest case, "tracingMethod=0" (no anti-aliasing) 
with "previewSize=0" (no mosaic preview), i.e. 
"TraceTask::SimpleSamplingM0()".

The basic idea behind the code is to repeatedly retrieve a work package 
(a rectangular chunk of the image) from a dispatcher 
("GetViewData()->GetNextRectangle(...)"), render it pixel by pixel, and 
retrieve the next work package - until the dispatcher has no more work 
to do.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: where to start?
Date: 2 Jun 2010 09:14:10
Message: <4c065922$1@news.povray.org>
On 02.06.10 12:07, jazzman wrote:
> My question is:
> Where can I get information about the algorithm POV-Ray is using?
> Can someone refer me to a specific file in the "source" directory of the source
> code which is responsible for the top-level ray-tracing?

Your are better off with a good book an ray-tracing. There are several 
listed in the documentation (older ones, so your library is likely to have 
them).

For a more current treatment, while it does cover lots of other subjects, 
"Real-Time Rendering" 3rd Edition is a good choice. It also explains how to 
do ray-tracing in parallel, and lots of other things.

	Thorsten


Post a reply to this message

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