POV-Ray : Newsgroups : povray.text.scene-files : Memory(optimization) help. Server Time
29 Jul 2024 00:35:16 EDT (-0400)
  Memory(optimization) help. (Message 1 to 5 of 5)  
From: Spider
Subject: Memory(optimization) help.
Date: 27 Apr 1999 21:10:32
Message: <37265076.74F7658@bahnhof.se>
Hello.
I've been working a bit with the creation of undergrowth for a scene. mostly to
see how It'll look, but anyhow.

This scene doesn't take that very long to parse, but the thing I need help on is
the memory-useage.

As it is currently used, the file creates 10(variable called mI) objects in an
array, then it will create 15*15(mXYZ) copies of theese(looping through them, to
get variety) 

All of the objects in the array are pretextured, and I've unioned as many of
them as possible when creating the copies to reduce the load of translating
them.

Now I wonder, is there a way to make this more memory-efficient?

Attached are the scene-file and the include file(updated) 

Stats currently:
16 129 objects uses 21 426 188bytes memory..

The overhang is bad.....
any ideas/commetns are appreciated..

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message


Attachments:
Download 'land1.pov.txt' (2 KB) Download 'recfrac21.inc.txt' (7 KB)

From: Nathan Kopp
Subject: Re: Memory(optimization) help.
Date: 28 Apr 1999 02:06:28
Message: <37269764.E2D0AC02@Kopp.com>
Spider wrote:
> 
> All of the objects in the array are pretextured, and I've unioned as many of
> them as possible when creating the copies to reduce the load of translating
> them.

Unfortunately, when POV copies an object, it makes a complete copy of the
object's transformation and texture (if I understand correctly... I did
look at the source code).  That means every object has a complete texture and
a trnasformation matrix.

> Now I wonder, is there a way to make this more memory-efficient?

I don't think so.  I do think that POV needs some better memory optimizations,
though.


-Nathan


Post a reply to this message

From: Nathan Kopp
Subject: Re: Memory(optimization) help.
Date: 28 Apr 1999 02:07:23
Message: <3726979B.16BCBBE6@Kopp.com>
Spider wrote:
> 
> Now I wonder, is there a way to make this more memory-efficient?

Before I said "I don't think so" but I should have said "probably, but I can't
think of a way off hand."   :-)

-Nathan


Post a reply to this message

From: Spider
Subject: Re: Memory(optimization) help.
Date: 28 Apr 1999 15:55:57
Message: <3727419A.5B3D3B72@bahnhof.se>
Thanx..
I found out that the real hogger is my damned gradient texture.. If I cchange it
to a solid colour on every branch(stilll everything textured by itself) I
reduuce memory with a fex mb'2 (21 to 18, I think) and if I remove the
individual colouring all together, it drops to 11Mb ... But it doesn't look as
great then.. *sighs*



Nathan Kopp wrote:
> 
> Spider wrote:
> >
> > All of the objects in the array are pretextured, and I've unioned as many of
> > them as possible when creating the copies to reduce the load of translating
> > them.
> 
> Unfortunately, when POV copies an object, it makes a complete copy of the
> object's transformation and texture (if I understand correctly... I did
> look at the source code).  That means every object has a complete texture and
> a trnasformation matrix.
> 
> > Now I wonder, is there a way to make this more memory-efficient?
> 
> I don't think so.  I do think that POV needs some better memory optimizations,
> though.
> 
> -Nathan

-- 
//Spider
        [ spi### [at] bahnhofse ]-[ http://www.bahnhof.se/~spider/ ]
What I can do and what I could do, I just don't know anymore
                "Marian"
        By: "Sisters Of Mercy"


Post a reply to this message

From: Nathan Kopp
Subject: Re: Memory(optimization) help.
Date: 28 Apr 1999 20:59:23
Message: <3727A0E6.397ADDB6@Kopp.com>
If you can put a single texture on the union, rather than one texture per
object, you can save lots of memory.

Triangle meshes save space by using only a few textures with lots of
pointers to each texture.  Unfortunately, because of the way POV handles
textures and transformations (specifically, how transforming the object
affects the object's texture), you can't do that with most objects. :-(

-Nathan


Post a reply to this message

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