POV-Ray : Newsgroups : povray.general : Out of memory errors Server Time
7 Aug 2024 17:26:46 EDT (-0400)
  Out of memory errors (Message 1 to 6 of 6)  
From: Mike Metheny
Subject: Out of memory errors
Date: 14 Jul 2001 12:59:43
Message: <3b507a7f$1@news.povray.org>
Okay; POV doesn't seem to play nice with memory.  I've got a data file I'm
trying to parse and render.  It's over 13 megs, and is basically around
320,000 spheres (I estimate. . .I don't know exactly; that's a rough
mathematical guess).  I tried rendering it on my computer and it sucked up
all my pagefile, and gave me an error after about 6 minutes of parsing
(during that time I could not do anything on my computer).

So I took it to my roommate's computer (much faster).  I started it, and
after some 10 hours of parsing, I got the same error.

So the question is, how do I go about rendering something like this?  I'm
quite upset with POV, it really really sucks up all resources, even in
win2k, which has good memory management.

Could one of my problems be the union statement that encompasses all of
these spheres?  I only put that in there for convenience to just 'group' the
spheres.  If this is screwing me over, it's easily removable.

So, how do I render this sucker without fubaring my computer?

Thanks. . .

--


Mike Metheny

"He that breaks a thing to find out what it is has left the path of wisdom."


Post a reply to this message

From: Chris Jeppesen
Subject: Re: Out of memory errors
Date: 14 Jul 2001 14:33:49
Message: <3b50908d$1@news.povray.org>
Is it possible to apply the same texture to all of your spheres? I was
working on a fractal sphereflake
with 55000 or so spheres. First time around I did it like this:
union {
  sphere {
    center,rad
    texture {tex}
  }
  sphere {
    center,rad
    texture {tex}
  }
  :
  :
}
This took 1 minute to parse and reported 57MB of memory usage.
Then I tried the following

union {
  sphere {
    center,rad
  }
  sphere {
    center,rad
  }
  :
  :
  texture {tex}
}

It looked identical to the original but took less than 10sec to parse and
consumed 17MB.

If at all possible, try something like this.

"Mike Metheny" <lon### [at] vtedu> wrote in message
news:3b507a7f$1@news.povray.org...
> Okay; POV doesn't seem to play nice with memory.  I've got a data file I'm
> trying to parse and render.  It's over 13 megs, and is basically around
> 320,000 spheres (I estimate. . .I don't know exactly; that's a rough
> mathematical guess).  I tried rendering it on my computer and it sucked up
> all my pagefile, and gave me an error after about 6 minutes of parsing
> (during that time I could not do anything on my computer).
>
> So I took it to my roommate's computer (much faster).  I started it, and
> after some 10 hours of parsing, I got the same error.
>
> So the question is, how do I go about rendering something like this?  I'm
> quite upset with POV, it really really sucks up all resources, even in
> win2k, which has good memory management.
>
> Could one of my problems be the union statement that encompasses all of
> these spheres?  I only put that in there for convenience to just 'group'
the
> spheres.  If this is screwing me over, it's easily removable.
>
> So, how do I render this sucker without fubaring my computer?
>
> Thanks. . .
>
> --
>
>
> Mike Metheny
>
> "He that breaks a thing to find out what it is has left the path of
wisdom."
>
>


Post a reply to this message

From: Mike Metheny
Subject: Re: Out of memory errors
Date: 14 Jul 2001 14:40:41
Message: <3b509229$1@news.povray.org>
<< Is it possible to apply the same texture to all of your spheres? >>

Well there will be 4 different textures applied.  I could adjust my parsing
script (which takes a file containing the point coordinates and which
texture should be applied and translates it to POV scene language) to group
the spheres by texture.

--


Mike Metheny

"He that breaks a thing to find out what it is has left the path of wisdom."


Post a reply to this message

From: Warp
Subject: Re: Out of memory errors
Date: 14 Jul 2001 17:11:05
Message: <3b50b569@news.povray.org>
Mike Metheny <lon### [at] vtedu> wrote:
: So the question is, how do I go about rendering something like this?  I'm
: quite upset with POV, it really really sucks up all resources, even in
: win2k, which has good memory management.

  "Good memory management" doesn't mean that there's more memory available.
In fact, win2k uses unbelievable amounts of memory for nothing. If you want
to get more memory available you should use an OS which isn't such a memory
hog.

  Anyways, your problem is probably that you are making too many instances
of a too large item. Specially if each sphere has its own texture, you are
just hogging the memory very effectively. If there are too many, no OS can
help if it fills physical memory and swap space.

  Whether or not you can optimize the scene to take less memory or not
depends on how the spheres are arranged.
  If the spheres are arranged totally randomly, without any repeating
patterns, there's little one can do (except not wasting memory by giving
each sphere its own texture).

  If some spheres form a group and this group is then copied several times
to form a larger structure, then you are in luck.
  If this is the case, the answer is making a mesh.
  POV-Ray is surprisingly efficient with meshes. I once made a test where
I made a mesh object with more than 100000 smooth triangles in it and then
copied it many times so that the total number of triangles in the scene was
more than 31 millions (about half of the triangles were visible in the image
in some way or another).
  POV-Ray reported a peak memory usage of only 20 Megs, and the scene
rendered (with three light sources) at 640x480 in just 1 minute.

  So if you have a (preferably big) group of spheres, what you should do is
to create the spheres with smooth triangles (you can use quite a lot triangles
to do it) and put them in a mesh. Then you can copy this mesh exactly as you
would do with a union of real spheres.
  Don't make the mistake of making a mesh with one sphere and copy this mesh,
because that will not help you at all. Only when you can group lots of spheres
inside the same mesh and then copy this bigger group is when you'll start
getting advantages.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Fabien Hénon
Subject: Re: Out of memory errors
Date: 16 Jul 2001 17:43:53
Message: <3B536175.650B293C@club-internet.fr>
Instead of using union {, try merge {.

I had the same kind of problem and I found it help a lot. I don't figure out how
though.

Fabien HENON



> Okay; POV doesn't seem to play nice with memory.  I've got a data file I'm
> trying to parse and render.  It's over 13 megs, and is basically around
> 320,000 spheres (I estimate. . .I don't know exactly; that's a rough
> mathematical guess).  I tried rendering it on my computer and it sucked up
> all my pagefile, and gave me an error after about 6 minutes of parsing
> (during that time I could not do anything on my computer).
>
> So I took it to my roommate's computer (much faster).  I started it, and
> after some 10 hours of parsing, I got the same error.
>
> So the question is, how do I go about rendering something like this?  I'm
> quite upset with POV, it really really sucks up all resources, even in
> win2k, which has good memory management.
>
> Could one of my problems be the union statement that encompasses all of
> these spheres?  I only put that in there for convenience to just 'group' the
> spheres.  If this is screwing me over, it's easily removable.
>
> So, how do I render this sucker without fubaring my computer?
>
> Thanks. . .
>
> --
>
> Mike Metheny
>
> "He that breaks a thing to find out what it is has left the path of wisdom."


Post a reply to this message

From: Andy Cocker
Subject: Re: Out of memory errors
Date: 16 Jul 2001 20:06:55
Message: <3b53819f@news.povray.org>

news:3B536175.650B293C@club-internet.fr...
> Instead of using union {, try merge {.
>
> I had the same kind of problem and I found it help a lot. I don't figure
out how
> though.
>
 Wouldn't that be even MORE memory intensive?

Andy


Post a reply to this message

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