POV-Ray : Newsgroups : povray.newusers : Rendering memory limitations Server Time
24 Nov 2024 23:28:17 EST (-0500)
  Rendering memory limitations (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: pirateprincess
Subject: Rendering memory limitations
Date: 17 May 2007 00:50:01
Message: <web.464bdea734f9c3f4d5b864c00@news.povray.org>
I have been working with .POV scenes generated from PyMOL (PDB crystal
structure files).  I am trying to tesselate a specific crystal structure
image across a plane and have utilized 15-20 copies of a simple DNA double
helix.  The .POV file is roughly 30 megabytes.  I am working on a quad-core
G5 (Mac OS X 10.4.9, Pov-Ray 3.6.1 for Mac) with 4GB RAM and am receiving an
error that reads "Parse Error: Out of memory.  Cannot allocate 116 bytes for
finish.  File my_scene.pov line 665798"

Are there simple ways to fix this problem?  Is more information needed to
help diagnose the problem / suggest a solution?


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rendering memory limitations
Date: 17 May 2007 08:17:28
Message: <464c47d8$1@news.povray.org>
"pirateprincess" <pir### [at] charternet> schreef in bericht 
news:web.464bdea734f9c3f4d5b864c00@news.povray.org...
>I have been working with .POV scenes generated from PyMOL (PDB crystal
> structure files).  I am trying to tesselate a specific crystal structure
> image across a plane and have utilized 15-20 copies of a simple DNA double
> helix.  The .POV file is roughly 30 megabytes.  I am working on a 
> quad-core
> G5 (Mac OS X 10.4.9, Pov-Ray 3.6.1 for Mac) with 4GB RAM and am receiving 
> an
> error that reads "Parse Error: Out of memory.  Cannot allocate 116 bytes 
> for
> finish.  File my_scene.pov line 665798"
>
> Are there simple ways to fix this problem?  Is more information needed to
> help diagnose the problem / suggest a solution?
>
I am not sure if I can help, but at least, there are a couple of questions.
1) I suppose your file is the one called my_scene.pov? Can you tell us what 
is written at and around line 665798 of that file? I assume it refers to a 
finish{} statement...
2) You use 15-20 copies of a simple DNA double helix. Are they referenced 
copies? or is the complete code just copied 15-20 times? That would account 
for the large file (and perhaps for the parse error, but I am not sure). To 
make a referenced copy of your helix, do the following:

#declare My_helix =
union {
  my DNA code
}
object {My_helix}
object {My_helix
  translate <my_x, my_y, my_z> or whatever transformation you need....
}
etc....

Thomas


Post a reply to this message

From: nemesis
Subject: Re: Rendering memory limitations
Date: 17 May 2007 12:40:01
Message: <web.464c84edc7f5d682773c9a3e0@news.povray.org>
following Thomas suggestion, I'd also urge you to apply just one finish to
the whole union instead at each copy.  I'm also curious as to the storage
format to the DNA structure:  it looks like it's a mesh, right?


Post a reply to this message

From: pirateprincess
Subject: Re: Rendering memory limitations
Date: 17 May 2007 13:50:02
Message: <web.464c954bc7f5d682d5b864c00@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote:

> I am not sure if I can help, but at least, there are a couple of questions.
> 1) I suppose your file is the one called my_scene.pov? Can you tell us what
> is written at and around line 665798 of that file? I assume it refers to a
> finish{} statement...

I generalized a few things to make the description of the problem easier. My
file is the one I have called my_scene.pov. It doesn't seem to matter what
is written at that line, anything I add to the last line of the program (a
sphere for instance) its says that it does not have enough memory to parse
it. I have tried different objects, as well as taking out some of the
copies of the DNA.

> 2) You use 15-20 copies of a simple DNA double helix. Are they referenced
> copies? or is the complete code just copied 15-20 times? That would account
> for the large file (and perhaps for the parse error, but I am not sure). To
> make a referenced copy of your helix, do the following:

I only have the code for the DNA written out once, declared as an object as
you have described below. Then to get the full picture, I have unions of
various numbers of the helix declared as seperate objects. This has allowed
me to work with only one or two of the helices at a time in order to get
them the way I want them. But now that I am trying to view my final scene
with all the copies, it is running out of memory.


> #declare My_helix =
> union {
>   my DNA code
> }
> object {My_helix}
> object {My_helix
>   translate <my_x, my_y, my_z> or whatever transformation you need....
> }
> etc....
>
> Thomas

Thanks for the help thus far, but it seems I did do the above already,any
other suggestions? Thanks


Post a reply to this message

From: pirateprincess
Subject: Re: Rendering memory limitations
Date: 17 May 2007 13:55:01
Message: <web.464c9687c7f5d682d5b864c00@news.povray.org>
"nemesis" <nam### [at] gmailcom> wrote:
> following Thomas suggestion, I'd also urge you to apply just one finish to
> the whole union instead at each copy.  I'm also curious as to the storage
> format to the DNA structure:  it looks like it's a mesh, right?


Thanks for this suggestion. I am very very new to this program, I am a
chemist who is trying to make a graphic for a Journal cover. The DNA
structure comes from a crystal structure visualizing program that I am
familiar with using. Once I get the view of the helix as I want it to
appear, I export to POVray using a script. When it comes into POVray, the
helix consists of about 20,000 lines of code, mostly spheres and cylinders,
that I guess is what the program translates the image from the crystal
structure program as. I then just put a declare statement around all 20,000
lines of code and work with the declared identity. I will try your
suggestion of moving the finish to the union instead of in the original
description. I'm sorry, I don't know what you mean about it looks like it's
a mesh.

Another thing I should add to the above, I want to have a protein crystal
structure in the image above, and its description as it comes from the
crystal structure program is over 50,000 lines of code! I need at least 10
copies of this to appear as well, but am despairing of it being possible!

Thanks for the help, I will report back on the attempts to move the finish.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Rendering memory limitations
Date: 17 May 2007 14:44:36
Message: <464ca294$1@news.povray.org>
pirateprincess wrote:
> I have been working with .POV scenes generated from PyMOL (PDB crystal
> structure files).  I am trying to tesselate a specific crystal structure
> image across a plane and have utilized 15-20 copies of a simple DNA double
> helix.  The .POV file is roughly 30 megabytes.  I am working on a quad-core
> G5 (Mac OS X 10.4.9, Pov-Ray 3.6.1 for Mac) with 4GB RAM and am receiving an
> error that reads "Parse Error: Out of memory.  Cannot allocate 116 bytes for
> finish.  File my_scene.pov line 665798"
> 
> Are there simple ways to fix this problem?  Is more information needed to
> help diagnose the problem / suggest a solution?

It would probably help to see an *excerpt* of your generated code
with the bulk of the data removed so we see the object structure.
AFAIK, if it is a mesh then additional copies should not take
extra memory, but if its other objects that may be different.

Also, you should watch the memory consumption of the process while
parsing to see how much memory is actually used (don't know how this
is done on Mac, though). Also, I'm not sure if all of the 4GB will
be accessible to a single process (again, don't know about Mac).

Finally, I reckon the level of detail in your object is larger
than would actually be required for your purpose, maybe there are
some export settings in your program to reduce the output size?


Post a reply to this message

From: Grassblade
Subject: Re: Rendering memory limitations
Date: 17 May 2007 15:40:01
Message: <web.464caf6ec7f5d682f02007830@news.povray.org>
"pirateprincess" <pir### [at] charternet> wrote:
> "nemesis" <nam### [at] gmailcom> wrote:
> > following Thomas suggestion, I'd also urge you to apply just one finish to
> > the whole union instead at each copy.  I'm also curious as to the storage
> > format to the DNA structure:  it looks like it's a mesh, right?
>
>
> Thanks for this suggestion. I am very very new to this program, I am a
> chemist who is trying to make a graphic for a Journal cover. The DNA
> structure comes from a crystal structure visualizing program that I am
> familiar with using. Once I get the view of the helix as I want it to
> appear, I export to POVray using a script. When it comes into POVray, the
> helix consists of about 20,000 lines of code, mostly spheres and cylinders,
> that I guess is what the program translates the image from the crystal
> structure program as. I then just put a declare statement around all 20,000
> lines of code and work with the declared identity. I will try your
> suggestion of moving the finish to the union instead of in the original
> description. I'm sorry, I don't know what you mean about it looks like it's
> a mesh.
>
> Another thing I should add to the above, I want to have a protein crystal
> structure in the image above, and its description as it comes from the
> crystal structure program is over 50,000 lines of code! I need at least 10
> copies of this to appear as well, but am despairing of it being possible!
>
> Thanks for the help, I will report back on the attempts to move the finish.

I don't know how useful it would be to you, but Noam Lewis made a free DNA
helix macro for POV ray: http://objects.povworld.org/cat/Misc/


Post a reply to this message

From: nemesis
Subject: Re: Rendering memory limitations
Date: 17 May 2007 15:50:01
Message: <web.464caf8dc7f5d682773c9a3e0@news.povray.org>
this is an interesting experiment and I thought it'd be useful to share with
you.

I made this simple scene to test:

background { rgb .6 }

#local dna_base =  union {
    sphere { 0, 1 pigment { rgb z } translate y*2 }
    cylinder { -y,y .2 pigment { rgb x } }
    sphere { 0, 1 pigment { rgb z } translate -y*2 }
}

