[x3d-public] alphaMode Tangent example, AlphaBlendModeTest.x3d
Don Brutzman
don.brutzman at gmail.com
Wed Jan 21 10:53:43 PST 2026
Thanks for your careful scrutiny.
It seems best to improve the conversion first, then update the online
example accordingly. Standing by for updates, TIA.
all the best, Don
--
X3D Graphics, Maritime Robotics, Distributed Simulation
Relative Motion Consulting https://RelativeMotion.info
On Tue, Jan 20, 2026 at 2:26 PM Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:
> Hello,
>
> The Tangent node in the model
>
> https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html
> is just incorrect.
>
> It has been apparently generated by an older Castle Game Engine
> version, where we had a bit different "Tangent.vector" definition: it
> was MFVec3f (and always right-handed). This was in the past -- when
> "Tangent" was an extension in our engine, independent from X_ITE, and
> not in X3D spec.
>
> We have, since then, changed our Tangent node definition, as you may
> recall during our "Tangent" node spec talks :) I have changed our
> "Tangent.vector" to be MFVec4f (with the 4th vector component
> indicating handedness) and be consistent with X_ITE "Tangent"
> extension and be consistent with glTF too.
>
> The change was done around July 2025, see
>
> https://castle-engine.io/wp/2025/07/09/support-for-new-tangent-node-in-x3d-with-vectors-as-4d-better-aligned-with-gltf/
> . So, models with "Tangent" node generated by CGE tools before July
> 2025 are just incorrect, they reflect "Tangent" node as implemented by
> CGE extension before July 2025, with "Tangent.vector" being MFVec3f.
> Which doesn't match anything now -- new CGE, as well as X_ITE and X3D
> spec, consistently define "Tangent.vector" as MFVec4f.
>
> So, from what I can see, the warning from Castle Model Viewer is valid
> in this case, and Tangent node is just incorrect. X_ITE probably also
> just ignores it, since it doesn't match X_ITE expectations either :)
>
> We should generate new version, using latest Castle Model Viewer /
> Castle Model Converter tools. They will have correct Tangent as
> MFVec4f.
>
> Regards.
> Michalis
>
> sob., 17 sty 2026 o 03:11 Don Brutzman <don.brutzman at gmail.com>
> napisał(a):
> >
> > p.s. I tracked down Appearance.alphaMode, apologies had forgotten that
> we indeed added it to X3D 4.0.
> >
> > X3D Architecture version 4.0, clause 12 Shape component, 12.4.2
> Appearance
> >
> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shape.html#Appearance
> > https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Appearance.alphaMode
> >>
> >> Appearance : X3DAppearanceNode {
> >> SFNode [in,out] acousticProperties NULL [AcousticProperties]
> >> SFFloat [in,out] alphaCutoff 0.5 [0,1]
> >> SFString [in,out] alphaMode "AUTO" ["AUTO", "OPAQUE",
> "MASK", "BLEND"]
> >> SFNode [in,out] backMaterial NULL [X3DOneSidedMaterialNode]
> >> SFNode [in,out] fillProperties NULL [FillProperties]
> >> SFNode [in,out] lineProperties NULL [LineProperties]
> >> SFNode [in,out] material NULL [X3DMaterialNode]
> >> SFNode [in,out] metadata NULL [X3DMetadataObject]
> >> SFNode [in,out] pointProperties NULL [PointProperties]
> >> MFNode [in,out] shaders [] [X3DShaderNode]
> >> SFNode [in,out] texture NULL [X3DTextureNode]
> >> SFNode [in,out] textureTransform NULL [X3DTextureTransformNode]
> >> }
> >
> > and we have an example:
> >
> > X3D Example Archives: X3D4AM, X3D for Advanced Modeling, Gltf Sample
> Models, Alpha Blend Mode Test
> > This model tests the various alpha modes available in glTF 2.0
> rendering. There are three settings for alphaMode: "OPAQUE" (the default),
> "BLEND", and "MASK". Of these, "MASK" takes an additional alphaCutoff value
> that modifies it.
> >
> https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html
> >
> > Interestingly, our 2024 version had Tangent nodes included and commented
> out... I have restored them and updated the model to X3D version 4.1. Also
> applied DEF/USE on various image textures. Also handled flipVertically by
> inserting One of the tangent nodes has a problem. from latest draft
> X3D-Edit Validator:
> >
> >> Performing X3D Schematron check...
> >> X3D version 4.1 began active development by Web3D Consortium for ISO in
> 2025.[/X3D, diagnostic]
> >> Based on file name, AlphaBlendModeTest.x3d is considered a test model
> supporting X3D Quality Assurance (QA).
> >>
> https://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance
> [/X3D/head, diagnostic]
> >> <meta name='warning' content='removed gravityTransform=false since this
> construc is not valid X3D4. several converters not yet supporting Tangent
> node properly, perform QA checks for details.'/> [/X3D/head/meta[6],
> diagnostic]
> >> <Tangent DEF='TodoFigureOutMissingValue'/> vector array has 6.75
> 4-tuples, likely has incorrect number of values or missing whitespace
> [/X3D/Scene/Transform[1]/Group/Shape/IndexedTriangleSet/Tangent, warning]
> >>
> >> --------- X3D Validator checks complete for AlphaBlendModeTest.x3d
> ---------
> >
> >
> > X_ITE looks good, pretty close to the reference image at
> >
> >
> https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/AlphaBlendModeTest
> >
> > Castle is mostly rendering correctly but has unhappy textures with the
> broken Tangent node, reporting
> >
> >> 2 warnings:
> >> VRML/X3D: Error when reading field "vector" value: Error at line 1
> column 360: Expected float number, got end of stream
> >> X3D: Invalid number of items in an attribute array for shape
> "Bed/BedMesh//IndexedTriangleSet": Not enough items in tangents: 54, but at
> least 72 required
> >> Scene URL: "file:///C:/x3d-code/
> www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.x3d
> ".
> >> Use "File->View Warnings" menu to view these warnings again.
> >
> >
> > Model now updated online. If someone can figure out the missing Tangent
> vector values from the original glTF, that might fix the remaining gaps...
> >
> > X3D Model Documentation AlphaBlendModeTest.x3d (X3dToXhtml listing)
> >
> https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.html#TodoFigureOutMissingValue
> > <Tangent DEF='TodoFigureOutMissingValue' vector='0.999847650527954
> -0.0174568109214306 0 0.999847650527954 -0.0174568109214306 0
> 0.999847650527954 -0.0174568109214306 0 0.999847650527954
> -0.0174568109214306 0 0.999847650527954 -0.0174568109214306 0
> 0.999847650527954 -0.0174568109214306 0 0.999847650527954
> -0.0174567885696888 0 0.999847650527954 -0.0174567885696888 0
> 0.999847650527954 -0.0174567885696888 0'/>
> >
> > Looking at things like this is a pretty good way to learn how things
> work. Have fun with X3D! 🤔 👍
> >
> > all the best, Don
> > --
> > X3D Graphics, Maritime Robotics, Distributed Simulation
> > Relative Motion Consulting https://RelativeMotion.info
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260121/0fa5ce67/attachment.html>
More information about the x3d-public
mailing list