Editing
Appendix/Ramblings/VirtualReality
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==AstroBoyWalk== While searching for an executable COLLADA (.dae) file that illustrates most of the 3D-animation features that I am most interested in and at the same time is relatively simple/short, I came to appreciate that '''astroBoy_walk''' is a model that has served as a reasonably good teaching example for the visualization/gaming community over the past ∼decade. I first found the relevant (approximately 5000-line) COLLADA file — named, [https://gitlab.doc.gold.ac.uk/jtasn001/pm_jtasn001_lab1234/blob/8dfcfea04c40c477c5fe1ffa643dd88c3e2a940b/examples/3d/assimpExample/bin/data/astroBoy_walk.dae ''astroBoy_walk.dae'']— in a [http://github.com github] repository hosted by @jtasn001. Using a repetitive sequence of copy-and-paste strokes — transferring about 60 lines of code at a time — I generated a duplicate of this COLLADA file on my Mac. (Initially, I made one copy/paste mistake; but, thankfully, a second careful perusal through my Mac file identified the error and it was easy to fix.) On my Mac, the filename is: '''/Dropbox/3Dviewers/astroBoy/JoelBoyWalk02.dae'''. Amazingly, when I opened this .dae file inside the Mac's Preview app, a properly constructed 3D ''astroBoy'' appeared — absent its associated, colorful texture map. By clicking on/dragging across the Preview window, I was immediately able to view the 3D model from all sides. When I moved the mouse across the lowest segment of the Preview window, a set of stop/play buttons appeared; when I clicked the play button, astroBoy started walking! This was quite exciting, as it meant that in principle I had in-hand a readable & executable COLLADA file that would serve to teach me many essential — and sometimes, subtle — aspects of modern 3D animation/gaming techniques! NOTE: After joining [http://github.com github] on 12 September 2019, I was able to directly download the ''astroBoy_walk.dae'' COLLADA file from the @jtasn001 github repository — bypassing the tedious, time-consuming, and error-susceptible copy-and-paste steps. I was also able to directly download from this same repository the ''boy_10.tga'' image file that is used by the animation/gaming community as a default, purple & gold texture map for astroBoy. (See Wikipedia's [https://en.wikipedia.org/wiki/Truevision_TGA#History history of .tga file format].) Immediately below, in the scrolling text window of '''Example #7''', I have highlighted the <xml>-based instructional statements that appear throughout the astroBoy_walk.dae COLLADA file. The results of this initial analysis of the model file should aid my efforts to focus on the visualization tasks that are accomplished in separate, individual subsections of the code. <table border="0" align="center" width="80%"> <tr><th align="center" colspan="2">Example #7 — Initial Analysis of [https://gitlab.doc.gold.ac.uk/jtasn001/pm_jtasn001_lab1234/blob/8dfcfea04c40c477c5fe1ffa643dd88c3e2a940b/examples/3d/assimpExample/bin/data/astroBoy_walk.dae ''astroBoy_walk.dae'']</th></tr> <tr><td align="left"> <div style="height: 400px; width: 700px; overflow: scroll;"> <pre> <?xml version="1.0" encoding="utf-8"?> <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> <asset> <contributor> <author>lwong</author> <authoring_tool>Maya2008 | ColladaMaya v3.04E</authoring_tool> <copyright> Copyright 2008 Sony Computer Entertainment Inc. Licensed under the Creative Commons Attribution Noncommercial Share Alike license. See license file or www.creativecommons.org for details. </copyright> </contributor> <created>2008-06-18T18:16:41Z</created> <modified>2008-06-18T18:16:41Z</modified> <unit meter="0.01" name="centimeter"/> <up_axis>Y_UP</up_axis> </asset> <library_animations> <animation id="spine01.blendParent1"> <!-- Line 21 of 4968 --> <source id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-input"> <float_array id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-input-array" count="26"> ... </source> <source id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-output"> <float_array id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-input-array" count="26"> ... </source> <source id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-interpolations"> <Name_array id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-interpolations-array" count="26"> ... </source> <source id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-intangents"> <float_array id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-intangents-array" count="52"> ... </source> <source id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-outtangents"> <float_array id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-outtangents-array" count="52"> ... </source> <sampler id="spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-sampler"> ... </sampler> <channel source="#spine01.blendParent1_astroBoy_newSkeleton_spine01_blendParent1-sampler" target="astroBoy_newSkeleton_spine01/blendParent1"/> </animation> <!-- Line 76 of 4968 --> ... <!-- Multiple <animation> subsections THRU line #3557 <animation id="spine01.blendParent1">count = 26, Lines 21 - 76. <animation id="root.translate">count = 26, Lines 77 - 142 <animation id="root.rotateX">count = 26, Lines 143 - 199 <animation id="root.rotateY">count = 26, Lines 200 - 256 <animation id="root.rotateZ">count = 26, Lines 257 - 314 <animation id="spine01.rotateX">count = 26, Lines 315 - 371 <animation id="spine01.rotateY">count = 26, Lines 372 - 429 <animation id="spine01.rotateZ">count = 26, LInes 430 - 486 <animation id="spine02.rotateX">count = 26, Lines 487 - 543 <animation id="spine02.rotateY">count = 26, Lines 544 - 600 <animation id="spine02.rotateZ">count = 26, Lines 601 - 658 <animation id="neck01.rotateX">count = 26, Lines 659 - 715 <animation id="neck01.rotateY">count = 26, Lines 716 - 772 <animation id="neck01.rotateZ">count = 26, Lines 773 - 829 <animation id="head.rotateX">count = 26, Lines 830 - 886 <animation id="head.rotateY">count = 26, Lines 887 - 944 <animation id="head.rotateZ">count = 26, Lines 945 - 1001 <animation id="L_clavicle.rotateX">count = 26, Lines 1002 - 1058 <animation id="L_clavicle.rotateY">count = 26, Lines 1059 - 1115 <animation id="L_clavicle.rotateZ">count = 26, Lines 1116 - 1173 <animation id="L_shoulder.rotateX">count = 26, Lines 1174 - 1230 <animation id="L_shoulder.rotateY">count = 26, Lines 1231 - 1287 <animation id="L_shoulder.rotateZ">count = 26, Lines 1288 - 1344 <animation id="L_elbow.rotateX">count = 26, Lines 1345 - 1401 <animation id="L_elbow.rotateY">count = 26, Lines 1402 - 1459 <animation id="L_elbow.rotateZ">count = 26, Lines 1460 - 1516 <animation id="L_wrist.rotateZ">count = 26, Lines 1517 - 1573 <animation id="R_clavicle.rotateX">count = 26, Lines 1574 - 1630 <animation id="R_clavicle.rotateY">count = 26, Lines 1631 - 1688 <animation id="R_clavicle.rotateZ">count = 26, Lines 1689 - 1745 <animation id="R_shoulder.rotateX">count = 26, Lines 1746 - 1802 <animation id="R_shoulder.rotateY">count = 26, Lines 1803 - 1859 <animation id="R_shoulder.rotateZ">count = 26, Lines 1860 - 1917 <animation id="R_elbow.rotateX">count = 26, Lines 1918 - 1974 <animation id="R_elbow.rotateY">count = 26, Lines 1975 - 2031 <animation id="R_elbow.rotateZ">count = 26, Lines 2032 - 2088 <animation id="R_wrist.rotateX">count = 26, Lines 2089 - 2146 <animation id="R_wrist.rotateZ">count = 26, Lines 2147 - 2203 <animation id="hips.rotateX"> THRU <animation id="hips.rotateZ">count = 26, Lines 2204 - 2375 <animation id="L_hip.rotateX"> THRU <animation id="L_hip.rotateZ">count = 26, Lines 2376 - 2546 <animation id="L_knee_01.rotateZ">count = 26, Lines 2547 - 2603 <animation id="L_knee_02.rotateZ">count = 26, Lines 2604 - 2661 <animation id="L_ankle.rotateX"> THRU <animation id="L_ankle.rotateZ">count = 26, Lines 2662 - 2832 <animation id="L_toeBall.rotateX"> THRU <animation id="L_toeBall.rotateZ">count = 26, Lines 2833 - 3004 <animation id="R_hip.rotateX"> THRU <animation id="R_hip.rotateZ">count = 26, Lines 3005 - 3176 <animation id="R_knee_01.rotateZ">count = 26, LInes 3177 - 3233 <animation id="R_knee_02.rotateZ">count = 26, Lines 3234 - 3290 <animation id="R_ankle.rotateX"> THRU <animation id="R_ankle.rotateZ">count = 26, Lines 3291 - 3462 <animation id="R_toeBall.rotateX"> THRU <animation id="R_toeBall.rotateZ">count = 26, Lines 3463 - 3634 --> ... </animation> </library_animations> <library_physics_scenes> <!-- Line 3637 of 4968 --> <physics_scene id="MayaNativePhysicsScene"> <technique_common> <gravity>0 -980 0</gravity> <time_step>0.083</time_step> </technique_common> </physics_scene> </library_physics_scenes> <library_lights> <light ... pointLightShape1 ...> </light> <light ... ambientLightShape1 ...> </light> </library_lights> <library_images> <image id="file9" name="file9"> ... </image> </library_images><!-- THRU line 3687 --> <library_materials> ... </library_materials> <library_effects> <effect id="matte-fx"> ... </effect><!-- THRU line 3782 --> <effect id="shiny-fx"> ... </effect><!-- THRU line 3861 --> <effect id="face-fx"> ... </effect><!-- THRU line 3940 --> <effect id="glass-fx"> ... </effect><!-- THRU line 4019 --> </library_effects> <library_geometries> <geometry id="boyShape" name="boyShape"> <mesh> <source id="boyShape-positions" name="position"> <float_array id="boyShape-positions-array" count = "7857"> <!-- 3 x 2619 = 7857 --> <technique_common> <accessor source="#boyShape-positions-array" count="2619" stride="3"> <param name="X" type="float"/> <param name="Y" type="float"/> <param name="Z" type="float"/> </accessor> </technique_common> </source> <source id="boyShape-normals" name="normal"> <float_array id="boyShape-normals-array" count="9519"> <!-- 3 x 3173 = 9519 --> <technique_common> <accessor source="#boyShape-normals-array" count="3173" stride="3"> <param name="X" type="float"/> <param name="Y" type="float"/> <param name="Z" type="float"/> </accessor> </technique_common> </source> <source id="boyShape-map1" name="map1"> <float_array id="boyShape-map1-array" count="6444"> <!-- 3 x 2148 = 6444 --> <technique_common> <accessor source="#boyShape-map1-array" count="3222" stride="2"> <param name="S" type="float"/> <param name="T" type="float"/> </accessor> </technique_common> </source> <vertices id="boyShape-vertices"> <input semantic="POSITION" source="#boyShape-positions"/> </vertices> <!-- Line 4056 --> <polylist material="faceSG" count="508"> <input semantic="VERTEX" source="#boyShape-vertices" offset="0"/> <input semantic="NORMAL" source="#boyShape-normals" offset="1"/> <input semantic="TEXCOORD" source="#boyShape-map1" offset="2" set="0"/> <vcount> ... </vcount> <p> ... </p> </polylist> <polylist material="glassSG" count="12"> <input semantic="VERTEX" source="#boyShape-vertices" offset="0"/> <input semantic="NORMAL" source="#boyShape-normals" offset="1"/> <input semantic="TEXCOORD" source="#boyShape-map1" offset="2" set="0"/> <vcount>4 4 4 4 4 4 4 4 4 4 4 4</vcount> <p> ... </p> </polylist> <polylist material="shinnySG" count="1454"> <input semantic="VERTEX" source="#boyShape-vertices" offset="0"/> <input semantic="NORMAL" source="#boyShape-normals" offset="1"/> <input semantic="TEXCOORD" source="#boyShape-map1" offset="2" set="0"/> <vcount> ... </vcount> <p> ... </p> </polylist> <polylist material="matteSG" count="574"> <input semantic="VERTEX" source="#boyShape-vertices" offset="0"/> <input semantic="NORMAL" source="#boyShape-normals" offset="1"/> <input semantic="TEXCOORD" source="#boyShape-map1" offset="2" set="0"/> <vcount> ... </vcount> <p> ... </p> </polylist> </mesh> <extra> ... </extra> </geometry> </library_geometries> <!-- THRU line 4103 --> <library_controllers> <controller id="boyShape-skin" name="skinCluster1"> <skin source="#boyShape"> <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</bind_shape_matrix> <source id="boyShape-skin-joints"> ... </source> <source id="boyShape-skin-bind_poses"> ... </source> <source id="boyShape-skin-bind_poses"> <float_array id="boyShape-skin-bind_poses-array" count="704"> ... </float_array> ... </source> <source id="boyShape-skin-weights"> <float_array id="boyShape-skin-weights-array" count="1160"> ... </float_array> ... </source> <joints> <input semantic="JOINT" source="#boyShape-skin-joints"/> <input semantic="INV_BIND_MATRIX" source="#boyShape-skin-bind_poses"/> </joints> <vertex_weights count="2619"> <input semantic="JOINT" source="#boyShape-skin-joints" offset="0"/> <input semantic="WEIGHT" source="#boyShape-skin-weights" offset="1"/> <vcount> ... </vcounts> <v> ... </v> </vertex_weights> </skin> </controller> </library_controllers> <!-- THRU line 4147 --> <library_visual_scenes> <visual_scene id="VisualSceneNode" name="astroBoy_walkbake"> ... <!-- LOTS OF COMMANDS --> ... </visual_scene> </library_visual_scenes> <!-- THRU line 4960 --> <scene> <instance_physics_scene url="#MayaNativePhysicsScene"/> <instance_visual_scene url="#VisualSceneNode"/> </scene> </COLLADA> </pre> </div> </td> <td align="center" bgcolor="lightgrey">[[File:AstroBoy walk.png|250px|astroBoy_walk]]</td> </tr></table> Here are a few additional items of note regarding ''Example #5'': <ul> <li>Check out …</li> <ul> <li>[http://www.wazim.com/Collada_Tutorial_1.htm Part 1] of ''Step by Step Skeletal Animation in C++ and OpenGL, Using COLLADA'' (circa 2010)</li> <li>[http://www.wazim.com/Collada_Tutorial_2.htm Part 2] of ''Step by Step Skeletal Animation in C++ and OpenGL, Using COLLADA'' (circa 2010) — especially the subsection titled, "How skeletal Animation Works?"</li> </ul> </ul>
Summary:
Please note that all contributions to JETohlineWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JETohlineWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Tiled Menu
Table of Contents
Old (VisTrails) Cover
Appendices
Variables & Parameters
Key Equations
Special Functions
Permissions
Formats
References
lsuPhys
Ramblings
Uploaded Images
Originals
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information