<div dir="ltr"><div>Thanks for your careful scrutiny.</div><div><br></div><div>It seems best to improve the conversion first, then update the online example accordingly.  Standing by for updates, TIA.</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(34,34,34)"><font face="monospace"><br></font></div><div style="color:rgb(34,34,34)"><font face="monospace">all the best, Don</font></div><div style="color:rgb(34,34,34)"><font face="monospace">-- </font></div><div style="color:rgb(34,34,34)"><font face="monospace">X3D Graphics, Maritime Robotics, Distributed Simulation</font></div><div style="color:rgb(34,34,34)"><font face="monospace">Relative Motion Consulting  <a href="https://RelativeMotion.info" target="_blank">https://RelativeMotion.info</a></font></div></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jan 20, 2026 at 2:26 PM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
The Tangent node in the model<br>
<a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html</a><br>
is just incorrect.<br>
<br>
It has been apparently generated by an older Castle Game Engine<br>
version, where we had a bit different "Tangent.vector" definition: it<br>
was MFVec3f (and always right-handed). This was in the past -- when<br>
"Tangent" was an extension in our engine, independent from X_ITE, and<br>
not in X3D spec.<br>
<br>
We have, since then, changed our Tangent node definition, as you may<br>
recall during our "Tangent" node spec talks :) I have changed our<br>
"Tangent.vector" to be MFVec4f (with the 4th vector component<br>
indicating handedness) and be consistent with X_ITE "Tangent"<br>
extension and be consistent with glTF too.<br>
<br>
The change was done around July 2025, see<br>
<a href="https://castle-engine.io/wp/2025/07/09/support-for-new-tangent-node-in-x3d-with-vectors-as-4d-better-aligned-with-gltf/" rel="noreferrer" target="_blank">https://castle-engine.io/wp/2025/07/09/support-for-new-tangent-node-in-x3d-with-vectors-as-4d-better-aligned-with-gltf/</a><br>
. So, models with "Tangent" node generated by CGE tools before July<br>
2025 are just incorrect, they reflect "Tangent" node as implemented by<br>
CGE extension before July 2025, with "Tangent.vector" being MFVec3f.<br>
Which doesn't match anything now -- new CGE, as well as X_ITE and X3D<br>
spec, consistently define "Tangent.vector" as MFVec4f.<br>
<br>
So, from what I can see, the warning from Castle Model Viewer is valid<br>
in this case, and Tangent node is just incorrect. X_ITE probably also<br>
just ignores it, since it doesn't match X_ITE expectations either :)<br>
<br>
We should generate new version, using latest Castle Model Viewer /<br>
Castle Model Converter tools. They will have correct Tangent as<br>
MFVec4f.<br>
<br>
Regards.<br>
Michalis<br>
<br>
sob., 17 sty 2026 o 03:11 Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@gmail.com</a>> napisał(a):<br>
><br>
> p.s. I tracked down Appearance.alphaMode, apologies had forgotten that we indeed added it to X3D 4.0.<br>
><br>
> X3D Architecture version 4.0, clause 12 Shape component, 12.4.2 Appearance<br>
> <a href="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shape.html#Appearance" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shape.html#Appearance</a><br>
> <a href="https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Appearance.alphaMode" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/tooltips/X3dTooltips.html#Appearance.alphaMode</a><br>
>><br>
>> Appearance : X3DAppearanceNode {<br>
>>   SFNode   [in,out] acousticProperties NULL   [AcousticProperties]<br>
>>   SFFloat  [in,out] alphaCutoff        0.5    [0,1]<br>
>>   SFString [in,out] alphaMode          "AUTO" ["AUTO", "OPAQUE", "MASK", "BLEND"]<br>
>>   SFNode   [in,out] backMaterial       NULL   [X3DOneSidedMaterialNode]<br>
>>   SFNode   [in,out] fillProperties     NULL   [FillProperties]<br>
>>   SFNode   [in,out] lineProperties     NULL   [LineProperties]<br>
>>   SFNode   [in,out] material           NULL   [X3DMaterialNode]<br>
>>   SFNode   [in,out] metadata           NULL   [X3DMetadataObject]<br>
>>   SFNode   [in,out] pointProperties    NULL   [PointProperties]<br>
>>   MFNode   [in,out] shaders            []     [X3DShaderNode]<br>
>>   SFNode   [in,out] texture            NULL   [X3DTextureNode]<br>
>>   SFNode   [in,out] textureTransform   NULL   [X3DTextureTransformNode]<br>
>> }<br>
><br>
> and we have an example:<br>
><br>
> X3D Example Archives: X3D4AM, X3D for Advanced Modeling, Gltf Sample Models, Alpha Blend Mode Test<br>
> 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.<br>
> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestIndex.html</a><br>
><br>
> 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:<br>
><br>
>> Performing X3D Schematron check...<br>
>> X3D version 4.1 began active development by Web3D Consortium for ISO in 2025.[/X3D, diagnostic]<br>
>> Based on file name, AlphaBlendModeTest.x3d is considered a test model supporting X3D Quality Assurance (QA).<br>
>>   <a href="https://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dResources.html#QualityAssurance</a> [/X3D/head, diagnostic]<br>
>> <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]<br>
>> <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]<br>
>><br>
>> --------- X3D Validator checks complete for AlphaBlendModeTest.x3d ---------<br>
><br>
><br>
> X_ITE looks good, pretty close to the reference image at<br>
><br>
> <a href="https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/AlphaBlendModeTest" rel="noreferrer" target="_blank">https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/AlphaBlendModeTest</a><br>
><br>
> Castle is mostly rendering correctly but has unhappy textures with the broken Tangent node, reporting<br>
><br>
>> 2 warnings:<br>
>> VRML/X3D: Error when reading field "vector" value: Error at line 1 column 360: Expected float number, got end of stream<br>
>> 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<br>
>> Scene URL: "file:///C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.x3d" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.x3d</a>".<br>
>> Use "File->View Warnings" menu to view these warnings again.<br>
><br>
><br>
> Model now updated online.  If someone can figure out the missing Tangent vector values from the original glTF, that might fix the remaining gaps...<br>
><br>
> X3D Model Documentation AlphaBlendModeTest.x3d (X3dToXhtml listing)<br>
> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.html#TodoFigureOutMissingValue" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTest.html#TodoFigureOutMissingValue</a><br>
> <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'/><br>
><br>
> Looking at things like this is a pretty good way to learn how things work.  Have fun with X3D!  🤔 👍<br>
><br>
> all the best, Don<br>
> --<br>
> X3D Graphics, Maritime Robotics, Distributed Simulation<br>
> Relative Motion Consulting  <a href="https://RelativeMotion.info" rel="noreferrer" target="_blank">https://RelativeMotion.info</a><br>
</blockquote></div>