POV-Ray : Newsgroups : povray.general : max_trace_level Server Time
5 Aug 2024 18:23:31 EDT (-0400)
  max_trace_level (Message 1 to 10 of 41)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rafal 'Raf256' Maj
Subject: max_trace_level
Date: 18 Aug 2002 21:08:56
Message: <Xns926F1F67C81D6raf256com@204.213.191.226>
Hello,
I was just wondering - why max_trace_level has been limited in pov 3.5 to 
256 ? Some older scenes, especialy using lens flares [1] macros need AFAIR 
mex_trace_level of 500 ... 3000

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Warp
Subject: Re: max_trace_level
Date: 18 Aug 2002 21:23:07
Message: <3d60487b@news.povray.org>
Rafal 'Raf256' Maj <raf### [at] raf256com> wrote:
> I was just wondering - why max_trace_level has been limited in pov 3.5 to 
> 256 ?

  It was decided that limiting the max_trace_level is better than getting
a buffer overflow crash (which simply can't be helped).

-- 
#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: Thorsten Froehlich
Subject: Re: max_trace_level
Date: 19 Aug 2002 02:49:53
Message: <3d609511@news.povray.org>
In article <3d60487b@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

> buffer overflow crash

You know the correct term Warp.  Please correct yourself ;-)

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: max_trace_level
Date: 19 Aug 2002 02:52:13
Message: <3d60959d@news.povray.org>
In article <Xns### [at] 204213191226>, "Rafal 'Raf256' Maj"
<raf### [at] raf256com> wrote:

> Some older scenes, especialy using lens flares [1] macros need AFAIR
> mex_trace_level of 500 ... 3000

No, you not only not needed it, but you could not have used it either.  If
you had needed such a max_trace_level there would have been a hard crash of
POV-Ray long before you had reached it.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Micha Riser
Subject: Re: max_trace_level
Date: 19 Aug 2002 03:49:54
Message: <3d60a321@news.povray.org>
Thorsten Froehlich wrote:

> In article <Xns### [at] 204213191226>, "Rafal 'Raf256'
> Maj" <raf### [at] raf256com> wrote:
> 
>> Some older scenes, especialy using lens flares [1] macros need AFAIR
>> mex_trace_level of 500 ... 3000
> 
> No, you not only not needed it, but you could not have used it either.  If
> you had needed such a max_trace_level there would have been a hard crash
> of POV-Ray long before you had reached it.

That's not true. I had scenes with max_trace_level 1000 which also reached 
this level. And I just did a test with two facing mirrors: max_trace_level 
5000 was reached.. I do not think the linux version of POV-Ray ever had a 
crash because of that. So I see no point in limiting max_trace_level in all 
POV-Ray version just beacuse some crappy OS can't handle it.

- Micha

-- 
http://objects.povworld.org - the POV-Ray Objects Collection


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: max_trace_level
Date: 19 Aug 2002 03:58:17
Message: <Xns926F64BA910C0raf256com@204.213.191.226>
"Thorsten Froehlich" <tho### [at] trfde> wrote in
news:3d60959d@news.povray.org 

>> Some older scenes, especialy using lens flares [1] macros need AFAIR
>> mex_trace_level of 500 ... 3000
> No, you not only not needed it, but you could not have used it either.
>  If you had needed such a max_trace_level there would have been a hard
> crash of POV-Ray long before you had reached it.

are You shure ?

I ques that You are talking about i.e. glas - where each ray needs to next 
rays (reflected and refracted) and that in 256 levels leads to 2^256 rays 
with shurely will crash pov.

but imagine
1. solid mirror (no filter)
2. only filter (like lans flare)

and Im 100% shure that levels >256 are needed - some scenes with flares 
rendered incorecctly at level < 500 (they contained black spots), and 
author alsow informed in documentation that max_trace_level >1000 is needed


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: max_trace_level
Date: 19 Aug 2002 04:33:00
Message: <3d60ad3c@news.povray.org>
In article <3d60a321@news.povray.org> , Micha Riser <mri### [at] gmxnet>  wrote:

> That's not true. I had scenes with max_trace_level 1000 which also reached
> this level. And I just did a test with two facing mirrors: max_trace_level
> 5000 was reached..

Of course it depends on the scene to some extend.  Yes, you can create
really simple scenes that will not crash, but that does not mean that adding
a few semitransparent objects with reflection and refraction won't get you
there.

POV-Ray cannot know in advance which objects you will have in what order in
your scene, so it cannot tell if the scene may work or may not.  It would
have to know the scene before it has read it to gather such information,
which would still be complex to do even if this could be avoided by placing
max_trace_level at the end of the scene.

Fact is that there have been numerous crash reports with all official
versions because of stack overflows caused by too high max_trace_level.  And
there had to be some default limit, which happens to be 256.  BTW, by far
most scenes do not have such a number of perfectly reflecting objects in
their scene to even reach a max_trace_level of 256 before reaching
adc_bailout.

> I do not think the linux version of POV-Ray ever had a
> crash because of that. So I see no point in limiting max_trace_level in all
> POV-Ray version just beacuse some crappy OS can't handle it.

Nobody said you cannot change it, or did I miss something?  If you think
your program configuration (it has absolutely nothing to do with the OS btw)
will handle it, just define MAX_TRACE_LEVEL_LIMIT to something bigger in
config.h and compile POV-Ray yourself.  No big deal.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Thies Heidecke
Subject: Re: max_trace_level
Date: 19 Aug 2002 05:11:31
Message: <3d60b643@news.povray.org>
Hi,

"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in
news:Xns### [at] 204213191226...
> "Thorsten Froehlich" <tho### [at] trfde> wrote in
> news:3d60959d@news.povray.org
>
> >> Some older scenes, especialy using lens flares [1] macros need AFAIR
> >> mex_trace_level of 500 ... 3000
> > No, you not only not needed it, but you could not have used it either.
> >  If you had needed such a max_trace_level there would have been a hard
> > crash of POV-Ray long before you had reached it.
>
> are You shure ?
>
> I ques that You are talking about i.e. glas - where each ray needs to next
> rays (reflected and refracted) and that in 256 levels leads to 2^256 rays
> with shurely will crash pov.
>
> but imagine
> 1. solid mirror (no filter)
> 2. only filter (like lans flare)
>
> and Im 100% shure that levels >256 are needed - some scenes with flares
> rendered incorecctly at level < 500 (they contained black spots), and
> author alsow informed in documentation that max_trace_level >1000 is needed
just for comparison:
many commercial 3D-Apps limit their Raytracing Recursionlevel to something
between 10 and 20, at most perhaps 100, so the current limit of 256 is already
exceptional compared with other Applications.


Greetings,
Thies


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: max_trace_level
Date: 19 Aug 2002 06:20:42
Message: <Xns926F7CF153641raf256com@204.213.191.226>
"Thies Heidecke" <h3i### [at] gmxnet> wrote in news:3d60b643@news.povray.org

> just for comparison:
> many commercial 3D-Apps limit their Raytracing Recursionlevel to
> something between 10 and 20, at most perhaps 100, so the current limit
> of 256 is already exceptional compared with other Applications.

I always was shure that POV is the best :)

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Warp
Subject: Re: max_trace_level
Date: 19 Aug 2002 08:07:56
Message: <3d60df9c@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
>> buffer overflow crash

> You know the correct term Warp.  Please correct yourself ;-)

  Stack overflow.

-- 
#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

Goto Latest 10 Messages Next 10 Messages >>>

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