#declare dna =
union {
    #local i = 0;
    #while (i < 100000)
        object { dna_base rotate x*45*i
  translate -2*y*sin(i+1)/2 +1.2*x*(i+1)
 }
        #declare i = i + 1;
    #end
}

object { dna
    translate z*140
}

light_source { 10*(4-8*z) 1.2 }

and the memory consumption quickly got over 200MB, at which point I halted
the process and started over a slightly modified scene:

background { rgb .6 }

#local dna_base =  union {
    sphere { 0, 1 pigment { rgb z } translate y*2 }
    cylinder { -y,y .2 pigment { rgb x } }
    sphere { 0, 1 pigment { rgb z } translate -y*2 }
}

#declare dna =
union {
    #local i = 0;
    #while (i < 1000 )//100000)
        object { dna_base rotate x*45*i
  translate -2*y*sin(i+1)/2 +1.2*x*(i+1)
 }
        #declare i = i + 1;
    #end
}

union {
    #local i = 0;
    #while (i < 100 )//100000)
        object { dna translate -2*y*(i+1) }
        #declare i = i + 1;
    #end

    translate z*140
}

light_source { 10*(4-8*z) 1.2 }

well, forget it:  CSG really turns povray into a memory hog no matter what
you do.  It has gone over 200MB as well and I halted again.  It just took a
lot more time to get there.  Important lesson here:  better few unions with
lots of objects than lots of unions with fewer (but huge!) objects...

So I guess it's your choice:  get a true solid surface for insane amounts of
memory or a resolution-limited but much more economic polygonal mesh...
thank god the DNA isn't an isosurface! :P


Post a reply to this message

From: Alain
Subject: Re: Rendering memory limitations
Date: 17 May 2007 17:46:46
Message: <464ccd46@news.povray.org>
pirateprincess nous apporta ses lumieres en ce 17 / 05 / 2007 13:53:
> "nemesis" <nam### [at] gmailcom> wrote:
>> following Thomas suggestion, I'd also urge you to apply just one finish to
>> the whole union instead at each copy.  I'm also curious as to the storage
>> format to the DNA structure:  it looks like it's a mesh, right?
> 
> 
> Thanks for this suggestion. I am very very new to this program, I am a
> chemist who is trying to make a graphic for a Journal cover. The DNA
> structure comes from a crystal structure visualizing program that I am
> familiar with using. Once I get the view of the helix as I want it to
> appear, I export to POVray using a script. When it comes into POVray, the
> helix consists of about 20,000 lines of code, mostly spheres and cylinders,
> that I guess is what the program translates the image from the crystal
> structure program as. I then just put a declare statement around all 20,000
> lines of code and work with the declared identity. I will try your
> suggestion of moving the finish to the union instead of in the original
> description. I'm sorry, I don't know what you mean about it looks like it's
> a mesh.
> 
> Another thing I should add to the above, I want to have a protein crystal
> structure in the image above, and its description as it comes from the
> crystal structure program is over 50,000 lines of code! I need at least 10
> copies of this to appear as well, but am despairing of it being possible!
> 
> Thanks for the help, I will report back on the attempts to move the finish.
> 
> 
> 
One thing you can do, is to use reflections to show the same original object 
multiple times.

-- 
Alain
-------------------------------------------------
WARNING: The consumption of alcohol may make you think you are whispering when 
you are not.


Post a reply to this message

From: St 
Subject: Re: Rendering memory limitations
Date: 17 May 2007 18:34:04
Message: <464cd85c$1@news.povray.org>
"pirateprincess" <pir### [at] charternet> wrote in message 
news:web.464bdea734f9c3f4d5b864c00@news.povray.org...

> Are there simple ways to fix this problem?  Is more information needed to
> help diagnose the problem / suggest a solution?

     If you were on a PC, I'd say to change your performance settings in 
control panel to 2024Mb's and 4048Mb's respectively. Is there such a thing 
with a Mac?

      Sorry I couldn't help any better than this.

         ~Steve~


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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