POV-Ray : Newsgroups : povray.binaries.images : Re: Moss Vine test [~30k] : Re: Moss Vine test [~30k] Server Time
7 Sep 2024 13:08:47 EDT (-0400)
  Re: Moss Vine test [~30k]  
From: [GDS|Entropy]
Date: 11 Mar 2009 08:03:23
Message: <49b7a88b$1@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote in message 
news:web.49b783c2d4fd5b286dd25f0b0@news.povray.org...
> It's no different from looping to place compound objects; you write macros 
> to do
> the work for you. To be sure, it requires a bit of concentration to get to 
> the
> first stage, but once you've got something that renders it's just 
> tweaking. It
> can be helpful to draw diagrams to aid with the visualisation.
>
> Use plain mesh (i.e., just triangle statements) - it's much easier than 
> mesh2.
> (To be honest, mesh2 is mainly a handy conversion format for speeding up
> parsing, you only need to use it if you're generating 10000s of triangles.
> They're both the same thing once parsing is complete).

I'll definately give that a try once I get most of these macros to public 
beta. :-)

>
> I've been trying to write a decent plant include file for a while now. 
> I've got
> a leaf macro that builds different shaped leaves procedurally, and I'm 
> slowly
> adding types of plants to use it. It's a long-term work in progress, but 
> I've
> got grass and dandelions so far. No ivy leaves yet, though. I can post the 
> leaf
> macro later if you're interested...?
>

Of course, and if the macro parameters are expected to be stable, I could 
make my macro implement yours, if that is cool.

>
> Write random locations on the vine routes to a data file as you go, then 
> read
> them back in when you place the moss? Or the same thing, but using an 
> array?
> Every time you make a vine section, #if rand(seed) < probability then 
> store the
> current endpoint, or something.
>
> There's more than one way to skin a cat, I'm sure you've got it in hand... 
> :)
>

I've been using arrays, and in fact most of the macros I've been writing 
recently implement component macros that I wrote for the snow macro.

It turns out that to reduce the parse time for this particular use, all I 
had to was change a single line. I now have to perform only 5000 tests to 
get the ~same number of placed objects as previously required 500k. This has 
resulted in a much lower threshold  for catastrophically crashing povray due 
to lack of available memory.

I doubt that I can get around the out of memory error by writing to a file. 
Unless povray can read/write a part of a file without loading the whole 
thing, or unless somehow a file would take less memory for the same amount 
of data than would an array, I don't see any way around this problem in its 
entirety.

Granted, using a mesh would free up a LOT of spaces used by the moss array, 
as each moss frond takes 260 at current settings. Multiply that by the 
amount of tests per vine sub-object...
I think that would go a long way to increasing the ceiling that I'm hitting. 
I think I might need to determine the average amount of ram used per 
"mossed" vine object, so that I can allow a user to input their total 
available ram (for 32 bit systems this will always be 2gb), which would not 
let the macro run so far as to give people those blood boiling OOM errors.

Here is the result of the one line change, in image and stats. Compare that 
to the previous one posted...big improvement.

ian

Scene Statistics
  Finite objects:      1013230
  Infinite objects:          0
  Light sources:             1
  Total:               1013231
Possible Rendering Error: Maximum trace level reached! If your scene 
contains black spots read more about the max_trace_level setting in the 
documentation!

Render Statistics
Image Resolution 1280 x 1024

Pixels:          1312000   Samples:         1502912   Smpls/Pxl: 1.15
Rays:            2047633   Saved:                 0   Max Level: 5/5

Ray->Shape Intersection          Tests       Succeeded  Percentage

Cone/Cylinder               1189022659        11408002      0.96
CSG Intersection              45321691         2913618      6.43
CSG Union                   1087005314          669132      0.06
Sphere                      2168288631          860782      0.04
Bounding Box                 396224017       110147439     27.80
Light Buffer                 672753438       349217503     51.91
Vista Buffer                 144135167       115783532     80.33

Calls to Noise:                   0   Calls to DNoise:         1345012

Shadow Ray Tests:           2359688   Succeeded:                952498
Transmitted Rays:            544721
I-Stack overflows:            28578

Smallest Alloc:                  18 bytes
Largest  Alloc:             8105856 bytes
Peak memory used:        1414575125 bytes
Total Scene Processing Times
  Parse Time:    0 hours 12 minutes 34 seconds (754 seconds)
  Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
  Cloth Time:    0 hours  0 minutes  0 seconds (0 seconds)
  Mechsim Time:  0 hours  0 minutes  0 seconds (0 seconds)
  Render Time:   0 hours  1 minutes  7 seconds (67 seconds)
  Postpr. Time:  0 hours  0 minutes  0 seconds (0 seconds)
  Total Time:    0 hours 13 minutes 41 seconds (821 seconds)
CPU time used: kernel 15.09 seconds, user 794.44 seconds, total 809.53 
seconds
Render averaged 1619.11 PPS over 1310720 pixels

POV-Ray finished


Post a reply to this message


Attachments:
Download 'VineTest1_2_1.jpg' (13 KB)

Preview of image 'VineTest1_2_1.jpg'
VineTest1_2_1.jpg


 

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