|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I recognized, that at each frame of the animation Povray does a
parsing of the non-dynamic scene. This takes up 9/10 (=ParseTime)
of the total time. Only 1/10 of the time is the render time.
(ParseTime = 9 * RenderTime)
Lets say, I have n frames, the render time is
t_now = n * (ParseTime + RenderTime) = n * 10 * RenderTime
However, if objects stay the same, it should be speeded up to this:
t_better = 1 * ParseTime + n * RenderTime = (n + 9) * RenderTime
which is much less.
For n=10: t_now = 100 * RenderTime
t_better = 19 * RenderTime
Is there a possibility to speed up things like that?
Or is it my fault, because I use a rand() function for some
objects.
Thanks,
IT
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Is there a possibility to speed up things like that?
> Or is it my fault, because I use a rand() function for some
> objects.
Well, POV-Ray always re-parses the file each frame, and there's nothing that
can be done about that. However, if there's any part of your scene which is
dynamically generated (for instance, many objects created in a loop or
recursively) and doesn't change depending on the clock, you could #write it
to a file during the first frame, in POV-Ray SDL, and then #include that
file in the rest of the frames.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Icetoaster who wrote:
>Hi,
>
>I recognized, that at each frame of the animation Povray does a
>parsing of the non-dynamic scene. This takes up 9/10 (=ParseTime)
>of the total time. Only 1/10 of the time is the render time.
>(ParseTime = 9 * RenderTime)
>
>Lets say, I have n frames, the render time is
>
>t_now = n * (ParseTime + RenderTime) = n * 10 * RenderTime
>
>However, if objects stay the same, it should be speeded up to this:
>
>t_better = 1 * ParseTime + n * RenderTime = (n + 9) * RenderTime
>
>
>which is much less.
>For n=10: t_now = 100 * RenderTime
> t_better = 19 * RenderTime
>
>Is there a possibility to speed up things like that?
>Or is it my fault, because I use a rand() function for some
>objects.
The old MegaPOV (before version 1.0) had "Persistence of Variables" and
"Persistence of Objects" features, which did that. I don't know of any
patched versions based on recent POV syntax that provide such features.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Slime" <fak### [at] emailaddress> wrote:
> > Is there a possibility to speed up things like that?
> > Or is it my fault, because I use a rand() function for some
> > objects.
>
> Well, POV-Ray always re-parses the file each frame, and there's nothing that
> can be done about that. However, if there's any part of your scene which is
> dynamically generated (for instance, many objects created in a loop or
> recursively) and doesn't change depending on the clock, you could #write it
> to a file during the first frame, in POV-Ray SDL, and then #include that
> file in the rest of the frames.
>
> - Slime
> [ http://www.slimeland.com/ ]
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
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks very much for the answer. However I think this is to complicated for
the scene I have created and I guess it would not save that much time.
However, in the meantime I have found another method to save a LOT of time:
I organized the animation into segments (rooms) and only add the rooms to
the current animation frame which are within range based on the current
camera position.
The rooms contain a set of macros and objects stored in variables defined
in a include file.
Regards,
Icetoaster
"Roman Reiner" <lim### [at] gmxde> wrote:
> 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
|
|
| |
| |
|
|
|
|
| |
|
|