 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I was creating an animation with some hundred particles using my
particle-system, but got an "Too many nested objects"-error.
I do know the reason for this and don't want this to be taken as
bug-report or such.
I just wanted to know, how many objects may be nested, and if
this may be changed somehow (and if yes, then how). I thought
about implementing a check into the algorithm which avoids the
problem...
Thanks in advance,
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3C31E010.3AD70CE1@gmx.de> , Tim Nikias <Tim### [at] gmx de>
wrote:
> I was creating an animation with some hundred particles using my
> particle-system, but got an "Too many nested objects"-error.
> I do know the reason for this and don't want this to be taken as
> bug-report or such.
> I just wanted to know, how many objects may be nested, and if
> this may be changed somehow (and if yes, then how). I thought
> about implementing a check into the algorithm which avoids the
> problem...
Without knowing your scene it is not possible to really help you. You
probably just use some inefficient way to generate the particles in a
recursive way. Per se there is never any need to build object "trees" in a
completely recursive way, nor would it be efficient, i.e. if you are using
unions POV-ray would ten just need time to split them or be very slow.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I thought the nested-objects-error was due to overlapping
media-particles (a bunch of overlapping spheres, transparent
texture, no_shadow). If the amount is just too big, it crashes.
The system does not place tons of unions, only one around all
the macro-calls required for the particles (which doesn't use
a union either).
In simplified version it's like this:
#macro Particle(Position,Parameters)
sphere{Position, Parameter_Radius material{Parameter_Material}}
#end
#declare Objects=union{
#declare S=0; #while (S<200)
Particle(Some_Position_near_origin,Other_Parameters)
#declare S=S+1;
#end
}
Hope this clarifies the problem a bit...
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 01 Jan 2002 18:58:54 +0100, Tim Nikias <Tim### [at] gmx de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 01 Jan 2002 17:13:04 +0100, Tim Nikias <Tim### [at] gmx de>
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] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <cuc53uoi0nfppn8k91pdsevbjo9bdoi68t@4ax.com> , W„odzimierz ABX
Skiba <abx### [at] babilon org> 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] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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] gmx de> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hmm. So much for creating an animation using MILLIONS OF TRANSPARENT MEDIA OBJECTS!
;)
Ah well, I'll find one solution or another, but thanks for giving away a dark little
secret of POV-Ray... ;)
Perhaps it could be mentioned somewhere in the docs for advanced-users or such, like
"Not-so common scene pitfalls" or such.
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 02 Jan 2002 10:48:38 +0200, Peter Popov <pet### [at] vip bg> wrote:
>I know this may sound stupid but anyway... are you sure the 'union'
>statement is outside the while loop?
Scratch that, it seems like you've hit an internal limit... somewhat
like max_intersections, but not quite, it's the maximum number of
nested objects a ray can be in (99 or 127, IIRC).
A solution? Well, try to avoid that at parse time, i.e. incorporate
some collision detection algorithm so that the particles do not nest
that much. Or use a blob instead of a union.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tim Nikias wrote:
>
> Hmm. So much for creating an animation using MILLIONS OF TRANSPARENT MEDIA OBJECTS!
Not really. There is nothing wrong with animating millions of objects.
Animating millions of objects nested inside of each other is, well,
just plain silly.
:^}
--
Ken Tyler
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3C3371BA.C7B39EAF@gmx.de>, Tim Nikias <Tim### [at] gmx de>
wrote:
> Hmm. So much for creating an animation using MILLIONS OF TRANSPARENT MEDIA
> OBJECTS!
Hmm...would it help to merge the objects? It would depend on how your
media is set up...it wouldn't work very well if you are relying on the
objects to contain the media. Another thing that may help would be to
put multiple medias inside one object.
--
--
Christopher James Huff <chr### [at] mac com>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Animating millions of objects nested inside of each other is, well,
> just plain silly.
Nope. Imagine animating millions of objects, and COINCIDENTALLY, they overlap!
A particle-system is also meant to use thousands of objects for major effect, for what
else? (okay, I am being a little pushy) ;)
Also, my main problem was concerned with about 200 objects, not millions of em... ;)
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I am relying on the objects as containers for the media (in most cases, they are
spherical media), but I also thought that somehow using one container with
hundreds
of media might be possible (though difficult to handle interval- and
sampling-wise).
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3C348A9B.6F280CE1@gmx.de>, Tim Nikias <Tim### [at] gmx de>
wrote:
> I am relying on the objects as containers for the media (in most
> cases, they are spherical media), but I also thought that somehow
> using one container with hundreds of media might be possible (though
> difficult to handle interval- and sampling-wise).
Well, if you are using MegaPOV or the 3.5 beta, you should be able to
use the object pattern to contain the media.
--
--
Christopher James Huff <chr### [at] mac com>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > Animating millions of objects nested inside of each other is, well,
> > just plain silly.
>
> Nope. Imagine animating millions of objects, and COINCIDENTALLY, they
overlap!
> A particle-system is also meant to use thousands of objects for major
effect, for what
> else? (okay, I am being a little pushy) ;)
>
> Also, my main problem was concerned with about 200 objects, not
millions of em... ;)
I don't suppose there's any clever way you could define the density map
for the media without all the overlapping spheres, is there? As in,
provide the density for a large container object that is the same as
several smaller spheres, then use considerably fewer of these specially
created container objects. Instinctively, though, this would
immediately suggest greatly increased render / parse / scene-writing
times unless it is a trivial matter...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I don't suppose there's any clever way you could define the density map
> for the media without all the overlapping spheres, is there? As in,
> provide the density for a large container object that is the same as
> several smaller spheres, then use considerably fewer of these specially
> created container objects. Instinctively, though, this would
> immediately suggest greatly increased render / parse / scene-writing
> times unless it is a trivial matter...
Well, one could perhaps put hundreds of media inside one container-object,
but I think POV doesn't want to handle that many (though I haven't tried,
but
I think it is mentioned somewhere that there is some limit).
Tim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sun, 06 Jan 2002 11:37:53 +0100, Tim Nikias <Tim### [at] gmx de>
wrote:
>Well, one could perhaps put hundreds of media inside one container-object,
>but I think POV doesn't want to handle that many (though I haven't tried,
>but
POV doesn't mind working with multiple media. I think I've got to
10000 when I was playing with smoke, but that was a few years ago and
I may not be remembering correctly.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |