POV-Ray : Newsgroups : povray.pov4.discussion.general : Caching parsed code : Caching parsed code Server Time
23 Apr 2024 21:59:44 EDT (-0400)
  Caching parsed code  
From: C
Date: 15 Apr 2009 07:32:12
Message: <49e5c5bc$1@news.povray.org>
Large amounts of dynamically placed objects, such as grass or trees, can
take a long time to parse.
Usually you would write these objects to a file, and then just use an
include statement to place them.

What if Pov Ray could handle this instead?
You would write something like this:

cache "grass"{
   #declare a=0;
   #while(a<100000)
     placeGrass(a)
     ...
   #end
}

Pov Ray will automatically take the results and and save it to a file
named grass.
Anytime the scene is rendered it will check if the file exists, if it 
doesn't the contents of the block will be parsed, otherwise the file 
will just be slotted in in place of the block.


Post a reply to this message

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