<div style="font-family: Arial, sans-serif; font-size: 14px;">I would be happy to have <span>MaterialX</span> support in X3D. Though admittedly, I recommend a bit different approach: give MaterialX input to the X3D browsers. </div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Reasons and details:</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><ul style="margin-top: 0px; margin-bottom: 0px;" data-editing-info="{"orderedStyleType":1,"unorderedStyleType":2}"><li style="list-style-type: "- ";"><span>Generating complete GLSL code of a shader, which ComposedShader requires, unfortunately has drawbacks. Every browser has a bit different way of how data to shaders are provided (how uniforms are laid out, and it may also depend on platform, on browser version; and we do have good reasons why every browser invents different uniforms ! browsers implement+optimize things  differently on GPU). Moreover, you have to then reimplement _everything_ in a ComposedShader. E.g. however browser does shadows, or GPU skinning, or fog -- your shader will need to do _everything_, because ComposedShader replaces the browser shaders. This gets even more complicated because of small differences in GLSL and what needs to be done between OpenGL / OpenGLES / WebGL / Vulkan etc. (not to mention rendering engines that don't use GLSL).<br></span></li></ul></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><ul style="margin-top: 0px; margin-bottom: 0px;" data-editing-info="{"orderedStyleType":1,"unorderedStyleType":2}"><li style="list-style-type: "- ";"><span>Our "Effect" node in CGE is one way to address it, see <span><a target="_blank" rel="noreferrer nofollow noopener" href="https://castle-engine.io/shaders">https://castle-engine.io/shaders</a></span> and links from it. It allows to write GLSL code that enhances browser built-in shaders, rather than replacing them. However, that's a complicated extension, right now only in CGE and FreeWRL.<br></span></li></ul></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><ul style="margin-top: 0px; margin-bottom: 0px;" data-editing-info="{"orderedStyleType":1,"unorderedStyleType":2}"><li style="list-style-type: "- ";"><span>My recommendation: if you have shaders in MaterialX, then give MaterialX to the X3D browser. Rendering engine, like Castle Game Engine or anything else, can then convert the <span>MaterialX</span> in an optimal way to the final shader. This implies more work on the browser side (processing of <span>MaterialX</span> -> to whatever we need), less on the exporter side, and we can have optimal shading if the browser (aka "rendering engine") will control the conversion MaterialX -> shaders.</span></li><ul style="margin-top: 0px; margin-bottom: 0px; list-style-type: circle;"><li style=""><span>I'm not sure how to do this exactly. Maybe "<span>PackagedShader</span>" node with <span>language</span>="MaterialX"? And then <span>PackagedShader</span>.url would point to <span>MaterialX</span> input.</span></li></ul></ul><div><br></div></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Naturally, all these options can also be explored in parallel :) "shaders" is MFNode, you can provide multiple shaders versions, trying to account for various browsers, and also provide MaterialX version as an alternative.</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Regards,</div><div style="font-family: Arial, sans-serif; font-size: 14px;">Michalis</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div>
<div style="font-family: Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block protonmail_signature_block-empty">
    <div class="protonmail_signature_block-user protonmail_signature_block-empty">
        
            </div>
    
            <div class="protonmail_signature_block-proton protonmail_signature_block-empty">
        
            </div><br><br><div class="protonmail_quote">
        On Wednesday, February 18th, 2026 at 07:42, Bergstrom, Aaron via X3D-Ecosystem <x3d-ecosystem@web3d.org> wrote:<br>
        <blockquote class="protonmail_quote" type="cite">
            
<div class="WordSection1">
<p class="MsoNormal">All,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I went off on a tangent today after attending the AOUSD web working group, when I realized that it’s probably possible for RawKee to fully support MaterialX shading/material export to X3D.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Maya 2026 has something called the LookdevX Graph Editor (I think it’s actually been in Maya since Maya 2024).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This is essentially a new shading network editor designed by Autodesk to eventually replace the Hypershade editor, and their new preferred method setting up high quality shading networks for meshes/models in Maya so that it can fully support
 OpenUSD and Material X in the future.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Based on what I’ve been reviewing today, I fully expect Maya artists to migrate away from the old way of setting up Materials, and move fully toward LookdevX/MaterialX methods of shading their models in the future.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Material X is primarily a portable XML schema for defining the inputs to shading languages. There are converters/loaders (whatever you want to call them) for every shading language.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The intent is that you write out your shader using Material X, and whatever shader language and renderer that you are using, your shading network should render the same.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">However, Material X is not just an XML schema, it’s an ecosystem that includes a bunch of python libraries, and those libraries are now packaged with Maya 2026.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">A Maya content developer can create complex shading networks using the LookdevX Graph Editor, and then export them as GLSL (or any of your other favorite shading languages) using these MaterialX python libraries.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The process is actually quite simple.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">As such, in addition to the robust PhysicalMaterial support that I’ve been working on lately, it appears that it really should be no problem to export complex shading networks from Maya as X3D ComposedShader nodes using the MaterialX methodology.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This will take some additional work to implement, but I think it’ll definitely be worth it, and something to show off at Siggraph this year.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Aaron</p>
</div>



        </blockquote><br>
    </div></div>