Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jan Marguc, posted on June 25, 2001




Image Description, by Jan Marguc



This IOTD shows an inverse kinematics engine, that we did for our final project of a virtual reality course. The IK calculations are based on techniques found on Hugo Elias' great page: http://freespace.virgin.net/hugo.elias/

All geometry and bone hierarchy information was generated using 3D Studio Max 4.0 and exported using a script into a proprietary text file format. A simple method in the skeleton class of the code lets you directly affect a specific bone by some force vector after which all IK calculations are carried out iteratively by the system. The IK system supports bending bones and rotational bones, but you have to specify them yourself, since we could not find direct equivalents to these types in 3D Studio Max. For this particular model, all bones are bending bones except the 3 bones that connect the 3 necks to the root bome in the front part of the dragon. This enables the dragon to turn its head to the sides. As we didn't have specific documentation of how 3D Studio Max stores bones and bone hierarchies, we tried out a couple of different techniques. What we ended up with here is a representation in which Max defines each bone as a startpoint and the name of it's parent bone. At the ends (of the necks for instance) there will be short terminating bones. Still, we don't guarantee that this is the way it actually works in Max (and for any model), but for this model it worked out very well.

Things start to get funny when the program is compiled and executed on the IRIX computer at the Virtual Reality Centre of VR-C at our university (www.vr-c.dk). They have 3 n-vision datavisor hires head mounted displays there. Part of our project was to add support for these HUDs such that they can actually control the positions of the heads of the 3 dragons -- that is why the dragon has 3 heads after all ;-) To enable this option, you have to set USE_HMDS to 1 in the main.cpp file. Due to lack of time we didn't implement rendering of individual views for each of the dragons heads (such that a person wearing the HUD can see what it looks like from the dragon head associated with the HUD). This shouldn't be hard to do though, and we have been told, that there even exists a special OpenGL library for rendering multiple views of the same scenery.

Finally, just for fun, we added a particle system for the head in the middle to add some more action to the scene. ;-) You may find the complete source code, executable binaries as well as the max exporter script on my homepage at http://www.kampsax.dtu.dk/~jm/dragon

In the demo there are a few key, that you can press:
  • 'A' toggles animation on/off
  • 'S' toggles display of the animated and initial skeleton on/off
  • 'W' toggles wireframe mode on/off
  • '+'/'-' can be used to scroll through the different bones of the models.
  • Coloured points will show which vertices will be affected by the bone (and how much)

    You use the mouse to navigate through the scene. It works much like a trackball:
  • Use the left mouse button to rotate the scene.
  • Use the right mouse button to zoom in and out.
  • Additionally the middle mouse button may be used to move the scene horizontally and vertically.
  • Jan Marguc


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    Trolocsis

    June 25, 2001, 02:24 AM

    ahhhh, an IOTD landscape engine with a twist. very cool.

     
    Kezza

    June 25, 2001, 02:44 AM

    I'd call it a complete bend if you're talking about that hydra

     
    Oscar Rydberg

    June 25, 2001, 02:56 AM

    When's the game coming out?!?!

    Walking around with a VR headset and using Your burning morning breath to activate some sensors connected to the dragons fire function, toasting little villagers :)

    Back to reality, nice to see something different!

     
    malkia

    June 25, 2001, 03:06 AM

    Hey this is the Chaos Hydra from HOMM!!

    3D!!

     
    Bent

    June 25, 2001, 04:53 AM

    Very nice

    Maybe we will let you pass :-)

    Bent Larsen
    Teaching Assistant in Virtual Reality course at DTU

     
    DWORD

    June 25, 2001, 05:34 AM

    Very cool image/demo! I'd love to try it using those head mounted displays :)

     
    SamS

    June 25, 2001, 12:14 PM

    What are those red/green/blue dots that I see pass by the screen every once in a while?

    Nice to see some Animation/IK related IOTD. Cool stuff.

     
    Dan MacDonald

    June 25, 2001, 02:02 PM

    They are the points that the heads are following. The IK is resolving the positions of the heads and necks as they try to follow the dots.

     
    Dan MacDonald

    June 25, 2001, 02:02 PM

    They are the points that the heads are following. The IK is resolving the positions of the heads and necks as they try to follow the dots.

     
    Jesse Chounard

    June 25, 2001, 03:08 PM

    Reminds me of the monster in Willow. (Though it only had two heads.)

    Love the images.. good luck with your grade.

    Jesse

     
    SamS

    June 25, 2001, 03:34 PM

    It would be cool if the little cottages would catch on fire.. I guarantee that if you add that you will get an A :)

     
    bgl

    June 25, 2001, 04:37 PM

    Yes, you usually end up having short stump bones at the end of each skeleton branch in 3dsmax, because of the way they define them.

     
    disableddan

    June 26, 2001, 12:29 AM

    Forgive me if this has already been asked (i didn;t read any of the other posts) but how did you do the fire effect? It looks really smooth! Nice work!

     
    Goran Backlund

    June 26, 2001, 10:53 AM

    How do you handle IK-constraints for all three axis?

     
    hornet

    July 02, 2001, 11:03 AM

    Well, for most bones, we don't :)
    Only the first bone of each neck (i.e. the one closest to the body) rotates around the y-axis, all the others act like 2d-bones.
    The mentioned first bone additionally rotates around an axis going from the root of this bone, to the end of the last bone (i.e. the one closest to the head).
    This way we don't have all the joints flexing and getting into wierd positions - and the skeleton is constrained to the single ball-joint, which looks somewhat more natural. Of course, this way the head isn't able to tilt without the rest of the neck following.


    Regards,
    \Mikkel Gjoel

     
    This thread contains 15 messages.
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.