POV-Ray : Newsgroups : povray.general : mesh & memory ? Server Time
7 Aug 2024 19:25:30 EDT (-0400)
  mesh & memory ? (Message 1 to 8 of 8)  
From: ingo
Subject: mesh & memory ?
Date: 31 May 2001 20:06:33
Message: <Xns90B31574D27BCseed7@povray.org>
Is there a way to calculate the amount of memory a mesh, of say 500000 
triangles, will take? 
 After ~7 hours of generating and parsing triangles, and only half way, 
POV just ran out of memory :(

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Ken
Subject: Re: mesh & memory ?
Date: 31 May 2001 22:33:11
Message: <3B16FE49.1CBB76AD@pacbell.net>
ingo wrote:
> 
>  Is there a way to calculate the amount of memory a mesh, of say 500000
> triangles, will take?
>  After ~7 hours of generating and parsing triangles, and only half way,
> POV just ran out of memory :(

I don't think it would be easy to isolate the generation requirements
from the rendering requirements. A lot of it would depend on how
effecient your generation code is. You may consider dumping the
generated mesh code to a file with the #write command and then parse
the generated file. Should save on a good portion of the memory
requirements this way.

-- 
Ken Tyler


Post a reply to this message

From: ingo
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 04:47:42
Message: <Xns90B36DD10EB86seed7@povray.org>
in news:3B16FE49.1CBB76AD@pacbell.net Ken wrote:

> I don't think it would be easy to isolate the generation requirements
> from the rendering requirements. 
 
 In case of the macro I'm working on that is no problem. The mesh can 
be written to file without parsing and rendering it. The amount of 
memory needed then is low.

> A lot of it would depend on how effecient your generation code is. 

 Slow, 7h for 500000 triangles.
 For a moment I considered to write it in another language, but the 
macro does 'on the fly' displacement mapping, using the POV's internal 
patterns. There is no way that an external program can interact with 
POV-Ray to get the required data (eval_pigment) from it :(

> You may consider dumping the generated mesh code to a file with
> the #write command and then parse  the generated file. 

 This is what I do, but the resulting file can still be too big to 
parse on my machine. That why I want to have a good estimation of the 
memory use of a mesh before generating it.

> Should save on a good portion of the memory requirements this way.

 The overhead for generating the mesh isn't very big.



Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Tom Melly
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 05:42:31
Message: <3b176387$1@news.povray.org>
"ingo" <ing### [at] homenl> wrote in message news:Xns### [at] povrayorg...

9 bytes per triangle???

500000 triangs = 4.5 mb ???


Post a reply to this message

From: ingo
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 06:08:53
Message: <Xns90B37B94067D6seed7@povray.org>
in news:3b176387$1@news.povray.org Tom Melly wrote:

> 9 bytes per triangle???
> 
> 500000 triangs = 4.5 mb ???

Seems a bit too optimistic,

how about
90 bytes/triangle
90 bytes/normal
60 bytes/uv-coords

~120mb?


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Warp
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 07:08:31
Message: <3b1777af@news.povray.org>
ingo <ing### [at] homenl> wrote:
:  Is there a way to calculate the amount of memory a mesh, of say 500000 
: triangles, will take? 

  This depends a lot in the mesh itself. The more vertex points are shared
among the triangles, the less memory it will take.
  The worst-case scenario is when all triangles are separate (ie. they do
not share any vertex with other triangles).

-- 
#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: ingo
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 08:28:32
Message: <Xns90B39340FD359seed7@povray.org>
in news:3b1777af@news.povray.org Warp wrote: 

>   This depends a lot in the mesh itself. The more vertex points are
>   shared 
> among the triangles, the less memory it will take. 

 Every vertex is shared among 6 triangles (except those on an edge, 
when a shape is not closed). 

Ingo 

-- Photography: http://members.home.nl/ingoogni/ Pov-Ray    :
http://members.home.nl/seed7/


Post a reply to this message

From:
Subject: Re: mesh & memory ?
Date: 1 Jun 2001 16:44:59
Message: <3b17fe4a.167258621@news.povray.org>
Based on some volume tests I made a long time ago my guess would be up
to 250-300 MB total memory requirement for rendering a 500 000
triangle mesh. At that time I didn't go much past 250 000 triangles as
I only had 16 (or was it 32) MB of real RAM on the machine, The
bounding phase took a while with a constantly flashing HD light.
Rendering time wasn't too bad, but getting to that point was more than
half the total time.

/Erkki


Post a reply to this message

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