POV-Ray : Newsgroups : povray.general : Some general questions about LONG traces - newbie Server Time
15 Nov 2024 23:22:10 EST (-0500)
  Some general questions about LONG traces - newbie (Message 1 to 10 of 10)  
From: Stefan Viljoen
Subject: Some general questions about LONG traces - newbie
Date: 15 May 2004 04:04:29
Message: <40a5cf0b@news.povray.org>
Hi guys

I am fairly new to PovRay and I have ran into some issues - wonder if you
can help?

1. What is a common trace time for complex images (lots of reflection /
refraction, many objects)

I realise this is subjective, but I have reasonably simple scenes (10 000
objects, and about 30 reflective/refractive objects, ten light sources)
that take literally weeks to render while various IRTC entries I have seen,
with scenes literally thousands of times more complex (as regards APPARENT
objects and reflections / refractions) done with PovRay, render in times of
2 or 4 hours. So IS two weeks tracetime (or even a month) for a 1152x864
image acceptable, or am I doing something exceedingly stupid? Or is this so
subjective its not worth an answer? I am referring to times on a
"standard"-ish system - P4 2.0 GHz with 512MB on Rh9 Linux, the raytrace
being the only user process running.

Is there anybody else out there with such long tracetimes? How did you
reduce them without losing scene quality?

2. How exactly to use adc_bailout?

To decrease render time in scenes with lots of reflections / refraction, it
seems to me that I should use larger adc_bailout values (0.05+ ?) and lower
max_trace_level values (5 or less?) The default values are taking simply
too long - and apparently there is no difference for me yet, as a test
scene is taking forty hours to get to a certain point, with or without
adc_bailout set to 0.05 and max_trace_level set to 5, while having the
reflective and refractive objects in that particular part of the image.

3. Aborting?

If I abort a trace in the middle of a horizontal line, do the pixels
calculated up to that point get saved to disk? I. e. if tracing one line of
1152 pixels takes two hours, and I abort an hour into the line, do I loose
all the pixels finished up to that point, or does PovRay resume from there?
Or does it start over a x=0 on that line? What if I force PovRay to exit
instead of CTRL-C (in Linux) and waiting for it to exit in its own time?
Can I force PovRay to write each, say, 25 pixels to disk? How does the
abort_count option influence this? Does it control how regularly pixels are
saved to file?

4. Pointers / hints?

Any URL's or info on PovRay optimisation? I have often looked for
optimisation guides for programming, but are there any for the PovRay scene
language?

5. Reasons for scanline renderers being faster - is scanline better?

I have seen images created with 3DStudio that would (I think) take YEARS to
render with PovRay. Which technique is better, i. e. which program is
better - a scanline renderer (what does that mean? What is the difference
between that and raytracing?) or a raytracer? I have heard about IPAS
modules for 3DStudio that do raytracing - so 3DS can do both? Why is
scanline so very much faster than raytracing, but looks just as good?

Anyway, thanks for your time!

Regards,

-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 05:05:55
Message: <40a5dd73$1@news.povray.org>
Quiet an extensive set of questions you've got there...

> 1. What is a common trace time for complex images (lots of reflection /
> refraction, many objects)

This truly depends on the scene, how much the objects interreflect each
other etc.

> 2. How exactly to use adc_bailout?

I never fiddle with that one unless using Focal blur.

> 3. Aborting?

AFAIK, POV-Ray automatically saves to disk, but in bunches. I believe that
can't be properly controlled (in terms of every 25 pixels or such), but
rather in Bytes. But someone should correct me on this.

> 4. Pointers / hints?

I've got none.

> 5. Reasons for scanline renderers being faster - is scanline better?

Scanline has some advantages that a raytracer doesn't have. For one, it
makes use of the GPU's it may find on a Graphic card. Most of the
calculations don't require heavy floating point calculations, which is
pretty slow on some processors and, AFAIK, not a part of the CPU which is
needed that often, hence it isn't as accessible and quick like other
operations. The main performance part lie in those two points: making use of
the graphics hardware and the slow performance when comparing that to the
floating point calculations. Just look at typical PC Games, they're scanline
all over the place, and they've sometimes got tons of triangles to display.
But then again, scanline simulates a lot and doesn't always have the precise
calculations raytracing offers.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Warp
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 08:02:07
Message: <40a606bf@news.povray.org>
Stefan Viljoen <rylan@ <deletehis> wrote:
> 2. How exactly to use adc_bailout?

  If I'm not completely mistaken, adc_bailout does not work in POV-Ray 3.5
due to a bug, but AFAIK this has been fixed in POV-Ray 3.6.

> 4. Pointers / hints?

http://tag.povray.org/povQandT/miscQandT.html#renderingspeed

> 5. Reasons for scanline renderers being faster - is scanline better?

  Basically scanline rendering makes tons of shortcuts to produce images
which look similar to raytraced images, but which really aren't. There
are many things which are practically impossible to do with a scanline
renderer and which are trivial with a raytracer (for example two
reflecting objects reflecting each other again and again and again).

  If a raytracer used the same tricks as most scanline renderers to
