POV-Ray : Newsgroups : povray.newusers : Hi! Needin' some help with some stuff. : Re: Hi! Needin' some help with some stuff. Server Time
5 Jul 2024 04:32:30 EDT (-0400)
  Re: Hi! Needin' some help with some stuff.  
From: clipka
Date: 4 Jul 2010 06:44:30
Message: <4c30660e@news.povray.org>
Am 03.07.2010 23:35, schrieb MCC900:

> //Single Grass
> #declare single_strand =
> polygon { 11,
> <-9,0>,<-6,30>,<0,60>,<8,83>,<18,97>,<14,90>,<9,77>,<3,40>,<3,18>,<5,0>,<-9,0>
> scale 0.00025
> }

> It works pretty well (yeah, I know the grass look is very far away from real
> grass) but the thing is, that if I want to make a big extension of field with
> grass using this code, the parsing takes a lot of memory and the program lags...
> I know there should be away to reduce the parsing memory, even if the redering
> takes an entire day...
> I have the feeling that I shouldn't be using while loops.
> Thanks a lot for your time!

When using objects over and over again, the mesh object is the most 
memory efficient; while for most primitives (and also CSG compounds) 
POV-Ray will create a full copy in memory for each instance, mesh copies 
share a single instance of their bulk data among all copies (same goes 
for blobs).

You don't want to make your meshes too "fine-grained" though, as each 
instance still adds some overhead, so you may want to have a larger 
patch of grass per mesh instead of just a single blade. This will also 
speed up parsing time for placing the grass.


Post a reply to this message

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