POV-Ray : Newsgroups : povray.general : How to calculate the width of an object at a given clock time? Server Time
21 Dec 2024 11:16:01 EST (-0500)
  How to calculate the width of an object at a given clock time? (Message 1 to 2 of 2)  
From: Kima
Subject: How to calculate the width of an object at a given clock time?
Date: 8 Oct 2019 08:45:01
Message: <web.5d9c84adcc983787ecc0fada0@news.povray.org>
I put all the objects within a final object by union. Then, I calculate the
final object width to estimate the camera location (to have a full view of all
objects).

This approach works perfectly, but when using for an animation, the final object
width is calculated separately at each frame, which gives different camera
locations at different frames. In other words, the camera location changes
during the animation.

How can I calculate the final object width at first frame to estimate the camera
location and used it in all frames?


Post a reply to this message

From: Bald Eagle
Subject: Re: How to calculate the width of an object at a given clock time?
Date: 8 Oct 2019 13:40:00
Message: <web.5d9cc9e1a20882ed4eec112d0@news.povray.org>
"Kima" <nomail@nomail> wrote:


> How can I calculate the final object width at first frame to estimate the camera
> location and used it in all frames?

Well, that's going to depend on the details of how your animation runs, but you
could use a loop to simulate the relative positions of the union and the camera
and store the max/min in a file, and set a flag to not run the loop from then
onward.

Or output the result to the #debug stream and then halt the render.   Then
hard-code that number into the scene.


Post a reply to this message

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