[x3d-public] 3D graphics, vertex attributes Tangent index and vector

Michalis Kamburelis michalis.kambi at gmail.com
Fri May 30 04:55:44 PDT 2025


Thanks John, fixed view3dscene -> Castle Model Viewer (on this and all
other pages in the wiki, using GitHub ability to checkout wiki as repo).

No worries, I have my journey with grep, silver searcher, ripgrep, and VS
Code "Find In Files" :) If you use command-line, I recommend testing
ripgrep ( https://github.com/BurntSushi/ripgrep ) it's really much faster
on big repos.

Regards,
Michalis

czw., 29 maj 2025 o 23:02 John Carlson via x3d-public <x3d-public at web3d.org>
napisał(a):

> Michalis,
>
> There’s a “view3dscene” on this page:
>
> https://github.com/michaliskambi/x3d-tests/wiki/Image-Based-Lighting-%28EnvironmentLight-node%29
>
> Probably you want to update it.
>
> If you want to look through all your documentation for view3dscene, try
> grep -r
> or in your doc folder:
>
> find doc -type f | xargs grep view3dscene
>
> grep -l will give you filenames.
>
> :thumbsup:
>
> Hopefully, I’m not viewing a cache.
>
> John
>
> On Thu, May 29, 2025 at 3:29 PM Michalis Kamburelis via x3d-public <
> x3d-public at web3d.org> wrote:
>
>> 1. I believe we talked about glTF lighting equations a few times already
>> when talking about glTF :) Here's a bunch of information, most of it
>> hopefully still up-to-date:
>>
>> - "What about lights?" at
>> https://github.com/michaliskambi/x3d-tests/wiki/How-to-add-PBR-to-X3D%3F#what-about-lights
>> - "Punctual lights" at
>> https://github.com/michaliskambi/x3d-tests/wiki/Converting-glTF-to-X3D#punctual-lights
>> - "Image Based Lighting (EnvironmentLight node)"
>> https://github.com/michaliskambi/x3d-tests/wiki/Image-Based-Lighting-%28EnvironmentLight-node%29
>>
>> In short: The glTF spec itself doesn't have lights, but
>> - KHR_lights_punctual defines "punctual" lights and
>> - EXT_lights_image_based / KHR_environment_map define "environment"
>> light.
>> X3D is already aligned with the former, and our planned EnvironmentLight
>> will align us with the latter as well.
>>
>> As for sentence "perhaps they are using WebGL specifications" -- note:
>> there's nothing about lights in WebGL specs, the rendering API is not where
>> you define lighting equations. WebGL, as well as all modern rendering APIs,
>> just says "shaders define how things look".
>>
>> 2. The Tangent node doesn't need any change to light equations or prose,
>> IMHO, so there's nothing necessary to do.
>>
>> Our X3D spec already says that normalTexture is in the tangent space. It
>> is said at normalTexture fields in *Material nodes, it is also reiterated
>> in the "Lighting" chapter,
>> https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/lighting.html
>> :
>>
>>     """N = normalized normal vector at this point on geometry. [...] It
>> is modified by the normalTexture providing normals in the tangent space
>> (see X3DOneSidedMaterialNode definition)."""
>>
>> That's really all we need to say, IMHO :) "Tangent space" should be clear
>> to people who know how does the bump mapping work, it's not specific to X3D
>> or glTF.
>>
>> Regards,
>> Michalis
>>
>> czw., 29 maj 2025 o 20:06 Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
>> napisał(a):
>>
>>> Very good and thanks for explaining how backwards compatibility is not
>>> really a problem.
>>>
>>> If we can express correct behavior succinctly in the specification
>>> prose, without adding potential confusion of another new field, that is
>>> certainly fine by me.  Being explicit about backwards compatibility, when
>>> needed, is important to include.
>>>
>>> Next worry:  lighting equations.  Not finding any in glTF 2.0
>>> specification itself.  Can we use the KHR extensions to give us proper
>>> context when updating our lighting equations?  Surprisingly am not finding
>>> any in the following, perhaps they are using WebGL specifications?
>>>
>>>
>>>    - KHR_lights_punctual extensions
>>>    -
>>>    https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md
>>>
>>>
>>> p.s.  hypothesis: am suspecting that glTF 2.0 avoidance of precision
>>> lighting definitions has been the root cause of why glTF implementations
>>> have long had much difficulty getting various implementations to achieve
>>> consistent rendering results.
>>>
>>>
>>> all the best, Don
>>>
>>> --
>>>
>>> Don Brutzman  Naval Postgraduate School, Code USW/Br
>>> brutzman at nps.edu
>>>
>>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>>> +1.831.656.2149
>>>
>>> X3D graphics, virtual worlds, navy robotics
>>> https://faculty.nps.edu/brutzman
>>>
>>>
>>>
>>> ------------------------------
>>> *From:* Michalis Kamburelis <michalis.kambi at gmail.com>
>>> *Sent:* Thursday, May 29, 2025 10:10 AM
>>> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
>>> *Cc:* Holger Seelig <holger.seelig at yahoo.de>; X3D <x3d-public at web3d.org>
>>> *Subject:* Re: [x3d-public] 3D graphics, vertex attributes Tangent
>>> index and vector
>>>
>>> Happy to see Tangent node being considered for X3D. If it will match
>>> exactly the glTF spec and behavior (and thus X_ITE behavior, from what I
>>> see), it will be good :)
>>>
>>> Just one comment to what Don wrote: ""so X3D would need a boolean field
>>> such as "SFBool [in out] computeTangents FALSE" in order to maintain
>>> backward compatibility, since we have never computed such tangents before.""
>>>
>>> - No, please don't add "computeTangents" :)
>>>
>>> - The implementation (of X3D, or any other 3D application doing bump
>>> mapping) knows when it needs tangents. Namely: when doing bump mapping,
>>> i.e. using XxxMaterial.normalTexture. And it *has* to compute them in such
>>> cases (unless of course we provide them explicitly in the Tangent node).
>>>
>>> - So there is *no* moment when field like computeTangents would make
>>> sense to be considered, by any implementation. In all cases, implementation
>>> already knows whether it has to compute tangents or not, if it would not
>>> compute them -> normal mapping would make no sense.
>>>
>>> - The sentence "since we have never computed such tangents before" is
>>> not true.  All existing X3D implementations (that
>>> handle XxxMaterial.normalTexture) already compute tangents, I guarantee,
>>> you just didn't know about it :)
>>>
>>> - The reason is that normal maps are specified in tangent space. (as we
>>> explicitly say in X3D spec about  normalTexture, "The normals are provided
>>> in tangent space").
>>>
>>> Regards,
>>> Michalis
>>>
>>> czw., 29 maj 2025 o 01:49 Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
>>> napisał(a):
>>>
>>> Thanks for excellent explanations and example.  Thanks also for
>>> correcting my mistaken impressions of what was being considered, this is
>>> far different than geometric similarities between normal vectors and
>>> tangent planes/vectors.
>>>
>>> Dick and I were able to review this during today's meeting.
>>>
>>> Holger, for your CompareTangent.x3d example, is it possible to achieve a
>>> similar (or identical) effect by solely using Normal vectors?  Just
>>> curious, since both are supported in glTF we do want to maintain visual
>>> compatibility.
>>>
>>> Aligning with glTF 2.0 has always been part of our approved consensus
>>> efforts for improving the X3D 4 Architecture specification.
>>>
>>>    - X3D Version 4.0 Standard Overview
>>>    - http://www.web3d.org/x3d4
>>>    X3D Version 4.0 Standard Overview | Web3D Consortium
>>>    <http://www.web3d.org/x3d4>
>>>    The X3D ® version 4 (X3D4) Architecture Specification is a major
>>>    upgrade to the Extensible 3D (X3D) Graphics International Standard that
>>>    provides close support for the HTML5 Recommendation, Khronos glTF
>>>    Physically Based Rendering (PBR), Web Audio API, and MIDI 2.0, along with
>>>    numerous other features. Humanoid Animation 2.0 (HAnim2) is also fully
>>>    supported, including BVH-style motion animation.
>>>    www.web3d.org
>>>    **
>>>
>>>
>>> So the next line of inquiry would appear to be how to best accomplish
>>> the satisfactory addition of Tangents to X3D Architecture.
>>>
>>> For such an significant addition, typically we need
>>>
>>>    1. Rationale (align with glTF, perhaps multiple other good reasons
>>>    given)
>>>    2. Draft specification prose, references
>>>    3. Examples, multiple implementations
>>>
>>>
>>> Presumably the addition of a Tangent node would go into
>>>
>>>    - X3D Architecture version 4.1 (draft), clause 11, Rendering
>>>    component
>>>    -
>>>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/rendering.html
>>>
>>>    - Tangent node would be inserted as section 11.4.12, between
>>>    PointSet and TriangleFanSet
>>>    - Node signature definition, i.e. field names, types, accessTypes,
>>>    default values
>>>    - Presumably prose would be needed for a new section under concepts,
>>>    e.g. 11.2.2.6 Tangents.  That description would also need to distinguish
>>>    how they are different from Normals.
>>>    - There is an abstract type for X3DNormalNode under
>>>    X3DGeometricPropertyNode, do we need something similar?
>>>    - What level is proposed for Table 11.2 — Rendering component
>>>    support levels ?
>>>
>>>    - What nodes are expected to have tangent field added?  Presumably
>>>    some, but not all, of the geometry nodes?
>>>    - Update to Concepts, 4.4.2.3 Interface Hierarchy
>>>    -
>>>       https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/concepts.html#InterfaceHierarchy
>>>       - What changes are needed to lighting equations in clause 17
>>>    Lighting component
>>>    -
>>>       https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/lighting.html
>>>       - For example, the lighting equations in 17.2.2.3 Common
>>>       definitions for all lighting models
>>>       -
>>>       https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/lighting.html#LightingCommon
>>>
>>>       - Is it possible when Normal-node 3-tuple vectors and
>>>    Tangent-node 4-tuple planes are used together (as in the CompareTangent.x3d
>>>    example) is it possible for contrary or contradictory field information to
>>>    provided? (It looks like glTF says that Tangent values are ignored if
>>>    Normal values aren't also supplied at the same time).
>>>    - What potential error conditions need to be noted?
>>>    - Are there any potential unexpected "side effects" or issues to
>>>    resolve when working through this careful due-diligence integration in the
>>>    X3D Architecture
>>>
>>>
>>> We looked closely at glTF specification prose, and have some questions.
>>>
>>>    -
>>>    https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview
>>>    - glTF requires "When tangents are not specified, client
>>>    implementations *SHOULD* calculate tangents using default MikkTSpace
>>>    <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#mikktspace> algorithms
>>>    with the specified vertex positions, normals, and texture coordinates
>>>    associated with the normal texture." ... and so X3D would need a boolean
>>>    field such as "SFBool [in out] computeTangents FALSE" in order to maintain
>>>    backward compatibility, since we have never computed such tangents before.
>>>    - Are there _any_ light definitions whatsoever in glTF 2.0
>>>    specification proper?  It looks like all three basic lights are in the
>>>    KHR_punctual extension (and still no baseline lighting equations seen).
>>>    -
>>>       https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md
>>>
>>>
>>> Thanks for considering the possibilities.
>>>
>>>
>>> all the best, Don
>>>
>>> --
>>>
>>> Don Brutzman  Naval Postgraduate School, Code USW/Br
>>> brutzman at nps.edu
>>>
>>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>>> +1.831.656.2149
>>>
>>> X3D graphics, virtual worlds, navy robotics
>>> https://faculty.nps.edu/brutzman
>>>
>>>
>>>
>>> ------------------------------
>>> *From:* Holger Seelig <holger.seelig at yahoo.de>
>>> *Sent:* Saturday, May 24, 2025 7:30 AM
>>> *To:* X3D <x3d-public at web3d.org>
>>> *Cc:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; Michalis
>>> Kamburelis <michalis.kambi at gmail.com>
>>> *Subject:* Re: [x3d-public] 3D graphics, vertex attributes Tangent
>>> index and vector
>>>
>>> I have created a simple example file from a previous glTF to show what a
>>> difference the correct tangents make.
>>>
>>> Both spheres have the same material with only a normal texture.
>>>
>>> On the left side you can see a sphere with correct tangents and on the
>>> right side the same sphere with negated tangents.
>>>
>>> You can see in the wrong version that the curvatures of the wicker go
>>> inwards. Which is definitely not intentional.
>>>
>>>
>>> https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/Library/Tests/Components/Rendering/CompareTangent.x3d
>>>
>>> Best regards,
>>> Holger
>>>
>>> --
>>> Holger Seelig
>>> Leipzig, Germany
>>>
>>> holger.seelig at yahoo.de
>>> https://create3000.github.io/x_ite/
>>> https://patreon.com/X_ITE
>>>
>>>
>>>
>>> Am 24.05.2025 um 04:41 schrieb Michalis Kamburelis via x3d-public <
>>> x3d-public at web3d.org>:
>>>
>>> Don,
>>>
>>> Answering the """If there is a benefit for X3D scene graph having
>>> tangent vectors, in particular for achieving some new flavor of
>>> rendering or geometry representation that we can't already do, then
>>> apologies but haven't heard it yet.""" :
>>>
>>> I mentioned this benefit (of knowing tangent vector values) in point 3
>>> of my message. Now also on
>>> https://github.com/michaliskambi/x3d-tests/wiki/Tangent-node-in-X3D ,
>>> see there:
>>>
>>> """
>>> Ultimately, the "perfect tangent value" is the one that was used to
>>> bake the normalmaps. If the authoring tool (like Blender) that you
>>> used to make normalmaps used a bit different algorithm to calculate
>>> tangents than your renderer -> then the rendering of normalmaps will
>>> be slightly "off".
>>>
>>> There's a nice screenshot in
>>>
>>> https://gamedev.stackexchange.com/questions/146855/how-do-you-compute-the-tangent-space-vectors-with-normals-given-in-the-mesh
>>> , scroll to "There are multiple ways to generate tangent spaces for a
>>> mesh, and not all of them agree on the result.". The screenshot there
>>> shows subtle problems that result from having authoring tool and
>>> renderer calculate a bit different tangent vectors.
>>> """
>>>
>>> There is a really a good reason why glTF has them and why X_ITE and
>>> Castle Game Engine have defined extensions to have them too :)
>>> Simplifying the above explanation: one needs to have Tangent
>>> information (provided in Tangent node, not auto-calculated), to use
>>> the normalmap exactly like the 3D authoring tool that generated it
>>> intended. I *did* mention it in the past from I recall, I did show the
>>> screenshot from
>>>
>>> https://gamedev.stackexchange.com/questions/146855/how-do-you-compute-the-tangent-space-vectors-with-normals-given-in-the-mesh
>>> already in 2 past threads on x3d-pubilc (in 2019 and 2022, looking at
>>> gmail history :) ).
>>>
>>> Again, maybe I can explain it best on next Friday call, if you want.
>>>
>>> Regards,
>>> Michalis
>>>
>>>
>>> sob., 24 maj 2025 o 04:00 Brutzman, Donald (Don) (CIV)
>>> <brutzman at nps.edu> napisał(a):
>>>
>>>
>>> Thanks for extra references, interesting.
>>>
>>> To be clearer, I was referring to "capital-T" Tangent planes.  We do
>>> have one of those in ClippingPlane node, plane field.
>>>
>>> https://www.web3d.org/x3d/content/X3dTooltips.html#ClipPlane.plane
>>>
>>>
>>> Yes, the slideset does seem to show that there is a lot of math to
>>> convert a normal vector space to a tangent vector space, and vice versa.
>>> No, a single normal vector is not fully convertible bidirectionally to a
>>> single tangent vector, since a single tangent vector is only one of
>>> infinite possible tangent vectors originating at the same origin point of a
>>> Tangent plane.
>>>
>>> If there is a benefit for X3D scene graph having tangent vectors, in
>>> particular for achieving some new flavor of rendering or geometry
>>> representation that we can't already do, then apologies but haven't heard
>>> it yet.
>>>
>>> We can easily imagine a wide class of difficult-to-debug errors emerging
>>> in X3D content for authors, players, and converters alike if support for
>>> both normal vectors and tangent vectors becomes necessary.
>>>
>>> p.s. looks like we also have mapped WebGL/glTF techniques using
>>> normalTexture node, e.g.
>>>
>>> X3D 4.1 draft Architecture,12.4.5 Material
>>>
>>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/components/shape.html#Material
>>>
>>> SFFloat  [in,out] normalScale          1    [0, ∞)
>>> SFNode   [in,out] normalTexture        NULL [X3DSingleTextureNode]
>>> SFString [in,out] normalTextureMapping ""
>>>
>>> I hope that this deeper-dive into details is viewed as helpful and
>>> constructive.
>>>
>>> There are many additional things we can be doing with X3D, and still a
>>> lot of re-alignments to finish in the large family of X3D standards that
>>> need updating for X3D 4.0 Architecture.  I am confident that together we
>>> will all stay focused primarily on the important things - and occasionally
>>> on the cool things too!  Onward we go together, with steady forward
>>> momentum overall.
>>>
>>>
>>> all the best, Don
>>>
>>> --
>>>
>>> Don Brutzman  Naval Postgraduate School, Code USW/Br
>>> brutzman at nps.edu
>>>
>>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>>>    +1.831.656.2149
>>>
>>> X3D graphics, virtual worlds, navy robotics
>>> https://faculty.nps.edu/brutzman
>>>
>>>
>>>
>>> ________________________________
>>> From: Michalis Kamburelis <michalis.kambi at gmail.com>
>>> Sent: Friday, May 23, 2025 3:16 PM
>>> To: John Carlson <yottzumm at gmail.com>
>>> Cc: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org>;
>>> Joe D Williams <joedwil at earthlink.net>; Brutzman, Donald (Don) (CIV) <
>>> brutzman at nps.edu>
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes Tangent index
>>> and vector
>>>
>>>
>>>
>>> John: I know, in math, in 3D, you generally speak about "tangent
>>> planes" (
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTangent&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200150881%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=xI7y0QYdIcPFZmWTtWOAardp6qBhkbiocWzLIaXZjyA%3D&reserved=0
>>> <https://en.wikipedia.org/wiki/Tangent> ).
>>>
>>> The name "tangent vector" is just a shorthand for "vector lying on a
>>> tangent plane". This is a standard for calling this value in the
>>> context of bump mapping / normal maps.
>>>
>>> See e.g. glTF spec with useful definition (
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fregistry.khronos.org%2FglTF%2Fspecs%2F2.0%2FglTF-2.0.html%23introduction-technical-terminology&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200184217%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=U1GB3CyxbVkqCeZ50pNY5IQZV%2F6UVeB3fuuHSLtaTtM%3D&reserved=0
>>> <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#introduction-technical-terminology>
>>> "2.2.3. Technical Terminology" ):
>>>
>>> """
>>> tangent
>>>    A unit XYZ vector defining a tangential direction on the surface.
>>> """
>>>
>>> There is also "tangent coordinate space". If you want to get dirty and
>>> read about details, search for "tangent normal mapping":
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearnopengl.com%2FAdvanced-Lighting%2FNormal-Mapping&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200208362%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=htRXtm4jbhI6G0U0pN09lsBB5IEHQ3EKIocm948xxp8%3D&reserved=0
>>> <https://learnopengl.com/Advanced-Lighting/Normal-Mapping> ,
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.cs.utexas.edu%2F~fussell%2Fcourses%2Fcs384g-spring2016%2Flectures%2Fnormal_mapping_tangent.pdf&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200227319%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=65d5bG5b5n5jGKSrKA93pYgnKlV2x2Weg7fsDqMEpX0%3D&reserved=0
>>> <https://www.cs.utexas.edu/~fussell/courses/cs384g-spring2016/lectures/normal_mapping_tangent.pdf>
>>> .
>>>
>>> Regards,
>>> Michalis
>>>
>>> sob., 24 maj 2025 o 00:05 John Carlson <yottzumm at gmail.com> napisał(a):
>>>
>>>
>>> Tangent planes seem more likely than tangent vectors, at least in 3D.
>>>
>>> Just a naming convention.
>>>
>>> John
>>> On Fri, May 23, 2025 at 4:09 PM Michalis Kamburelis <
>>> michalis.kambi at gmail.com> wrote:
>>>
>>>
>>> Don: I don't think that this decision (to never support Tangent node
>>> in X3D), is correct. I would actually say we should add Tangent to
>>> X3D.
>>>
>>> Let me present a clear argument "why". I copied some of the reasoning
>>> from mail below to
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2Fwiki%2FTangent-node-in-X3D&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200245004%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=iA1%2Bgoq%2B1GtvXZXMLzdiCDOHOdyQlD4%2FU5vkrA%2FpWs0%3D&reserved=0
>>> <https://github.com/michaliskambi/x3d-tests/wiki/Tangent-node-in-X3D> ,
>>> to have a future reference.
>>>
>>> 1. Current state: As of now, both X_ITE and Castle Game Engine have
>>> extensions to define Tangent node.
>>>
>>>    So we have invented the "Tangent" node independently in 2
>>> implementations and, predictably, they are unfortunately
>>> similar-but-not-exactly the same. Links from this thread, where you
>>> can notice a difference:
>>>
>>>     -
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Fcomponents%2Frendering%2Ftangent%2F&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200266292%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=uC0HoQQvQ%2FqGeaKvwUMRLczWiuPy3k5uhNpzdTVkS4g%3D&reserved=0
>>> <https://create3000.github.io/x_ite/components/rendering/tangent/> ,
>>>     -
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fx3d_implementation_rendering_extensions.php%23section_ext_tangent&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200287350%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=%2FiuYgr866%2FE0qt88XbIqwT6TQf%2FpGnCdQ97ziF5myn0%3D&reserved=0
>>> <https://castle-engine.io/x3d_implementation_rendering_extensions.php#section_ext_tangent>
>>>
>>>    Also glTF format has them. See
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fregistry.khronos.org%2FglTF%2Fspecs%2F2.0%2FglTF-2.0.html%23meshes-overview&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200304976%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=DWIIKDtB4VQQ6g3wx9MhIJtafyag%2FzCo4hqXwBokl%2BY%3D&reserved=0
>>> <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview>
>>> , information about "TANGENT".
>>>
>>>    ( Holger, if you read this: I think I will change Castle Game
>>> Engine's Tangent node in the future, to match better both X_ITE and
>>> glTF, thus we will have matching definitions with X_ITE. Your approach
>>> is better, Tangent.vector should be 4D. )
>>>
>>> 2. Tangents *do not* just repeat the same information as normal
>>> vectors, DRY principle doesn't apply here. I.e. the tangent vectors
>>> are *not* a replacement for knowing normal vectors (nor is the other
>>> way around).
>>>
>>>     And just because the model provides normal vectors -- doesn't
>>> mean that tangent vectors are already precisely 100% determined.
>>>
>>>     There are multiple similar algorithms to determine tangent
>>> vectors. The normal vector alone doesn't yet define the tangent ->
>>> because in a 3D space, if you have a normal vector -> you still have
>>> infinite possible values for a vector "orthogonal to normal". So
>>> tangent vectors are auto-calculated (when not explicitly provided) to
>>> match the normal vectors, but *also* to match the texture coordinates
>>> used for normal maps. There are edge-cases when it is just not obvious
>>> what should be the "perfect tangent" so various implementations
>>> (MikkTSpace is just one example) can do different things.
>>>
>>> 3. Ultimately, the "perfect tangent value" is the one that was used to
>>> bake the normalmaps. If the authoring tool (like Blender) that you
>>> used to make normalmaps used a bit different algorithm to calculate
>>> tangents than your renderer -> then the rendering of normalmaps will
>>> be slightly "off".
>>>
>>>    There's a nice screenshot in
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgamedev.stackexchange.com%2Fquestions%2F146855%2Fhow-do-you-compute-the-tangent-space-vectors-with-normals-given-in-the-mesh&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200321272%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=QTZ5yNrn7f9QO6013RvTKJM83RpbLp1g3o%2BTV%2Bow34Y%3D&reserved=0
>>> <https://gamedev.stackexchange.com/questions/146855/how-do-you-compute-the-tangent-space-vectors-with-normals-given-in-the-mesh>
>>> , scroll to "There are multiple ways to generate tangent spaces for a
>>> mesh, and not all of them agree on the result.". The screenshot there
>>> shows subtle problems that result from having authoring tool and
>>> renderer calculate a *bit* different tangent vectors.
>>>
>>>    So the perfect thing to do, from a renderer, is to *not* calculate
>>> the tangent vectors, instead take the tangent vectors as provided by
>>> the authoring tool. That exactly why glTF has tangents, and why X_ITE
>>> and Castle Game Engine support them too -- we don't just discard
>>> tangent values from glTF (only to auto-calculate them), we prefer to
>>> take tangent values recorded in the 3D model, because this makes
>>> really good rendering.
>>>
>>> See
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2Fwiki%2FTangent-node-in-X3D&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200342653%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=I2JoFkHp6yUXifxdOtDNZn%2B%2FEw%2F6B6CUggprigS0Ymg%3D&reserved=0
>>> <https://github.com/michaliskambi/x3d-tests/wiki/Tangent-node-in-X3D>
>>> , which I just created -- it mostly copies what I said above.
>>>
>>> I hope this helps. I'll be happy to explain it better on next Web3d
>>> Friday teleconference, if you're not tired of my talking :) I can show
>>> how the normalmaps are actually created.
>>>
>>> Regards,
>>> Michalis
>>>
>>>
>>> pt., 23 maj 2025 o 21:03 Brutzman, Donald (Don) (CIV) via x3d-public
>>> <x3d-public at web3d.org> napisał(a):
>>>
>>>
>>> The X3D group has looked closely at Tangent options in the past and
>>> decided not to support it.  Instead we use Normal nodes, as ever.
>>>
>>> Of geometric note is that they are literally orthogonal and thus either
>>> representation can be used to the other.
>>>
>>> You will not find Tangent node in the X3D specification.
>>>
>>> X3D 4.1 draft Architecture, Annex Z (informative) Version content
>>>
>>> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD//Part01/versionContent.html
>>>
>>>
>>> Note that the X_ITE documentation specifically notes that support in
>>> that application is nonstandard.
>>>
>>>
>>> SFNode [in, out] tangent NULL [Tangent] non-standard]
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Fcomponents%2Fgeometry3d%2Findexedfaceset%2F%23fields-tangent&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200365822%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=IsR1bELZd2JIdywMabYl4fETQB7Nj18xYLNYDuYiD%2BE%3D&reserved=0
>>> <https://create3000.github.io/x_ite/components/geometry3d/indexedfaceset/#fields-tangent>
>>>
>>>
>>> There is no issue with codebases adding functionality that might help
>>> their capabilities - the X in X3D is extensible, after all - but anyone
>>> putting a Tangent definition into an X3D model file is creating
>>> nonstandard, invalid, noninteroperable content.
>>>
>>> Also please be aware that there is a serious design principle behind
>>> this decision: DRY.  Thus, a statement I don't expect to repeat: we do not
>>> intend to consider Tangent support in future X3D specifications.
>>>
>>> Wikipedia: Don't repeat yourself
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDon%27t_repeat_yourself&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200388617%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=ArQcjgKedJw1nBDJMHn9IXWR8eCaaeK4byCx1Q1deMU%3D&reserved=0
>>> <https://en.wikipedia.org/wiki/Don't_repeat_yourself>
>>>
>>>
>>> And some "dry humor" on that page:
>>>
>>> The opposing view to DRY is called WET, a backronym commonly taken to
>>> stand for write everything twice (alternatively write every time, we enjoy
>>> typing or waste everyone's time).
>>>
>>>
>>> Recommendations:
>>>
>>> if your model data is starting with tangent values (for whatever reason)
>>> then convert them to normal vectors, and
>>> stick with standard X3D for best results.
>>>
>>>
>>> Have fun with normal X3D!  🙂
>>>
>>>
>>> all the best, Don
>>>
>>> --
>>>
>>> Don Brutzman  Naval Postgraduate School, Code USW/Br
>>> brutzman at nps.edu
>>>
>>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>>>    +1.831.656.2149
>>>
>>> X3D graphics, virtual worlds, navy robotics
>>> https://faculty.nps.edu/brutzman
>>>
>>>
>>>
>>>
>>> ________________________________
>>> From: x3d-public <x3d-public-bounces at web3d.org> on behalf of Joe D
>>> Williams via x3d-public <x3d-public at web3d.org>
>>> Sent: Sunday, May 18, 2025 5:03 PM
>>> To: John Carlson <yottzumm at gmail.com>
>>> Cc: Joe D Williams <joedwil at earthlink.net>; Extensible 3D (X3D)
>>> Graphics public discussion <x3d-public at web3d.org>
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes Tangent index
>>> and vector
>>>
>>> ok, seems like from what I can study so far,
>>>
>>> the first use of Tangent vector is authortime production of
>>>
>>> normalized Normal vector for vertex or face.
>>>
>>> The  author is looking for relief effects (bumpmapping)
>>>
>>> that are produced by Tangent vector.
>>>
>>> This process (MikkTSpace algorithm) would fill Normal vector.
>>>
>>> This process of generating Normal vector space is called baking.
>>>
>>>
>>>
>>> For Level5 runtime,
>>>
>>> If Normal vector not null then used directly.
>>>
>>> If Normal vector null, then normals auto generated by creaseAngle
>>>
>>> If Tangent vector null, then nothing.
>>>
>>> If Level 5 and Tangent vector not null then possible relief effects
>>>
>>> using length of Tangent vector.
>>>
>>>
>>>
>>> No "bake" in runtime.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> For runtime, the generated Normal vector is used and
>>>
>>> if Tangent vector is not null, for the author to produce relief effects
>>>
>>> using length of Tangent vector.
>>>
>>> Is that true?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> .
>>>
>>> For runtime
>>>
>>> -----Original Message-----
>>> From: John Carlson <yottzumm at gmail.com>
>>> Sent: May 17, 2025 1:15 PM
>>> To: Joe D Williams <joedwil at earthlink.net>
>>> Cc: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org
>>> >
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes Tangent index
>>> and vector
>>>
>>>
>>>
>>> Please review Michalis’ response on this thread about tangentIndex and
>>> tangentPerVertex.  I believe the corresponding normal fields apply.
>>>
>>> Level 5? That depends on updated standard.
>>>
>>> On Sat, May 17, 2025 at 2:04 PM Joe D Williams <joedwil at earthlink.net>
>>> wrote:
>>>
>>> * must have tangentIndex (unless tangentIndex same as normalIndex).
>>>
>>> * If no tangentIndex, coordIndex used?
>>>
>>> * tangentPerVertex? Can tangent be applied to vertex or face (like
>>> normal and color)?
>>>
>>> * must have tangent vector (may be auto filled).
>>>
>>> * Level 5 required since level 4 does not have tangent.
>>>
>>> Thanks,
>>>
>>> Joe
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: John Carlson <yottzumm at gmail.com>
>>> Sent: May 16, 2025 10:32 PM
>>> To: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org
>>> >
>>> Cc: Joe D Williams <joedwil at earthlink.net>
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes Tangent index
>>> and vector
>>>
>>>
>>>
>>> Joe,
>>>
>>> X_ITE IFS:
>>>
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Fcomponents%2Fgeometry3d%2Findexedfaceset%2F&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200410801%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=3xDsuKcMJc87j2bLfU4KyNF3brsK3IbYL0CqwE8Quc4%3D&reserved=0
>>> <https://create3000.github.io/x_ite/components/geometry3d/indexedfaceset/>
>>>
>>> Summary, only tangent field.
>>> John
>>>
>>> On Fri, May 16, 2025 at 8:59 PM Joe D Williams via x3d-public <
>>> x3d-public at web3d.org> wrote:
>>>
>>> like  for normals, is there a tangentPerVertex true/false where tangent
>>> value
>>>
>>> is associated with vertex or face?
>>>
>>> If tangentIndex null, is coordIndex used?
>>>
>>> If Tangent vector null tangents are generated after Normal vector?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Joe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Extensible 3D (X3D) Graphics public discussion <
>>> x3d-public at web3d.org>
>>> Sent: May 15, 2025 6:19 AM
>>> To: X3D <x3d-public at web3d.org>
>>> Cc: Holger Seelig <holger.seelig at yahoo.de>
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes Tangent index
>>> and vector
>>>
>>>
>>>
>>> There are also glTF tests for tangents:
>>>
>>> Geometry with tangent node:
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Flaboratory%2Fgltf-sample-viewer%2F%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2FKhronosGroup%2FglTF-Sample-Models%2Fmaster%2F2.0%2FNormalTangentMirrorTest%2FglTF%2FNormalTangentMirrorTest.gltf&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200428820%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=PpWz8VSjvMhqqCEZJV4O4LvlGzFnG2eLGCNk5wbhH4M%3D&reserved=0
>>> <https://create3000.github.io/x_ite/laboratory/gltf-sample-viewer/?url=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/NormalTangentMirrorTest/glTF/NormalTangentMirrorTest.gltf>
>>>
>>> Geometry without tangent node (auto generated tangents using MikkTSpace
>>> algorithm):
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Flaboratory%2Fgltf-sample-viewer%2F%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2FKhronosGroup%2FglTF-Sample-Models%2Fmaster%2F2.0%2FNormalTangentTest%2FglTF%2FNormalTangentTest.gltf&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200445874%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=DU2%2F7PgyUgyWqjqiAcJuw5G6ncNht9yPMBME0SudrrY%3D&reserved=0
>>> <https://create3000.github.io/x_ite/laboratory/gltf-sample-viewer/?url=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/NormalTangentTest/glTF/NormalTangentTest.gltf>
>>>
>>> The reflection in all half spheres should look the same.
>>> Turn on IBL (Image Based Lighting).
>>>
>>> Best regards,
>>> Holger
>>>
>>> --
>>> Holger Seelig
>>> Leipzig, Germany
>>>
>>> holger.seelig at yahoo.de
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2F&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200461168%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=XjmnXZ9c2Q8GbU%2F2E%2F57OT5BPf%2FOIDPEyMWaAIKk3l8%3D&reserved=0
>>> <https://create3000.github.io/x_ite/>
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatreon.com%2FX_ITE&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200476270%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=dnpHDXrPKsnrgHGgRtQcJJd2IZxprCViABurmJXB22E%3D&reserved=0
>>> <https://patreon.com/X_ITE>
>>>
>>>
>>> Am 15.05.2025 um 10:35 schrieb Holger Seelig via x3d-public <
>>> x3d-public at web3d.org>:
>>> All nodes which have a normal field also have a tangent field in X_ITE,
>>> because tangents are very important for PhysicalMaterial to render
>>> correctly. Because tangents always come in conjunction with normals,
>>> normalPerVertex field is also used for tangents.
>>>
>>> If there is no Tangent node, the MikkTSpace algorithm is used to
>>> generate tangent vectors, as need by the glTF specification.
>>>
>>> If there is a Tangent node and the vector field is empty, results are
>>> undefined.
>>>
>>> Tangent node:
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Fcomponents%2Frendering%2Ftangent%2F&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200493482%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=55sK6dVEuZQzTVZXhZ8I%2F1DhNilNlfkn2XvvmBO0xUo%3D&reserved=0
>>> <https://create3000.github.io/x_ite/components/rendering/tangent/>
>>>
>>> IndexedFaceSet with tangent field:
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Fcomponents%2Fgeometry3d%2Findexedfaceset%2F%23fields-tangent&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200513069%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=dgiBEyO2hhPqy1%2FT87BJTK%2BwdI%2BpPcwt2YYGxaIHp70%3D&reserved=0
>>> <https://create3000.github.io/x_ite/components/geometry3d/indexedfaceset/#fields-tangent>
>>>
>>> Best regards,
>>> Holger
>>>
>>> --
>>> Holger Seelig
>>> Leipzig, Germany
>>>
>>> holger.seelig at yahoo.de
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2F&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200532049%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=7Ro1wWBaCc%2BvT6L99mV0McgUAgjn%2F0o4dYUiY2692ZQ%3D&reserved=0
>>> <https://create3000.github.io/x_ite/>
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatreon.com%2FX_ITE&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200551288%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=ZhfBNA1G7rY%2Bdue%2BiXb9EMFn3aXE54dde3KT8UaJNfs%3D&reserved=0
>>> <https://patreon.com/X_ITE>
>>>
>>>
>>> Am 15.05.2025 um 10:24 schrieb Michalis Kamburelis <
>>> michalis.kambi at gmail.com>:
>>> I don't know about Tangent in X_ITE...
>>>
>>> But in Castle Game Engine we have a similar extension -- Tangent node (
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fx3d_implementation_rendering_extensions.php&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200570539%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=Nlb39lRO2YzN2P0E4B5wUDtgnsGJ25vkYD0g%2BmFeDKg%3D&reserved=0
>>> <https://castle-engine.io/x3d_implementation_rendering_extensions.php> ).
>>> Looks like we developed it independently from X_ITE :) It certainly makes
>>> sense to have a node that carry this information, to have perfect
>>> rendering. (Tangents can be auto-calculated, but there are various details
>>> in the auto-calculation algorithm that various renderers may do a bit
>>> differently. When the 3D author used "baking" to make a normalmap texture,
>>> it's better to use exact same tangents as known by the 3D authoring tool.)
>>>
>>> At least for Castle Game Engine, the answer is: if the Tangent node is
>>> not present, but we need tangents (e.g. for bump mapping), then the tangent
>>> vectors are calculated to match the normal vectors. So there's no
>>> additional tangentPerVertex or tangentIndex, they would not make sense. By
>>> knowing the normal vectors, by know all we need to generate reasonable
>>> tangent vectors.
>>>
>>> See
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fx3d_implementation_rendering_extensions.php&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200589324%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=Xx2qMsMjIU1cIZJPyGgF4c5rp48LmfqZHkjJ9S%2BK%2By4%3D&reserved=0
>>> <https://castle-engine.io/x3d_implementation_rendering_extensions.php> for
>>> more details.
>>>
>>> Regards,
>>> Michalis
>>>
>>> czw., 15 maj 2025 o 07:43 John Carlson via x3d-public <
>>> x3d-public at web3d.org> napisał(a):
>>>
>>> Note, it’s Tangent vector=… not Tangent point=…
>>>
>>> John
>>>
>>> On Thu, May 15, 2025 at 12:38 AM John Carlson <yottzumm at gmail.com>
>>> wrote:
>>>
>>> I’d ask Holger, cc’d
>>>
>>> I’ve not used Tangent, myself.
>>>
>>> X_ITE Supports up to Level 4, so I guess you’re proposing a new level 5
>>> for the Geometry 3D component?
>>>
>>> Look at X_ITE IFS:
>>>
>>> <IMG_0516.png>
>>>
>>> Maybe check Holger’s create3000 Library for examples?
>>>
>>> To retrieve examples, last time I tried:
>>>
>>> git clone
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcreate3000%2FLibrary&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200608115%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=JdzgrFdJEsyXix%2BW43%2B8MAU6a%2FFgIItVOPuhEt3mIX8%3D&reserved=0
>>> <https://github.com/create3000/Library>
>>> Online at:
>>>
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcreate3000%2FLibrary&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200624853%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=Ge%2BkLU1GPoDGZG5wQSl5nGgWxSm0T4YFASJw6GwlgxU%3D&reserved=0
>>> <https://github.com/create3000/Library>
>>> Let’s get v2 Joe Kick out the door, check v2 finger joints, and make
>>> sure all joints have converted to v2.
>>>
>>> John
>>>
>>> On Wed, May 14, 2025 at 10:45 PM Joe D Williams <joedwil at earthlink.net>
>>> wrote:
>>>
>>>
>>>
>>> Main questions, in IFS Level5:
>>> Is a default tangent generated if Tangent point="" field empty?
>>> tangentPerVertex? assigned to vertex or face?
>>> tangentIndex? If no tangentIndex is coordIndex used?
>>>
>>>
>>>
>>> Thanks,
>>> Joe
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: John Carlson <yottzumm at gmail.com>
>>> Sent: May 14, 2025 3:00 PM
>>> To: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org
>>> >
>>> Cc: Joe D Williams <joedwil at earthlink.net>
>>> Subject: Re: [x3d-public] 3D graphics, vertex attributes
>>>
>>>
>>>
>>> Joe,
>>>
>>> X_ITE has a tangent node:
>>>
>>> Tangent | X_ITE X3D Browser
>>>
>>> Enjoy!
>>>
>>> John
>>>
>>> On Wed, May 14, 2025 at 4:46 PM Joe D Williams via x3d-public <
>>> x3d-public at web3d.org> wrote:
>>>
>>> From this:
>>>
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F1hCetnGIkut_dyt4mwkDSTNiLTbrVg1jLo_EArE74DRg%2Fedit%3Ftab%3Dt.0&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200642079%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=%2FAuhyK7W2zDHaxy%2BMIRF07Ve94Y0A%2BWWb7OofVb05pY%3D&reserved=0
>>> <https://docs.google.com/document/d/1hCetnGIkut_dyt4mwkDSTNiLTbrVg1jLo_EArE74DRg/edit?tab=t.0>
>>>
>>>
>>> In 3D graphics, vertex attributes define per-vertex data necessary
>>> for rendering, animation, shading, and so on.
>>> These attributes include geometric properties such as
>>> position, normal, tangents, texture mapping information (UV coordinates),
>>> shading data (vertex colors), and
>>> deformation information (skinning weights and blend shapes).
>>>
>>>
>>> In this discussion of vertex attributes, the only one I don't recall
>>> seeing in X3D is tangent?
>>>
>>> Associated with this work:
>>>
>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F18d1qy4jx-d_kLsam-JQAzig23w7dTau0Moe7M32lVvk%2Fedit%3Fgid%3D0%23gid%3D0&data=05%7C02%7Cbrutzman%40nps.edu%7C5010a47039124367feb708dd9a477d98%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638836355200662035%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C40000%7C%7C%7C&sdata=4MpB30vyAlH78SJUrim3wvgE5IAEuN1gnBqBjV%2FlAAY%3D&reserved=0
>>> <https://docs.google.com/spreadsheets/d/18d1qy4jx-d_kLsam-JQAzig23w7dTau0Moe7M32lVvk/edit?gid=0#gid=0>
>>>
>>>
>>> Thanks,
>>> Joe
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>>
>>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250530/d6f4bf2b/attachment-0001.html>


More information about the x3d-public mailing list