achieve certain effects (such as shadows by using lightmaps instead of
tracing, reflections using reflection maps instead of tracing, using
only triangles to build the scene, etc etc) it would speed it up
considerably. However, raytracers are usually not intended for that:
When you want a raytracer you want it because you want precise shadows,
precise reflections, precise refractions, precise mathematical surfaces etc.

  Another reason is that most effects are very easy to implement with
a raytracer but very laborious to implement in a scanline renderer.
For example the reflection calculations in a raytracer (once you have
the basic tracing function done) can perfectly be done in less than 10
lines of simple code. In a scanline renderer good-looking reflections
require thousands of lines of complicated code (in addition to the
basic triangle projection code).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Alain
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 09:37:35
Message: <40a61d1f$1@news.povray.org>
Stefan Viljoen <rylan@ nous apporta ses lumieres ainsi en ce 2004/05/15 
04:00... :

>Hi guys
>
>I am fairly new to PovRay and I have ran into some issues - wonder if you
>can help?
>
>1. What is a common trace time for complex images (lots of reflection /
>refraction, many objects)
>
>I realise this is subjective, but I have reasonably simple scenes (10 000
>objects, and about 30 reflective/refractive objects, ten light sources)
>that take literally weeks to render while various IRTC entries I have seen,
>with scenes literally thousands of times more complex (as regards APPARENT
>objects and reflections / refractions) done with PovRay, render in times of
>2 or 4 hours. So IS two weeks tracetime (or even a month) for a 1152x864
>image acceptable, or am I doing something exceedingly stupid? Or is this so
>subjective its not worth an answer? I am referring to times on a
>"standard"-ish system - P4 2.0 GHz with 512MB on Rh9 Linux, the raytrace
>being the only user process running.
>
>Is there anybody else out there with such long tracetimes? How did you
>reduce them without losing scene quality?
>  
>
Each light increase significantly the render time. Sometimes, you can 
reduce the number of light by using a shadowless light or by changing 
the ambient value. If a light only affect a small part of your scene, 
make it a spot light. Features like focal_blur, photons and radiosity 
increase render time. Turn off the first two for the test renders. For 
small, distent or partly occulted object, use lower settings, simpler 
textures, normal instead of iso_surface.

><snip>
>4. Pointers / hints?
>
>Any URL's or info on PovRay optimisation? I have often looked for
>optimisation guides for programming, but are there any for the PovRay scene
>language?
>  
>
Using isosurfaces? Try using tighter bounding shapes. Fine tune 
max_gradient to make it as small as possible. Having a cylindrical or 
spherical iso? Try to replace it with a similarly looking lathe or sor.
If you have intersection or difference of very large or infinite 
primitives, use manual bounding.

>5. Reasons for scanline renderers being faster - is scanline better?
>
>I have seen images created with 3DStudio that would (I think) take YEARS to
>render with PovRay. Which technique is better, i. e. which program is
>better - a scanline renderer (what does that mean? What is the difference
>between that and raytracing?) or a raytracer? I have heard about IPAS
>modules for 3DStudio that do raytracing - so 3DS can do both? Why is
>scanline so very much faster than raytracing, but looks just as good?
>  
>
Scanline use shortcuts, hardware acceleration, use 
prerendered/precalculated elements, use fake reflections, usualy don't 
bother with refraction (I saw one (1) exeption). Fast and dirty.

>Anyway, thanks for your time!
>
>Regards,
>
Alain


Post a reply to this message

From: Christopher James Huff
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 11:40:45
Message: <cjameshuff-FBFC1F.10405615052004@news.povray.org>
In article <40a5cf0b@news.povray.org>,
 Stefan Viljoen <rylan@<deletehis> wrote:

> 1. What is a common trace time for complex images (lots of reflection /
> refraction, many objects)

Minutes to hours, for me.


> I realise this is subjective, but I have reasonably simple scenes (10 000
> objects, and about 30 reflective/refractive objects, ten light sources)
> that take literally weeks to render while various IRTC entries I have seen,
> with scenes literally thousands of times more complex (as regards APPARENT
> objects and reflections / refractions) done with PovRay, render in times of
> 2 or 4 hours. So IS two weeks tracetime (or even a month) for a 1152x864
> image acceptable, or am I doing something exceedingly stupid? Or is this so
> subjective its not worth an answer? I am referring to times on a
> "standard"-ish system - P4 2.0 GHz with 512MB on Rh9 Linux, the raytrace
> being the only user process running.

You're probably doing something stupid. ;-)
There are things that will take that long, but usually just odd 
experiments. Typical scenes don't take weeks to render.


> 2. How exactly to use adc_bailout?
> 
> To decrease render time in scenes with lots of reflections / refraction, it
> seems to me that I should use larger adc_bailout values (0.05+ ?) and lower
> max_trace_level values (5 or less?) The default values are taking simply
> too long - and apparently there is no difference for me yet, as a test
> scene is taking forty hours to get to a certain point, with or without
> adc_bailout set to 0.05 and max_trace_level set to 5, while having the
> reflective and refractive objects in that particular part of the image.

