 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"ingo" <ing### [at] home nl> wrote in message news:Xns### [at] povray org...
9 bytes per triangle???
500000 triangs = 4.5 mb ???
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ingo <ing### [at] home nl> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |