Editing
Appendix/Ramblings/OculusRiftS
(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!
===Full Ellipsoid=== <table border="0" align="right" cellpadding="10"><tr><td align="center"> <table border="1" align="center" cellpadding="5"><tr><td align="center"> Mac Preview of FullEllip02.dae</td></tr> <tr><td align="center" bgcolor="lightgrey">[[File:FullEllip02Small.png|300px|Mac Preview of FullEllip02.dae]]</td></tr> </table> </td></tr></table> Here we attempt to put together all eight octants to form a "full" ellipsoid that is spinning about a common (Z) axis. We begin by making a copy of "Try06_ZupZrot10.dae" and name the new file, "FullEllip01.dae". Next, we make a temporary copy of the "b41c385_DI.dae" model and cut everything away except the <geometry id="ReflectOctant">. We concatenate this geometry element with the "FullEllip01.dae" model file, inserting the concatenated portion into the <library_geometries> segment of the COLLADA code. The only additional step was to insert the "#ReflectOctant" instance into the <library_nodes> element that has id="ID3_EFE", along with the already existing "#EllipsoidOctant" instance. <ul> <li> <font color="darkgreen">FullEllip02.dae on 21 April 2020</font>: <br /> The image presented here on the right shows what the resulting configuration looked like in the Mac Preview app. After the code executed the instructions rotationX = 180 and rotationY = 90, as desired (see the above-tabulated values for the "parent" COLLADA file, "Zup Zrot10"), the Z-axis of this ellipsoid quadrant points out of the page toward the viewer. Fortunately, the conversion from .dae to .glb format, as well as the import into the Oculus Rift S went very smoothly. It worked the first time in both venues; in particular, when animated, this red ellipsoid quadrant spun counter-clockwise about the (newly oriented) Z-axis, moving from 0° to +135°, as intended. </li> <li> <font color="darkgreen">FullEllip04.dae on 21 April 2020</font>: <br /> Leaving the "First" quadrant of the ellipsoidal configuration in its original orientation (with the X-axis parallel to the line of purple cubes), this is an attempt to "replicate and flip" this First quadrant three times in such a way that the entire ellipsoidal surface is fully visualized, then spin all four quadrants in sync about the (original) ± Z-axis. Initially we set up four separate nodes in the <visual_scene> such that … <ul> <li><b>id="First"</b> Quadrant: rotation(X,Y,Z) = (0.0, 0.0, 0.0)</li> <li><b>id="Second"</b> Quadrant: rotation(X,Y,Z) = (180.0, 0.0, 0.0)</li> <li><b>id="Third"</b> Quadrant: rotation(X,Y,Z) = (0.0, 180.0, 0.0)</li> <li><b>id="Fourth"</b> Quadrant: rotation(X,Y,Z) = (180.0, 180.0, 0.0)</li> </ul> <pre> <node id="First" name="First_instance_EFE">^M <translate>0.0 5.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">3.0 3.0 3.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Second" name="Second_instance_EFE">^M <translate>0.0 5.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 180.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">3.0 3.0 3.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Third" name="Third_instance_EFE">^M <translate>0.0 5.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 180.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">3.0 3.0 3.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Fourth" name="Fourth_instance_EFE">^M <translate>0.0 5.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 180.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 180.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">3.0 3.0 3.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M </pre> And we basically cloned the original animation element to create a pair of instructions … <ul> <li><b><animation id="First_rotation_euler_Z"></b>: Spins from 0° to +135° and is ''channel''ed to (1) target="First/rotationZ.ANGLE", and (2) target="Fourth/rotationZ.ANGLE".</li> <li><b><animation id="Cube_rotation_euler_Z"></b>: Spins from 0° to -135° and is ''channel''ed to (1) target="Second/rotationZ.ANGLE", and (2) target="Third/rotationZ.ANGLE".</li> </ul> <pre> <channel source="#First_rotation_euler_Z-sampler" target="First/rotationZ.ANGLE"/> <channel source="#First_rotation_euler_Z-sampler" target="Fourth/rotationZ.ANGLE"/> </pre> <pre> <channel source="#Cube_rotation_euler_Z-sampler" target="Third/rotationZ.ANGLE"/>^M <channel source="#Cube_rotation_euler_Z-sampler" target="Second/rotationZ.ANGLE"/>^M</pre> This COLLADA model worked perfectly, as desired, when I loaded it into the Mac Pro's Preview app. But the animation was funky when viewed with the Oculus Rift S. All four quadrants were initially aligned, covering the entire ellipsoidal surface as desired; and the initial orientation of the ellipsoid was correct. But the four quadrants spun about the longest (X) axis rather than about the shortest (Z) axis. I wonder what is causing this! </li> <li> <font color="darkgreen">FullAgain05.dae on 22 April 2020 [also, FullAgain22.dae on 23 April 2020]</font>: <br />Inside the <visual_scene id="ID1">, we enclosed the First-thru-Fourth nodes inside of an overarching parent node with id="EntireEllipsoid" as follows … <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M <node id="First" name="First_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.0 1.0 1.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Second" name="Second_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 180.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.0 1.0 1.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Third" name="Third_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 180.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.0 1.0 1.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M <node id="Fourth" name="Fourth_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 180.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 180.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.0 1.0 1.0</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M </node>^M </pre> Notice that the scaling and translation instructions now reside inside the overarching "EntireEllipsoid" node. And, consistent with this node rearrangement, the animation instruction is reduced to a single "channel" … <pre> <channel source="#First_rotation_euler_Z-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> This all worked fine, except inside the Oculus Rift S environment, the ellipsoid spins about the longest (X) axis of the object, rather than about the shortest (Z) axis, as desired and as is the case when viewed with the Mac's Preview app. Hmmmm! </li> <li> <font color="darkgreen">FullAgain06.dae on 22 April 2020</font>: <br />Scaled the "First" quadrant node by (1.1, 1.1, 1.1) in order for it to stick out a bit from the other quadrants to help me decipher rotational behavior; and reoriented the "EntireEllipsoid" initially by turning it 90° in X and 90° in Y. But the animation instructions were not altered. <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 90.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 90.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M <node id="First" name="First_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.1 1.1 1.1</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M ... </pre> The initial reorientation of the ellipsoid, and the "First" quadrant rescaling were both correctly implemented by both the Mac's Preview app and the Oculus Rift S environment. Also, both visualization tools continued to execute the same spin animation; in particular, inside my Oculus home the resulting spin was about the [newly oriented] longest (X) axis, as before. <table border="0" align="center" cellpadding="10"><tr><td align="center"> <table border="1" align="center" cellpadding="5"><tr><td align="center"> Mac Preview of FullAgain11.dae</td></tr> <tr><td align="center" bgcolor="lightgrey">[[File:FullAgain11Small.png|400px|Mac Preview of FullAgain11.dae]]</td></tr> </table> </td></tr></table> </li> <li> <font color="darkgreen">FullAgain11.dae on 22 April 2020</font>: <br />Here the animation is directed to spin about the X-axis … <pre> <channel source="#First_rotation_euler_Z-sampler" target="EntireEllipsoid/rotationX.ANGLE"/>^M </pre> after reorienting the "EntireEllipsoid" initially by turning it 90° in Y and 90° in Z … <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 90.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 90.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M <node id="First" name="First_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.1 1.1 1.1</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M ... </pre> <font color="red"><b>As desired, the result in both the Oculus Home environment and in the Mac Pro Preview app</b></font> — see the image immediately above — is that initially the ellipsoid is reoriented so that the shortest axis of the ellipsoid is aligned with the global X-axis, then the animation spins the ellipsoid about that (its) shortest axis. </li> <li> <font color="darkgreen">FullAgain30.dae on 23 April 2020</font>: Main revision is to ''force'' rotationZ to start at a nonzero angle (here, 45°) <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <float_array id="First_rotation_euler_Z-output-array" count=" 2">^M 45.0^M 180.0^M </float_array>^M </pre> <pre> <channel source="#First_rotation_euler_Z-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">0.0 0.0 1.0 0.0</rotate>^M <rotate sid="rotationY">0.0 0.0 1.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M <node id="First" name="First_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.1 1.1 1.1</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain31.dae on 23 April 2020</font>: Here, all we did was set the '''initial''' "rotate Z" instruction back from 45° to 0°, which essentially matches the instructions found in FullAgain05.dae (see above) <br />RESULT: <font color="orange">Oculus animation does not match Mac Preview app.</font> <pre> <float_array id="First_rotation_euler_Z-output-array" count=" 2">^M 45.0^M 180.0^M </float_array>^M </pre> <pre> <channel source="#First_rotation_euler_Z-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">0.0 0.0 1.0 0.0</rotate>^M <rotate sid="rotationY">0.0 0.0 1.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M <node id="First" name="First_instance_EFE">^M <translate>0.0 0.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">1.1 1.1 1.1</scale>^M <instance_node url="#ID3_EFE" />^M </node>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain34y.dae on 23 April 2020</font>: <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationY.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationY">0.0 1.0 0.0 45.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain36z.dae on 23 April 2020</font>: <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 30.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain39z.dae on 24 April 2020</font>: (very similar to 36z) <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 5.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 5.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain40z.dae on 24 April 2020</font>: (very similar to 36z) <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 90.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain41z.dae on 24 April 2020</font>: (very similar to 36z) <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationZ.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 0.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 0.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> NOTE: Earlier I tried to view a model — named "FullAgain35z.dae" and not discussed above — that I ''thought'' had exactly the same set of parameters as this model (i.e., the same as FullAgain41z.dae), but it failed to execute properly in the Oculus Rift S environment. I just performed a unix "diff" between these to model files and it identified two lines of code that were not the same, namely, the "rotationX" and the "rotationY" specifications for the "EntireEllipsoid" <node>. However, the only difference that I could see was that an extra blank space was in between two of the floating-point numbers in the pair of lines of code. I edited the "FullAgain35z.dae" file, deleting then retyping the two suspect lines, but the Oculus was unable to load the file. My conclusion is that the file is corrupted in some way and that it has been corrupted — and, as a result, very misleading! to my detective work — for the past couple of days. </li> <li> <font color="darkgreen">FullAgain42X.dae on 24 April 2020</font>: <br />RESULT: <font color="red">WORKS!</font> In the sense that the Oculus animation matches that of the Mac Preview app <pre> <float_array id="First_rotation_euler_Y-output-array" count=" 2">^M 30.0^M 210.0^M </float_array>^M </pre> <pre> <channel source="#First_rotation_euler_Y-sampler" target="EntireEllipsoid/rotationX.ANGLE"/>^M </pre> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 30.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 90.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain43X.dae on 25 April 2020</font>: Identical to "FullAgain42X.dae" except the order of "rotationZ" and "rotationY" has been reversed. <br />RESULT: <font color="red">WORKS!</font> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationX">1.0 0.0 0.0 30.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 90.0</rotate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> <li> <font color="darkgreen">FullAgain44X.dae on 25 April 2020</font>: Identical to "FullAgain42X.dae" except the "rotationX" instruction has been placed last (at the bottom of) the instruction trio. <br />RESULT: <font color="red">WORKS!</font> <pre> <node id="EntireEllipsoid" name="OculusRift_EFE"> <translate>0.0 8.0 0.0</translate>^M <rotate sid="rotationZ">0.0 0.0 1.0 45.0</rotate>^M <rotate sid="rotationY">0.0 1.0 0.0 90.0</rotate>^M <rotate sid="rotationX">1.0 0.0 0.0 30.0</rotate>^M <scale sid="scale">4.0 4.0 4.0</scale>^M ... </pre> </li> </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