Help on engines(animation)

Help on engines(animation)

Post by Pari Nataraj » Thu, 21 Sep 1995 04:00:00



Hi,
    I have been doing a simulation of a robot.My robot has to move from one point
to another and from that point to another point.For example I start at
x,y,z go to x1,y1,z1 and from there I go to x2,y2,z2 and soon.Actually to
start with I used OneShotEngine to move from one point to another.But know I
don't know how to move from that point to another point.Can I use
Elapsed engine.If anyone knows about it please inform me.

      Thanks in advance
                                                                        -Pari

--
###############################################################################
N.Pari

Homepage: http://www.public.iastate.edu/~pari/homepage.html
Tel:(515) 292-7333
###############################################################################

 
 
 

Help on engines(animation)

Post by Roger Ha » Sat, 23 Sep 1995 04:00:00


I don't know how useful this will be...

I am currently using the SoOneShot sensor in coordination with a
SoCalculator engine and a SoComposeRotation to animate an object.  The
engines produce an output rotation which causes my object to "pivot"
around its Y axis from one angle (startAngle) to another angle (endAngle).
The resulting animation is a smooth transition from the start to end
angles.  

I have the engines connected in the following manner:

                                +--------------------------+
  startAngle  ---> calculator.a-|                          |
  endAngle    ---> calculator.b-| oa = a + ((b-a)*(c/1.0)) |-calculator.oa-+
oneShot.ramp  ---> calculator.c-|                          |               |
                                +--------------------------+               |
                       +--------+                                          |
         rotation <----|        |-composeRotation.angle <------------------+
                       |        |-composeRotation.axis  <-- SbVec3f(0, 1, 0)
                       +--------+

The resultant <rotation> is based on a percentage of the startAngle
and endAngle.  The percentage is based on the oneShot ramp output.
That is, as the ramp output increases from 0.0 --> 1.0, the calculator
output will produce an output which ranges from startAngle -->
endAngle.  The oneShot.duration field specifies how long (in seconds)
this transition will take.

So, in one of my methods I set the startAngle and endAngle values and then
touch the trigger on the oneShot engine.  Once "touched", the animation
proceedes without any intervention on my part.

Perhaps you could use a simlar concept to produce a smooth transition from
one (x,y,z) position to another.  You would just need to change the calculator
inputs and internal expression slightly.  

I hope that was helpful...

Good luck,

-Roger

    ----------------------------------------------------------------------
   / Roger J. Hahn                     / Phone:  (301) 953-3330 x188     /
  / Century Computing, Inc.           / Fax:     (301) 953-2368         /

/ Laurel, MD 20707                  / Home Page: http://www.cen.com/  /
----------------------------------------------------------------------

 
 
 

1. Seeking Inventor animation/engine help

I'm an Open Inventor newbie, trying to learn how to create animations
in Open Inventor.  I've got both the "Inventor Mentor" and "Inventor
Toolkit" books, read substantial chunks of the former, browsed a bit
through the latter.  I'm trying to figure out how to create animations
in Open Inventor by only writing Ascii *.iv files.  So far I haven't
made much headway (the descriptions/explanations of engines in
Inventor Mentor just aren't sinking in I guess).  The only way I've
really gotten the slightest idea of how to create *.iv animations is
by typing in the C++ code examples from the book, compiling them, and
saving the database to a file to see what the equivalent iv files would
be.

If anybody could provide any pointers on how to get started, I would
much appreciate it.  I'm trying to help a freshman class to do some
simple renderings and animations in Inventor without having to deal
with any C++ programming.


Thanx!

--
===============================================================
= Reid M. Pinchback                                           =
= Senior Faculty Liaison                                      =
= Academic Computing Services, MIT                            =
=                                                             =

= URL:     http://web.mit.edu/reidmp/www/home.html            =
===============================================================

2. Oxygen 102 problems

3. New POVRAY Steam Engine Animation - looking for criticisms/comments

4. Drop down list in StringGrid

5. POVRay engine for Win NT and animation

6. MS-DOS versions

7. IK V6 Car engine animation

8. AGP 1x, 2x etc query on differences

9. Sirling engine animation finished!!

10. Sterling engine animation

11. Bones animation in a 3D real time engine?