I generally set max_trace_level to at least 12. Higher values of 
adc_bailout will make POV stop tracing sooner. My guess is that you're 
doing something else that's causing the high render times.


> 4. Pointers / hints?
> 
> Any URL's or info on PovRay optimisation? I have often looked for
> optimisation guides for programming, but are there any for the PovRay scene
> language?

None that I know of which are specifically for optimizing. The manual 
has some general pointers for specific features like radiosity and 
photons.


> 5. Reasons for scanline renderers being faster - is scanline better?

It is for realtime display of the type used by today's games, and for 
other applications where speed is of great importance.

Raytracers simulate the actual paths light takes through the scene. It 
follows the light that in the real world would enter the camera back 
into the scene, and then figures the illumination from light sources and 
the environment which contributes to that light. It handles refraction, 
reflection, and diffuse illumination with trivial additions, and can 
easily be extended to include things like photon maps.

Scanline renderers, on the other hand, use a process more like painting 
or drawing. They consider the scene as a bunch of polygons, and project 
each polygon onto the screen, filling each polygon scanline by scanline 
and compositing it onto the existing image. They really can't do 
reflection or refraction, they have to fake it with things like 
environment maps...a view of the surrounding scene is rendered from a 
point inside the refracting/reflecting object, and that view is mapped 
on the surface of the object, using the normals and camera position to 
make it look something like reflection or refraction. You could do the 
environment map for every vertex or every pixel instead, but this would 
basically be doing raytracing with a scanline engine, and would probably 
be even slower than an actual raytracer. Scanline renderers usually use 
raytracing for accurate reflections, shadows, and transparent objects.


> I have seen images created with 3DStudio that would (I think) take YEARS to
> render with PovRay.

Unlikely. Raytracing actually performs better than scanlining with 
extreme amounts of detail.


> Which technique is better, i. e. which program is
> better - a scanline renderer (what does that mean? What is the difference
> between that and raytracing?) or a raytracer?

Raytracers are more accurate. Scanline renderers are generally faster 
for typical scenes being done today.


> I have heard about IPAS
> modules for 3DStudio that do raytracing - so 3DS can do both? Why is
> scanline so very much faster than raytracing, but looks just as good?

3DS can mix raytracing into its scanline renderings. I don't know if it 
does full raytracing...doing so would not be difficult, though. And 
scanline renders typically *don't* look just as good

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: ingo
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 11:54:00
Message: <Xns94EAB61692379seed7@news.povray.org>
in news:40a5cf0b@news.povray.org Stefan Viljoen <rylan@ wrote:

> I have often looked for
> optimisation guides for programming, but are there any for the PovRay
> scene language?
> 

Stefan,

POV-Ray has two tools to help you see what is going on in your scene.
- The statistics output after rendering, espescialy the ray-shape 
intersections part.
- The histogram, it gives you a good indication what sections of your 
image take the most time.

Now knowing the existence of these is one thing, using them in a usefull 
way is another. It would be nice if somebody wrote a tutorial on using 
these and possible other methods for optimising the rendering. The 
advanced section of the docs could use something in that direction.


Ingo


Post a reply to this message

From: Alain
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 12:15:15
Message: <40a64213@news.povray.org>
Stefan Viljoen <rylan@ nous apporta ses lumieres ainsi en ce 2004/05/15 
04:00... :
<snip>
Could you post your problem scene(s) in povray.binaries.scene-files so 
peoples can have a look and maybe spot just what is causing your renders 
to take so long.

Alain


Post a reply to this message

From: Slime
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 14:34:33
Message: <40a662b9@news.povray.org>
> 2. How exactly to use adc_bailout?


As Warp said, adc_bailout is buggy in POV-Ray 3.5. Don't bother with it
unless you're using the 3.6 beta.

As for your slow scene, I recommend you show us the scene file. Tricks to
speed it up will likely be specific to the scene and how you're doing things
within it.

10 light sources is a lot though; see if you can cut that down. Turning some
of them into spotlights, or using light_groups may help also.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Stefan Viljoen
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 16:12:39
Message: <40a679af@news.povray.org>
Thanks guys!

I'll try fewer lights and tighter bounding... darn! Glad I found POV and
that there are such nice ppl in the community, willing to help a newbie.

Happy (and QUICK :) tracing.

-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: Christopher James Huff
Subject: Re: Some general questions about LONG traces - newbie
Date: 15 May 2004 16:13:12
Message: <cjameshuff-6BA3F5.15132415052004@news.povray.org>
In article <40a662b9@news.povray.org>, "Slime" <fak### [at] emailaddress> 
wrote:

> > 2. How exactly to use adc_bailout?
> 
> As Warp said, adc_bailout is buggy in POV-Ray 3.5. Don't bother with it
> unless you're using the 3.6 beta.

As I recall, it's buggy in radiosity, but the setting used for reflected 
and refracted rays does work.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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