<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:158739252;
        mso-list-type:hybrid;
        mso-list-template-ids:1014429538 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:21;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:28.2pt;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:64.2pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:100.2pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:136.2pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:172.2pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:208.2pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:244.2pt;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:280.2pt;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:316.2pt;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1243879428;
        mso-list-type:hybrid;
        mso-list-template-ids:184482858 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l2
        {mso-list-id:1872495637;
        mso-list-type:hybrid;
        mso-list-template-ids:-1616879542 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
        {mso-level-start-at:3;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:"Times New Roman";}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>In line. </p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:michalis.kambi@gmail.com">Michalis Kamburelis</a><br><b>Sent: </b>Wednesday, June 21, 2023 2:32 PM<br><b>To: </b><a href="mailto:joedwil@earthlink.net">Joseph D Williams</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] view3dscene controls and displays</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi,</p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l2 level1 lfo3'>Thanks for the good words! </li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You are Welcome.</p><p class=MsoNormal>Displacer<span style='font-family:"Segoe UI Emoji",sans-serif'>😊</span>?   </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>1. As for camera direction displayed in view3dscene:</li><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>    It is a direction vector, that is: a 3D vector along which the</li></ul><p class=MsoNormal>camera looks. E.g. (1,0,0) means camera looks in the direction of +X,</p><p class=MsoNormal>i.e. positive X axis. It is always normalized (length = 1).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sure, I get that much. Common stuffs for early usage except vrml, x3d. </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>  It is indeed a different representation than X3D orientation</li></ul><p class=MsoNormal>(though can be converted both ways between direction/up and</p><p class=MsoNormal>orientation, CGE does it).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This is for x3d in view3dscene. Is the conversion shown somewhere? </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>    I chose to show it this way, because it is more widely understood</li></ul><p class=MsoNormal>by people outside of X3D. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But I am interested in x3d. Angle and Up may be more understood somewheres but it just doesn’t carry over into other animation needs, so it is  different with no benefit to x3d. The only difference between animating a Joint rotation and a viewpoint orientation is the default z direction. For default Transform you are is sitting on or in the Joint and looking +z. Default Viewpoint orientation and default Transform rotation are facing each other. </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>It is consistent with CGE internal</li></ul><p class=MsoNormal>TCastleCamera (actually TCastleTransform) vector "Direction". It is</p><p class=MsoNormal>also consistent with how I found 3D programmers in general need it,</p><p class=MsoNormal>e.g. in Unity you'd write "Camera.main.transform.forward". Allows you</p><p class=MsoNormal>to write in CGE code like "Camera.Translation := Camera.Translation +</p><p class=MsoNormal>Speed * Camera.Direction"  to move forward.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sure, I’ve seen that sort of shortcut. Up is used how? How do you write that in x3d? x3d can also use Script. What x3d code do you get when you use that CGE shortcut? </p><p class=MsoNormal>Using that camera direction and up has some downsides, right? Simple movements only. Certainly Not how you want to handle other types of animation involving rotations.</p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>   In contrast, X3D orientation is an axis+angle rotation relative to</li></ul><p class=MsoNormal>the default direction, −Z. To understand such orientation, the human</p><p class=MsoNormal>has to remember that default is -Z. And to express simple directions</p><p class=MsoNormal>(like "look in +X") one needs to do rotations by pi/2, which don't</p><p class=MsoNormal>look so obvious when displayed as floats on status bar. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You display rounded floats for what you show. Yeah, pi/2 = 90 deg. not so obvious(?) but eventually it helps to learn radians. </p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sure, OK. When you use a Viewpoint for an eye in default Humanoid, you yaw pi to gaze +z.</p><p class=MsoNormal>Rotation is different than orientation. The default Transform or Joint faces +z. Whatever, it would be nice to get a useable number from the front panel. What I would be looking for is something understood and usable by users of x3d. </p><p class=MsoNormal>The CGE internal Castle Camera process of angles and up is of no interest, sorry. X3d orientation is the standard for representing viewer pointing and x3d rotation is standard for controlling transforms. Whatever else is from the pre-ages before axis-angle and quaternions. Angle and up is not used anywhere else, gltf, collada,, etc.,  included so for the wider range of users, angle and up are archaic and I don’t think ever will ever be encountered in the GL.    <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l1 level1 lfo2'>Ultimately, it is a matter of taste "what looks more obvious". I</li></ul><p class=MsoNormal>found the 3D direction vector more readable to humans than the X3D</p><p class=MsoNormal>orientation.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Well, for x3d, “taste” and  best practice is in  the x3d standard. Maybe angle and up are more readable for some  but misleadingly easy. If you think it is easier, show me code for some viewpoint animations. I’ve got one I will send.   </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>Note that you can always use "Clipboard -> Print Current Camera</li></ul><p class=MsoNormal>(Viewpoint) ..." to see the X3D orientation corresponding to the</p><p class=MsoNormal>current direction. I know it's not the same --- it's not visible in</p><p class=MsoNormal>the status all the time. But it is available.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Fine, not as good as front panel. If you are stuck on that form, then at least give a visible option or it is really not an x3d authoring aid. Of course the authoring idea is that you move a viewpoint to where you want it and read the value, then put it in the user code.  </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>2. "File -> Reopen" -- It does open the file again, reloading it from</li></ul><p class=MsoNormal>disk (or any URL, in general).</p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>   I routinely use it while editing -- I do some edits in text editor,</li></ul><p class=MsoNormal>Alt+Tab to view3dscene, use "File -> Reload", and it loads the new</p><p class=MsoNormal>(edited) version of the file. It *does not* just reinitialize the</p><p class=MsoNormal>model from the memory.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>No Luck on this end. Please try clicking File, Reopen (4.0.3) on the menu yourself (i don’t see Reload anywhere). Your Alt-Tab suggestion doesn’t get it either, no change after editing the target file. Never reloads. Here  Alt Tab is captured by Windows and gives me the collection of available windows. OPEN and clicking a same file works as a Reload, or File and Open also can get current file. </p><p class=MsoNormal>File, Reopen is dead here, and Alt Tab isn’t caught by view3dscene. . </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'> If you experience something else, please describe in more details</li></ul><p class=MsoNormal>how it happens. (And let me know which exactly version you use, e.g.</p><p class=MsoNormal>snapshot or stable from https://castle-engine.io/view3dscene.php ).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Please see above. Latest on view3dscene site: 4.3.0 . </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>3. "Phong Shading on Everything" is actually more correct. E.g. it</li></ul><p class=MsoNormal>multiplies the diffuse color by diffuse texture only.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Still, it looks lots different than on every other player. Unchecking Phong everything make it look almost like it looks in others. I can send some examples. </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>  If you believe otherwise, please post a testcase. But in general,</li></ul><p class=MsoNormal>while "Phong Shading on Everything" on / off indeed makes a</p><p class=MsoNormal>difference, the value "on" is exactly what X3D specification says (and</p><p class=MsoNormal>it is more flexible). The value "off" is a result of necessary</p><p class=MsoNormal>limitations of Gouraud shading. For physical-based rendering (PBR) in</p><p class=MsoNormal>PhysicalMaterial, the Phong shading is actually the only sensible</p><p class=MsoNormal>(Gouraud shading + PBR is theoretically possible but nobody uses</p><p class=MsoNormal>that).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>OK. Will show some examples. How is your implementation more flexible?</p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>Note that you can use "Shape.shading" (CGE extension) to</li></ul><p class=MsoNormal>specifically request given shading on given shape, to force Gouraud</p><p class=MsoNormal>shading you would use shading="GOURAUD".</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>CGE extension? Is it proposed for the x3d standard? </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>Regards,</li><li class=MsoListParagraph style='margin-left:-7.8pt;mso-list:l0 level1 lfo1'>Michalis</li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks Again,</p><p class=MsoNormal>Joe</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>śr., 21 cze 2023 o 21:33 Joseph D Williams <joedwil@earthlink.net> napisał(a):</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Hey, Thanks, view3dscene is working better all the time but some simple convenience factors for x3d are well, missing.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> For example, in the View, Status and Toolbar, the Camera pos and dir are given.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> The pos (position) is given in correct units but the dir is given as x y z (Euler?) angles.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Please at least give an option to read dir the as ori (orientation) since x3d does not deal in those x y z units. So at least an option to present axis-angle or even unit quaternions is needed. This would make the “Camera” display useful for x3d authoring and so I really would like to read that camera position (in current coordinate space) and orientation in axis-angle directly. And, under Navigation this view feature is given as Viewpoint.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> In File Reopen, it appears to do just that, reopen (or rerun) the same file it has last loaded, not go out and  get a new version of the file and reload that. Sorry, I misinterpreted a couple of times before I figured it out and just used Open again to reload and run the file. I can’t think of a time that there was some kind of problem where I  just wanted to rerun what is in memory, especially since you have given good animation timing controls. Most times just want to fix the input and reload the thing.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> In View, Phong Shading on Everything as default makes stuff look a lot different than routine.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Maybe there are some settings I am missing but for most stuffs Phong off seems to work more as expected and I really would like to read that camera orientation.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Thanks and Best Regards,</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> Joe</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>> _______________________________________________</p><p class=MsoNormal>> x3d-public mailing list</p><p class=MsoNormal>> x3d-public@web3d.org</p><p class=MsoNormal>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>