How to Build X3D Web Graphics With Animation

How to Build X3D Web Graphics With Animation thumbnail
Build X3D Web Graphics With Animation

Animation is the change of some aspect of an object over time. The ability to animate objects within a 3D scene is one of the fundamental skill sets required of the graphics programmer.

Animating objects in X3D is a straightforward process. One can design X3D scene animations to change the location and orientation of shape nodes over time. This article demonstrates the basic steps required to program animation in X3D by walking the reader through the Web 3D Consortium's "Hello X3D Authors" example.

Things You'll Need

  • X3D Edit or other X3D authoring tool
Show More

Instructions

    • 1

      Study this scene, in which the Text Geometry that states "Hello X3D Authors" will be animated to rotate around the 3D depiction of the Earth. The parent node of the shape being animated (Transform Node) requires a defined DEF name. In the example, the name is "SimpleGeoStationarySatellite."
      <Transform DEF='EarthCoordinateSystem'>
      ...
      <Transform DEF='SimpleGeoStationarySatellite' rotation='1 0 0 .3' scale='0.1 0.3 0.1' translation='0 0 5'>
      <Shape>
      <Appearance>
      <Material diffuseColor='0.9 0.1 0.1'/>
      </Appearance>
      <Text string='Hello X3D Authors !!' solid='true'>
      <FontStyle size='3'/>
      </Text>
      </Shape>
      </Transform>
      </Transform>

    • 2

      Understand that, in the "Hello X3D Authors" example, the orientation interpolator is used to have the words "Hello X3D Authors" rotate about the earth in the scene. The keyValue in the orientation interpolator defines the rotational position of the text shape at each key value.
      <OrientationInterpolator DEF='SpinThoseThings' key='0.00 0.25 0.50 0.75 1.00' keyValue='0 1 0 0 0 1 0 1.5708 0 1 0 3.14159 0 1 0 4.7123889 0 1 0 6.2831852'/>

    • 3

      Realize that, for all X3D animations, a trigger is required to start the animation. In this example, a touchSensor is used to allow the user to click the Earth to start the animation of the "Hello X3D Authors" text.
      <TouchSensor DEF='ClickTriggerTouchSensor' description='Click to start animation'/>

    • 4

      Add a TimeSensor to serve as the clock for the scene animation. The cycleInterval will be set to the desired duration of the animation. If an infinitely repeated animation is desired, set the loop variable to "true." In this example, the cycle interval will be set to 12 seconds and will loop infinitely.
      <TimeSensor DEF='OrbitalTimeInterval' cycleInterval='12' loop='true'/>

    • 5

      Create a route to take the touch sensor's output to the TimeSensor input to commence the animation chain.
      <ROUTE fromNode='ClickTriggerTouchSensor' fromField='touchTime' toNode='OrbitalTimeInterval' toField='startTime'/>

    • 6

      Create a route from the TimeSensor's fraction_changed field to the orientation interpolator's set_fraction field to drive the animation chain.
      <ROUTE fromNode='OrbitalTimeInterval' fromField='fraction_changed' toNode='SpinThoseThings' toField='set_fraction'/>

    • 7

      Route the orientation interpolator value_changed field to the target node, which completes the animation chain.
      <ROUTE fromNode='SpinThoseThings' fromField='value_changed' toNode='EarthCoordinateSystem' toField='set_rotation'/>

    • 8

      View the scene and click on the Earth to trigger the animation of the words "Hello X3D" authors around the Earth.

    • 9

      View the scene and click on the Earth to trigger the animation of the words 'Hello X3D' authors around the Earth.

Tips & Warnings

  • Any animated scene in X3D requires two fundamental components: a clock to control the animation, and a description or control of the desired behavior over time based on the clock playback. Use of comments within the X3D markup will prevent the author or future authors from confusing scene architecture choices.

  • Verify the input and output types when creating X3D routes. Mismatched types will result in scene errors or failed scene validation in X3D-Edit.

Related Searches:

Resources

  • Photo Credit Don Brutzman and Leonard Daly, per the open-source license in the references.

Comments

You May Also Like

  • How to Use X3D to Make Simple 3D Graphics for the Web

    X3D Graphics is the open source based, XML-based, international standard for 3D on the Web. In the 30 years that 3D graphics...

  • How to Build X3D Graphics With Textures

    Using 2D image textures mapped to 3D geometries brings greater realism to 3D graphics. X3D has five node types, which allows for...

  • How to Create 3D Animations

    3D animations are currently used for cartoons and movies and promotional videos. Anyone can create a 3D animation using both free and...

  • How to Write a Graphics Program

    Most computer users and Internet surfers have a misguided belief that writing a graphics program is only for super-computer users. This is...

  • What Is the File Extension Wrl?

    The Internet has produced many of the file extensions that populate our Windows systems. A common example is .html, which contains code...

  • How to Make 3D Paper Graphics

    Paper folding techniques are used to create 3-D objects. Graphic, patterned paper can be used as part of the overall design and...

  • 3-D Animation Programs

    3-D Animation Programs. Three-D animation programs prepare students for a career in such fields as graphic arts and animation in the film...

  • The Advantages of Web Animation

    The advantages of web animation usually involve both advertisements and enhancing the interactivity of websites, or both. Animated advertisements may provide an...

  • How to Make an Object Glow in 3ds Max

    3ds Max is a software program used for creating and animating virtual 3-D objects. One of Max's features for making objects appear...

  • The Best 3D Maps

    The Best 3D Maps. Gone are the days when people used to rely on flat, static, boring-looking maps in order to search...

  • 3D Animation Programs

    3D Animation Programs. In the wake of numerous award-winning animated movies, many students and recent graduates in the field of computer design...

  • How to Create 3D Web Sites

    Websites that are 3D are a graphical illusion produced in the graphic design phase in Web development. While more options are becoming...

  • How to Make 3D Video For YouTube and Web

    If you have a 3D camera or two cameras filming the same thing, you can create 3D videos and upload them to...

  • How to Create 3D Animation With GIS

    ArcGIS is a software that utilizes ArcScene to create geographic information systems (GIS). A GIS system utilizes 3-D models and aerial photographs...

  • The Best 3D Animation Programs

    The Best 3D Animation Programs. Though 3D animation saw its roots in early computer animation, it didn't become mainstream until the late...

  • How to Create a 3D Graphic

    If you want to make your website a little bit snazzier than the next guys, then you have to include graphics that...

  • How to Create 3D Animation

    3D animations are cool! The best part is, it isn't brain surgery - you can create 3D animations yourself, with a bit...

  • 3D Graphic Designer Programs

    3D Graphic Designer Programs. Three-dimensional graphic design is the use of 3D objects in interactive media for entertainment and educational purposes. In...

  • How to Make Cool Text on MySpace to Display a Name

    The Cool Text application on MySpace contains a distinctive set of typefaces that can be used to create text, such as names....

Related Ads

Featured