POV-Ray : Newsgroups : povray.animations : How to speed up parsing in animation scenes? : Re: How to speed up parsing in animation scenes? Server Time
27 Sep 2024 18:18:19 EDT (-0400)
  Re: How to speed up parsing in animation scenes?  
From: Roman Reiner
Date: 5 Apr 2006 20:55:01
Message: <web.4434658cc3ee1f7e4cdad7b0@news.povray.org>
"Icetoaster" <icetoaster_at_gmx.de> wrote:
> How can I write those static objects to a file?
> I have looked for the description of the #write command, but this seem
> to make sense only for strings and numbers. I have e.g. a staple of
> wooden trunks, which are translated by a small random value to make it
> look more natural.
>
> How can I output rendered objects with this method? And under what
> circumstances
> does this save time?
>
> Thanks for help,
> Icetoaster

You have to use the #write command in a way where it writes POV-Ray SDL into
the file. If your wooden trunks are made using cylinders you have to use
something like

#write(file, "cylinder { ", P1, ", ", P2, ", ", Rad, " texture { /*some
texture definitions here*/ } transform { /*some transformations here*/
}}")

where P1, P2 and Rad are the variables that contain the appropriate data.
this happens to be very unreadable but you can always check the outputted
file for correctness (and you get errors when something is wrong ;))

Then what you do is including the previously generated file with the
#include command and the cylinders are added to the scene without needing
the time to calculate their positions/orientations.

Hope this helps!
Regards Roman


Post a reply to this message

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