X 3 DOM HAnim Bullet Physics An introduction
X 3 DOM H-Anim + Bullet Physics An introduction to x 3 dom – physics and making a ragdoll using hanim 2015 Alexandros-Apollon Rodopoulos TEI of Crete MCLAB
2015 • • SCOPE Kinesiology Introduce H-Anim Bullet Physics / Ammo. js Exploit H-Anim TEI Crete
2015 Kinesiology TEI Crete • Is the study of human and animal movement • Three major systems: o Nervous System o Skeletal System o Muscular System
2015 Kinesiology TEI Crete Segment Joint Skeletal System • Joints and Segments • Some attributes of them Joints Segments Do. F Mass Limits Length Type of joint Center of mass Inertia designed by Freepik. com
2015 H-Anim TEI Crete • Compatibility (is a standard to representing humanoids in VRML 97) • Flexibility (allowing to create a humanoid with a different tool and animated with other) • Simplicity (it makes a lot easier the use of models and sharing)
2015 H-Anim TEI Crete In order to simplify the creation of humanoids they developed five new nodes: o Joint Node o Segment Node o Site Node o Displacer Node o Humanoid Node
2015 H-Anim Joint Node • Represents the joint in the body • Gives rotation and motion to segments • Can only be child of another Joint node Fields Information name Must exists, standard name llimit Optional, lower joint limits ulimit Optional, upper joint limits …others … …. TEI Crete
2015 H-Anim Segment Node • Represents the segment in the body • Can have Shapes or Transform nodes Fields Information name Must exists, standard name mass Optional, the mass of the segment center. Of. Mass Optional, center of mass …others … …. TEI Crete
2015 H-Anim TEI Crete Site Node • Defines an “end effector” location • An attachment point for accessories (jewelry) • Location for a virtual camera (through eyes) Fields Information name Must exists , "_tip" suffix appended children Stores any accessories to the segment translation Defines the location of end effector …others… ….
2015 H-Anim Displacer Node • Identifies specific groups of vertices (eyebrows) • Represents particular muscular action • Complete configuration of vertices in a Segment Fields Information name Must exists , "_feature" suffix or “_action” for motion …. …others… TEI Crete
2015 H-Anim TEI Crete Humanoid Node • Stores human-readable data • Can be used for positioning in space Fields Information name Must be present, for identification version Version of specification that follows info Information's about the author and the model …others… ….
2015 H-Anim TEI Crete Basic Modeling • The humanoid must be in a standing position • Facing +Z, +Y Up and +X to the humanoid’s left • Origin (0, 0, 0) located at ground level between the feet
2015 H-Anim Hierarchy-Names sacrum Humanoid. Root l_hip r_hip Joint l_thigh l_knee r_thigh r_knee pelvis l_shoulder sacroiliac TEI Crete r_shoulder vl 5 l_calf l_ankle r_calf r_ankle l_upperarm l_elbow r_upperarm r_elow l 5 skullbase l_hindfoot l_midtarsal Segment l_middistal r_hindfoot r_midtarsal r_middistal l_forearm l_wrist l_hand r_forearm r_wrist skull r_hand
H-Anim 2015 TEI Crete H-Anim in X 3 DOM: Segment node Transform node Joint node Transform node Segment node
2015 H-Anim in X 3 DOM: H-Anim xhtml Code TEI Crete X 3 D Scene Visual
2015 Bullet Physics • Is a physics engine giving us simulation • Is written in C, C++ • Free and open-source software Features About Simulation Collision detection, soft and rigid body dynamics Collision shapes Sphere, box, cylinder, cone, convex hull TEI Crete
2015 Bullet Physics TEI Crete Ammo. js • The direct port of Bullet physics to Java. Script (for web using) Collider Shapes Constraining Methods bt. Sphere. Shape bt. Box. Shape bt. Point 2 Point. Constraint bt. Slider. Constraint bt. Cylinder. Shape bt. Cone. Shape bt. Convex. Hull. Shape bt. Capsule. Shape bt. Generic 6 Dof. Constraint bt. Universal. Constraint bt. Hinge. Constraint bt. Cone. Twist. Constraint
2015 Bullet Physics TEI Crete Bullet. Physics. js • Is an implementation of rigid body physics for X 3 DOM • Enables real-time physics simulation in X 3 D scenes
2015 X 3 D-Bullet Physics TEI Crete • Pairing Ammo. js with Bullet. Physics. js (Collidable Shapes) X 3 D Collidable Shapes Ammo. js Collider Shapes Sphere Box bt. Sphere. Shape Cylinder Cone Indexed. Face. Set “Not exist” bt. Cylinder. Shape bt. Cone. Shape bt. Convex. Hull. Shape bt. Capsule. Shape
2015 X 3 D-Bullet Physics TEI Crete • Pairing Ammo. js with Bullet. Physics. js (Constrains-Joints) X 3 D Joints Types Ammo. js Constraining Methods Ball. Joint Slider. Joint bt. Point 2 Point. Constraint bt. Slider. Constraint Motor. Joint Universal. Joint Single. Axis. Hinge. Joint Double. Axis. Hinge. Joint bt. Generic 6 Dof. Constraint bt. Universal. Constraint bt. Hinge. Constraint
2015 X 3 D-Bullet Physics Demo 1: Create a simple scene with rigid bodies TEI Crete
2015 X 3 D-Bullet Physics TEI Crete Transform Node (appears in X 3 D Scene “visual”) Name of transform and location Colors or texture image Size of box (X, Y, Z)
2015 X 3 D-Bullet Physics TEI Crete Collidable. Shape Node (Physics part I) Set with the same attributes from Transform and USE it
2015 X 3 D-Bullet Physics TEI Crete Rigid. Body Node (Physics part II) Collection of rigid bodies Defines gravity Add rigid body inside Defines attributes If fixed=true, then can’t be use mouse on it If mass=0 gravity doesn’t affect USE an exist collidable shape
2015 X 3 D-Bullet Physics TEI Crete Collision. Sensor Node (Physics part III) Sense the collisions of rigid bodies Setting the attributes and behaviors USE of collidable shape and enabled it
2015 X 3 D-Bullet Physics Demo 2: Adding a simple hinge joint in the scene TEI Crete
2015 X 3 D-Bullet Physics TEI Crete Joint Node (hinge constraint) Includes joints Setting attributes anchor. Points of rigid bodies (depend from their size) Setting limits and axis of rotation USE rigid bodies as body 1 and body 2
2015 X 3 D-Bullet Physics Demo 3: Create a basic ragdoll TEI Crete
2015 X 3 D-Bullet Physics Ragdoll • In order to simulate human motion we implemented a new joint • Cone. Twist. Joint is useful for limbs like the upper arm or the upper leg TEI Crete
2015 X 3 D-Bullet Physics Cone. Twist. Joint Attributes About anchor. Point 1 anchor. Point 2 euler 1 euler 2 swing. Span 1 Specifies origin of body 2 Specifies angle of body 1 Specifies angle of body 2 The limit on the Z rotation axis in degrees swing. Span 2 The limit on the Y rotation axis in degrees The limit on the X rotation axis in degrees twist. Span TEI Crete
2015 X 3 D-Bullet Physics Creating a ragdoll using H-Anim prototype: • Create dynamically ragdolls from file • More realistic Benefits Details Dynamic Accurate Fast Dynamic creation of humanoids More accurate calculations Faster than the normal way TEI Crete
2015 X 3 D-Bullet Physics TEI Crete We developed a Java. Script, for that work X 3 D Scene Find H-Anim Find Transforms to Scene Transfer Joints & Segments Collidables Shapes Create Rigid. Bodies Physics Components Constraints
2015 X 3 D-Bullet Physics H-Anim based ragdoll: TEI Crete
2015 X 3 D-Bullet Physics We can support several models from H-Anim examples TEI Crete
Thanks!
- Slides: 35