This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > February 2005 > sequential animation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
sequential animation
|
|
| Fenrir 2005-02-24, 4:22 am |
| Hi
I want to animate some object to make a technical demonstration
I want to describe operation by operation
For example
There is a box wich contains electronic devices, the box is in 2 part body
an cover.
The cover is screwed by 4 screw (one in each corner)
1 I want to make the srew blinking
2 after t seconds, the screw must rotate and translate like if you unscrew
them.
3 the cover now blink for a moment
4 the cover translate to let's appear the device in box's body (box body
modeled with wings3D)
5 another box or cylinder wich represent a device must now blink
6 the device translate like the box cover
How to proceed? How to chain timesensor, timer1.stoptime to timer2.starttime
??
There is possibility to use mask in VRML, It is possible to make a box with
hole without using modeler ?
Thanks Arnaud
| |
|
| Hi Arnaud :
Sure there are different approaches to what you are trying to do. I
will tell you 3 of mine, which might perhaps not be the best :
Option 1) : only one general timeSensor Routed directly to several
Interpolators :
Use one timeSensor which cycleInterval encloses the whole animation.
For each individual animation you have got one individual Interpolator
(you will need anyhow) and set the initial keyValues (until animation
should start) to the default value of your object, so nothing will
happen to it till you reach one specific point in time.
Option 2) : Cascading timeSensors
You might use the cycleTime event (SFTime) of each timeSensor to
start/stop each animation. Problem here is, that timeSensors send the
first cycleTime event at startTime and the second after cycleInterval.
That makes it necessary to filter that event throu a script, so that
the first 'impulse' is ignored, and the second used for triggering the
next timeSensor.
This two options have one and the same problem : if a timeSensor
receives start- or stop- Time, it is automatically reseted, so all
animations will go back to the initial point. (Is there no way for
simply pausing a timeSensor ?!!)
For simulation of 'automatic' processes, the best option is following
(imo) - btw I learned it from the 3dsMax exporter ;) :
Option 3) : only one looping timeSensor sending fractionChanged to a
Script :
You use one looping timeSensor (cycleIntervall does not matter at all)
that sends it's fraction changed to an eventIn SFTime of a Script.
There you are converting and adding (or resting for inverse animation)
the time elapsed between events. You can even stop animation at one
point and continue or invert after - you have full script-control over
the fractionChanged output you will send to the different
interpolators vía eventOut SFTime.
Let me refer again to this link :
http://club.telepolis.com/somehow_p...sigma/index.htm
I posted it few days ago, but the server was off for long time, and
feel free to look at the html and embedded wrl (Cortona), there i use
option 3 several times and also inteaction between html and
vrml-browser.
About the mask in vrml : only way (imo) is using textures with
alpha-blending : pixelTexture work for sure with alpha component,
imageTexture with gif and png or other formats supporting alpha might
be browser dependent.
Salutons
Peter
| |
|
| Pausing an animation is not so hard...
Viewpoint { position 0 0 10 description "entry" }
DEF box1 Transform {
translation -4 -2 0
rotation .2 .4 .5 1
children [
DEF touch TouchSensor { }
Shape {
appearance Appearance {
material Material { diffuseColor 0 1 0 } }
geometry Box { } }
]}
DEF timer TimeSensor { cycleInterval 10 }
DEF box1Pos PositionInterpolator {
key [ 0 .5 1 ]
keyValue [ -4 -2 0, 4 2 0, -4 -2 0 ]
}
DEF s Script {
eventIn SFTime toggle
field SFNode timer USE timer
field SFBool state FALSE
field SFTime pause 0
url "vrmlscript:
function toggle(v) {
if( state ) {
state = FALSE;
pause = v - timer.startTime_changed;
timer.enabled = FALSE;
timer.loop = FALSE;
}
else {
state = TRUE;
timer.set_startTime = v - pause;
timer.enabled = TRUE;
timer.loop = TRUE;
pause = 0;
}
}
"
}
ROUTE touch.touchTime TO s.toggle
ROUTE timer.fraction_changed TO box1Pos.set_fraction
ROUTE box1Pos.value_changed TO box1.set_translation
"Peter" <sommer@movistar.com> wrote in message
news:3965d6f1.0502250421.3a44e644@posting.google.com...
> Hi Arnaud :
>
> Sure there are different approaches to what you are trying to do. I
> will tell you 3 of mine, which might perhaps not be the best :
>
> Option 1) : only one general timeSensor Routed directly to several
> Interpolators :
>
> Use one timeSensor which cycleInterval encloses the whole animation.
> For each individual animation you have got one individual Interpolator
> (you will need anyhow) and set the initial keyValues (until animation
> should start) to the default value of your object, so nothing will
> happen to it till you reach one specific point in time.
>
> Option 2) : Cascading timeSensors
>
> You might use the cycleTime event (SFTime) of each timeSensor to
> start/stop each animation. Problem here is, that timeSensors send the
> first cycleTime event at startTime and the second after cycleInterval.
> That makes it necessary to filter that event throu a script, so that
> the first 'impulse' is ignored, and the second used for triggering the
> next timeSensor.
>
> This two options have one and the same problem : if a timeSensor
> receives start- or stop- Time, it is automatically reseted, so all
> animations will go back to the initial point. (Is there no way for
> simply pausing a timeSensor ?!!)
>
> For simulation of 'automatic' processes, the best option is following
> (imo) - btw I learned it from the 3dsMax exporter ;) :
>
> Option 3) : only one looping timeSensor sending fractionChanged to a
> Script :
>
> You use one looping timeSensor (cycleIntervall does not matter at all)
> that sends it's fraction changed to an eventIn SFTime of a Script.
> There you are converting and adding (or resting for inverse animation)
> the time elapsed between events. You can even stop animation at one
> point and continue or invert after - you have full script-control over
> the fractionChanged output you will send to the different
> interpolators vía eventOut SFTime.
>
> Let me refer again to this link :
>
> http://club.telepolis.com/somehow_p...sigma/index.htm
>
> I posted it few days ago, but the server was off for long time, and
> feel free to look at the html and embedded wrl (Cortona), there i use
> option 3 several times and also inteaction between html and
> vrml-browser.
>
> About the mask in vrml : only way (imo) is using textures with
> alpha-blending : pixelTexture work for sure with alpha component,
> imageTexture with gif and png or other formats supporting alpha might
> be browser dependent.
>
> Salutons
>
> Peter
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|