[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kpovmodeler-devel
Subject:    Re: Frame System
From:       Andreas Zehender <az () azweb ! de>
Date:       2006-10-05 19:20:04
Message-ID: 45255AE4.6070007 () azweb ! de
[Download RAW message or body]

Update for point 3:

3) Of course you have to preview the animation in KPovModeler.
You have the start frame, that's the static scene modeled. The user 
specifies the number of frames and the animation is calculated by 
executing the scripts and evaluating the position of the pathes. One 
frame after another.
You then have a slider and start/stop/pause buttons as if viewing a 
video. You can jump to any frame and go forward and backward.

Before the animation is calculated, a copy of the scene is made. You can then switch \
between the static scene and the last calculated animation. The animation stays valid \
until the next animation is calculated.

In the animation view, you can only change the cameras to view a frame 
from different views, everything else is read only (there is already a 
read only flag for all objects, and the property views use that to 
enable/disable the controls)

Andreas Zehender schrieb:

> My guidlines for the animation system are:
> 1) There is a fixed start scene which is modeled in KPovModeler (that's 
> the current state)
> 
> 2) There are two methods how to animate a scene:
> a) scripting with a javascript like language (that's my part)
> The script will be called before each frame and has as available objects 
> the state of the scene of the previous frame and calculates the state of 
> the next frame. That will allow to calculate the animation in discrete 
> steps, so objects can interact with each other if needed. The example I 
> mentioned with the balls in a room that bounce is an example where to 
> calculate the scene in discrete steps. You can't describe the position 
> of the balls in functions, you have to make collision detection, make 
> impact/impulse calculation and so on each frame.
> With special scripts you should even be able to implement a constrain 
> system, when the scripts have access to all objects and attributes 
> (which will be the case)
> 
> Please study that example in detail to see what should be changable:
> <example>
> // clock is a global variable that goes from 0 to 1 during animation
> cube=scene.csg(1).cube(2);
> // here the rotation depends on the value of the last frame plus some 
> calculated offset
> cube.rotate(0)[0] = cube.rotate(0)[0]+sin(clock);
> blablub = scene.objectForName("somematerial");
> // simple attribute setting, but dependent on another objects state of 
> the last frame
> blablub.someproperty=4*clock+cube.corner1[2];
> // here an object disappears between clock 0.1 and 0.3
> if(clock > 0.1 && clock <0.3) blablub.exportToPovray=false;
> else if(clock >= 0.3) blablub.exportToPovray=true;
> </example>
> 
> b) animation of attributes with pathes
> There are objects for each type of path type: linear, spline, ...
> The path is bound to an object and attribute (say corner 1 of a box or a 
> translate object) and is changeable with control points in the 3d view. 
> The path gets the clock value as parameter and returns the position for 
> that frame
> 
> 3) Of course you have to preview the animation in KPovModeler.
> You have the start frame, that's the static scene modeled. The user 
> specifies the number of frames and the animation is calculated by 
> executing the scripts and evaluating the position of the pathes. One 
> frame after another.
> You then have a slider and start/stop/pause buttons as if viewing a 
> video. You can jump to any frame and go forward and backward.
> That animation is valid until the scene is changed. When the scene is 
> changed, the start condition is different or even objects can be 
> deleted, so the states of the animation may not have the corresponding 
> object any more.
> 
> 4) Rendering the animation
> When the user is satisfied he specifies the start and end point of the 
> animation to render (maybe he just wants to render a small part because 
> he made adjustments to the scene around clock value 0.3), the animation 
> is sent to the renderer, saved as single frames or encoded as video. 
> Whether sent as single frames or as whole animation doesn't matter for 
> the moment.
> 
> Do you agree so far?
> 
> Regards,
> Andreas
> 
> 
> 
> List archive and information: \
> https://mail.kde.org/mailman/listinfo/kpovmodeler-devel 
> 
> 


List archive and information: https://mail.kde.org/mailman/listinfo/kpovmodeler-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic