POV-Ray : Newsgroups : povray.advanced-users : decreasing mesh memory usage. Server Time
25 Nov 2024 03:36:40 EST (-0500)
  decreasing mesh memory usage. (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Shay
Subject: decreasing mesh memory usage.
Date: 28 Oct 2003 12:06:16
Message: <3f9ea208@news.povray.org>
I'm trying to create as large a mesh as possible with my available
memory. I have questions about what may help.

I know that making copies of a mesh will help. Will it also help to
separate meshes by texture, giving each mesh a single texture rather
than using texture lists and indices?

I'm pretty sure that this should help, but I'd like to make sure anyway.
I need the back faces of my objects to be present for shadowing, but I
assume that making the back faces out of all flat triangles will also
save some memory.

Basically, what I'm not sure about is whether POV-Ray stores all of this
information whether it is defined or not. Does POV-Ray have a dummy
uv-vector, normal-vector, etc. stored for each vertex?

Any other memory-saving ideas appreciated.

 -Shay


Post a reply to this message

From: ABX
Subject: Re: decreasing mesh memory usage.
Date: 28 Oct 2003 12:13:41
Message: <7k8tpv04phhkhh2lfgm9mtuau3dempdk0b@4ax.com>
On Tue, 28 Oct 2003 11:06:15 -0600, "Shay" <sah### [at] simcopartscom> wrote:
> I'm trying to create as large a mesh as possible with my available
> memory.

Virtual or physical ?

ABX


Post a reply to this message

From: Shay
Subject: Re: decreasing mesh memory usage.
Date: 28 Oct 2003 12:17:52
Message: <3f9ea4c0$1@news.povray.org>
"ABX" <abx### [at] abxartpl> wrote in message
news:7k8tpv04phhkhh2lfgm9mtuau3dempdk0b@4ax.com...
|
| Virtual or physical ?
|

I'm not sure what you mean. I'm talking about my 360 or so megs of RAM.
If there is a way in which I could make use of my 2Gig swap partition,
then I would like to know about that as well.

 -Shay


Post a reply to this message

From: Christoph Hormann
Subject: Re: decreasing mesh memory usage.
Date: 28 Oct 2003 12:32:02
Message: <rgl271-4c1.ln1@triton.imagico.de>
Shay wrote:
> I'm trying to create as large a mesh as possible with my available
> memory. I have questions about what may help.
> 
> I know that making copies of a mesh will help. Will it also help to
> separate meshes by texture, giving each mesh a single texture rather
> than using texture lists and indices?
> 
> I'm pretty sure that this should help, but I'd like to make sure anyway.
> I need the back faces of my objects to be present for shadowing, but I
> assume that making the back faces out of all flat triangles will also
> save some memory.

Why not try it out?

> Basically, what I'm not sure about is whether POV-Ray stores all of this
> information whether it is defined or not. Does POV-Ray have a dummy
> uv-vector, normal-vector, etc. stored for each vertex?

You have to bear in mind that you can't at the same time maximize speed 
and minimize memory use.  For example you can save quite some memory by 
not generating a bounding tree for example ('hierarchy off') but it will 
become very slow.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Gilles Tran
Subject: Re: decreasing mesh memory usage.
Date: 28 Oct 2003 12:59:20
Message: <3f9eae78$1@news.povray.org>

news:3f9ea208@news.povray.org...
> I'm trying to create as large a mesh as possible with my available
> memory. I have questions about what may help.

People are going to give you very precise answers about memory use and
meshes, but in my experience, for practical purpose, you can fit a lot of
big meshes in 1 Go (which is what I
have). For instance, in a scene I'm working on, I have around 4-500 Mb worth
of different meshes and textures, and I'm rendering this at 4800*6400 with
radiosity. Note that mesh size is not only a RAM issue, but also a parsing
time one: scenes that takes several minutes to parse limit your own
development time.

Here are some memory saving ideas if the computer starts swapping:

- some meshes (typically man-made objects rather than organic ones) can
benefit from symmetry and repetition. For instance, a car mesh can be made
of a half-car, one wheel/tyre and of the remaining non-symmetrical pieces.
The full car is then made of the half-car and its mirror, 4 copies of the
wheel and of the other pieces. The wheel itself can be a created as a
quarter of the object. Stuff like bolts and small details can also benefit a
lot from instanciation, provided that you know where to put them.

- not all objects must be full-res and not all parts of an object deserve to
be full-res. Reserve the full res for the main visible parts of the main
objects and use smaller res for everything else. Modellers can also help you
to reduce the poly count. In Rhino, I fine tune the poly count for each
object part according to its importance and visibility in the final image.
Low res versions can also be handy during tests and for tricks like what
follows:

- render in several passes. Purists will certainly throw things at me, but
nothing (apart a clear conscience and reflection-crazy scenes) prevents you
from adding some objects at a later stage, by rendering them separately and
then cutting and pasting the partiel renders where they belong in the pic.
If you have low-res versions of the other objects, you can even use them to
participate in reflections, radiosity etc. shown in the partial render. In
one case, I rendered the main object over a simplified background (but with
the right shapes, colors and lighting) and then pasted it in the picture
rendered without it using a mask. It was a big time and RAM saver.

Of course, this is all scene-dependent ultimately.

G.

-- 

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Shay
Subject: Results
Date: 28 Oct 2003 14:27:01
Message: <3f9ec305$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:rgl### [at] tritonimagicode...
|
| Why not try it out?
|

OK, tried it out.

My first idea, a separate mesh for each texture, was a failure. One mesh
with 2500 vertices, 250 textures, and 1500 face and texture indices had
a peak memory usage of 608,867. A group of 250 meshes, each with 10
vertices and 6 face indices had a peak memory usage of 698,799. The mesh
without textures used 337,203 and the texture definitions used and
additional 144,640 for a total of 481,843. So, one big mesh used 127,024
for texture lists and indices, and the group of small meshes used (for
the purposes of the test) 216,956, more than 70% more!!

Removing normals did help a little, although I was surprised that the
number of entries in the normal_indices had *no* effect. The number of
entries in the normal_vectors did. The above mesh with a normal defined
for each vertex used 367,203 bytes. The mesh with onlt 1500 normal
vectors used 355,203.

 -Shay


Post a reply to this message

From: Shay
Subject: Re: decreasing mesh memory usage.
Date: 28 Oct 2003 15:31:33
Message: <3f9ed225@news.povray.org>
"Gilles Tran" <tra### [at] inapginrafr> wrote in message
news:3f9eae78$1@news.povray.org...

| scenes that takes several minutes to parse limit your own
| development time.

I have an advantage here in that I already know the shape of what I am
developing, so adjustments in that area will not be required. I am
writing my code to produce dummies at the same time it produces a
high-resolution mesh, so this will help me a lot when it comes to
texturing and positioning the scene.

|
| - some meshes (typically man-made objects rather than
| organic ones) can benefit from symmetry and repetition.

Yes, I am fortunate in that my model has a lot of symmetry and
repitition. It does, however, also have an incredible amount of distinct
pieces.

|
| - Modellers can also help you to reduce the poly count.



Well, I'd use a modeler if I could, but I can't stand losing control
over each and every one of my vertices. I am writing new code which is
very stingy with vertices, so I doubt that anything could be reduced
anyway.

|
| - render in several passes.

After the disappointing results of my tests, I think that this will be
the best way to go. A real advantage of this method is that it will be
simple after my render is complete to assemble a full-resolution mesh
with no compromises. I may not be able to render it, but at least I'll
have the complete model.

Thank you,
 -Shay


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Results
Date: 29 Oct 2003 08:59:33
Message: <3f9fc7c5$1@news.povray.org>
In article <3f9ec305$1@news.povray.org> , "Shay" <sah### [at] simcopartscom> wrote:

> Removing normals did help a little, although I was surprised that the
> number of entries in the normal_indices had *no* effect.

This is to be expected and not surprsing at all if you think about it...

    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: Thorsten Froehlich
Subject: Re: decreasing mesh memory usage.
Date: 29 Oct 2003 09:01:47
Message: <3f9fc84b$1@news.povray.org>
In article <3f9ea4c0$1@news.povray.org> , "Shay" <sah### [at] simcopartscom> wrote:

> I'm not sure what you mean. I'm talking about my 360 or so megs of RAM.
> If there is a way in which I could make use of my 2Gig swap partition,
> then I would like to know about that as well.

Ever since Windows 95 virtual memory has been available to applications in
Windos without any restrictions.  It is nothing new and nothing an
application proggram or user has to bother about at all if you don't care
for speed...

    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: Shay
Subject: Re: decreasing mesh memory usage.
Date: 29 Oct 2003 09:09:25
Message: <3f9fca15$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3f9fc84b$1@news.povray.org...
|
| Ever since Windows 95 virtual memory has been available
| to applications in Windos without any restrictions.  It
| is nothing new and nothing an application proggram or
| user has to bother about at all if you don't care
| for speed...
|

Is this true in Linux as well?

 -Shay


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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