POV-Ray : Newsgroups : povray.advanced-users : Nested objects limitations Server Time
29 Jul 2024 20:26:01 EDT (-0400)
  Nested objects limitations (Message 4 to 13 of 23)  
<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Slime
Subject: Re: Nested objects limitations
Date: 1 Jan 2002 22:29:20
Message: <3c327e90$1@news.povray.org>
Are you sure you're not creating something like this at any point?

union {
object{particle}
union{
object{particle}
union {
...repeating many times...
}
}
}

I ask because it's one way some people do collision detection with objects
that have already been created, and it creates many nested objects.

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


Post a reply to this message

From:
Subject: Re: Nested objects limitations
Date: 2 Jan 2002 02:17:49
Message: <cuc53uoi0nfppn8k91pdsevbjo9bdoi68t@4ax.com>
On Tue, 01 Jan 2002 18:58:54 +0100, Tim Nikias <Tim### [at] gmxde> wrote:
> If the amount is just too big, it crashes.

If there is crash then it is a bug, so try to report in proper group.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Peter Popov
Subject: Re: Nested objects limitations
Date: 2 Jan 2002 03:50:40
Message: <m8i53usojfp76gskqai3mq7511i3p0e26q@4ax.com>
On Tue, 01 Jan 2002 17:13:04 +0100, Tim Nikias <Tim### [at] gmxde>
wrote:

>I was creating an animation with some hundred particles using my
>particle-system, but got an "Too many nested objects"-error.

I know this may sound stupid but anyway... are you sure the 'union'
statement is outside the while loop?


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Nested objects limitations
Date: 2 Jan 2002 07:31:42
Message: <3c32fdae@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

>> If the amount is just too big, it crashes.
>
> If there is crash then it is a bug, so try to report in proper group.

You misunderstand his use of "crash".  in the post before he said POV-ray
shows an error message.  He and some other users call this a "crash"...

    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: Tim Nikias
Subject: For all those who actually answered!
Date: 2 Jan 2002 10:48:34
Message: <3C332B91.718020EB@gmx.de>
So, this is the pseudo-code:

//Macro
#macro Particle(Position)
 sphere{Position,1 hollow texture{Nice_And_Transparent}}
#end

union{
#declare C=0; #while (C < Particles)
 #declare This_Pos = Generate_Random_Position_Near_Origin
 Particle(This_Pos)
#declare C=C+1; #end
}

In effect, it should internally create something like:

union{
sphere{...}
sphere{...}
[...]
}

The actuall error-message occurs during tracing. The entire image itself
works fine, until
it reaches the particles, there it stops and aborts using the "too many
nested objects"-message.

It's not a crash (POV still works after that)
and I suppose it's not a bug (because this occurs only somewhat above
150 Particles or
such).

IMHO it has to do with several spheres overlapping, and POV-Ray can't
keep track
of it anymore (I read something like that somewhere at sometime...;)

So, I was just asking, how many objects-overlappings POV-Ray can handle.

This all DEFINITELY has NOTHING to do with UNIONs, since there is only
one
statement in the ENTIRE SCENE.

Still thanks for all the thoughts you gave, and hope, that perhaps now
someone has the answer
I'm looking for (after I've finally explained myself more precisely as I
should have in the first place).

Tim


Post a reply to this message

From: Gleb
Subject: Re: For all those who actually answered!
Date: 2 Jan 2002 14:08:42
Message: <3c335aba$1@news.povray.org>
I've found a number of 117 nested spheres with this code, which cause

the "Too many nested objects" error message. If  Particles<117, then it's OK
for spheres.

But for boxes the limit is Particles<112

//--------------------8<------------------

#declare Particles=117;
#macro Particle(Radius)
 sphere{0,Radius+1}

//box{-(Radius+1),Radius+1}
#end

union{
#declare R=0;
#while (R < Particles)
  Particle(R)
  #declare R=R+1;
#end
}
//--------------------8<------------------

atb,

gleb

"Tim Nikias" <Tim### [at] gmxde> wrote in message
news:3C332B91.718020EB@gmx.de...
>
> The actuall error-message occurs during tracing. The entire image itself
> works fine, until
> it reaches the particles, there it stops and aborts using the "too many
> nested objects"-message.
>
> and I suppose it's not a bug (because this occurs only somewhat above
> 150 Particles or
> such).
>
> IMHO it has to do with several spheres overlapping, and POV-Ray can't
> keep track
> of it anymore (I read something like that somewhere at sometime...;)
>
> So, I was just asking, how many objects-overlappings POV-Ray can handle.


Post a reply to this message

From: Ron Parker
Subject: Re: For all those who actually answered!
Date: 2 Jan 2002 15:13:08
Message: <slrna36qem.1q4.ron.parker@fwi.com>
On Wed, 2 Jan 2002 19:08:41 -0000, Gleb wrote:
> I've found a number of 117 nested spheres with this code, which cause
> 
> the "Too many nested objects" error message. If  Particles<117, then it's OK
> for spheres.
> 
> But for boxes the limit is Particles<112

It's actually 100.  It can be changed, but it'll probably still be hard-coded
to some value.  In your test code, your rays must be missing some of the 
smaller spheres and/or boxes.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Tim Nikias
Subject: Re: For all those who actually answered!
Date: 2 Jan 2002 15:39:09
Message: <3C336FA7.DDCDDB01@gmx.de>
>
> It's actually 100.  It can be changed, but it'll probably still be hard-coded
> to some value.  In your test code, your rays must be missing some of the
> smaller spheres and/or boxes.
>

Is it hard-coded from the beginning, or can it be changed with some global-setting?
Obviously (since I tried) max_trace_level has no effect...

Does the actual error occurr, if all objects that overlap would create a surface
(like when using intersection{})?

Tim


Post a reply to this message

From: Ron Parker
Subject: Re: For all those who actually answered!
Date: 2 Jan 2002 15:42:35
Message: <slrna36s5u.1r2.ron.parker@fwi.com>
On Wed, 02 Jan 2002 21:37:59 +0100, Tim Nikias wrote:
>>
>> It's actually 100.  It can be changed, but it'll probably still be hard-coded
>> to some value.  In your test code, your rays must be missing some of the
>> smaller spheres and/or boxes.
>>
> 
> Is it hard-coded from the beginning, or can it be changed with some global-setting?
> Obviously (since I tried) max_trace_level has no effect...
> 
> Does the actual error occurr, if all objects that overlap would create a surface
> (like when using intersection{})?

The error occurs when a ray finds that it's already inside of 100 objects and
is about to enter a 101st.  The number of objects is hard-coded and can't be
changed by the scene file or by an INI option.

One possible fix for your problem is to not specify 100% transparency and to
use a sensible adc_bailout.  Whether that will work for you depends on the
scene, of course.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Gleb
Subject: Re: Nested objects limitations
Date: 2 Jan 2002 15:46:45
Message: <3c3371b5$1@news.povray.org>
Check if  "bounded_by" will help for your scene.

atb,
gleb

> this may be changed somehow (and if yes, then how). I thought
> about implementing a check into the algorithm which avoids the
> problem...


Post a reply to this message

<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>

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