<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks for your efforts Michalis. Now the question is, do we want to export "Blend Mode" in the Blender X3DV exporter, so X3D looks like glTF, if someone chooses that?<div><br></div><div>Here's what appears to be X3DOM documentation:</div><div><br></div><div><a href="https://doc.x3dom.org/developer/x3dom/nodeTypes/BlendMode.html">X3DOM Developer API Documentation: Class: BlendMode</a><br></div><div><br></div><div><a href="https://create3000.github.io/x_ite/components/x-ite/blendmode/">BlendMode | X_ITE X3D Browser (create3000.github.io)</a><br></div><div><br></div><div><a href="https://castle-engine.io/blending">Blending (Rendering Partially-Transparent Objects) | Manual | Castle Game Engine (castle-engine.io)</a><br></div><div><br></div><div>I'm not seeing BlendMode here:</div><div><br></div><div><a href="https://www.web3d.org/x3d/content/X3dTooltips.html">X3D Tooltips in English version 4.0 (web3d.org)</a><br></div><div><br></div><div>Or here:</div><div><br></div><div><div>x3d-code/<a href="http://www.web3d.org/specifications">www.web3d.org/specifications</a></div><div>$ find . -type f | xargs grep -i blendmode</div></div><div>[ no output ]</div><div><br></div><div>I'm searching the standard for X3DAppearanceNode.</div><div><br></div><div>Found this:</div><div><br></div><div><a href="https://doc.x3dom.org/developer/x3dom/nodeTypes/X3DAppearanceChildNode.html">X3DOM Developer API Documentation: Class: X3DAppearanceChildNode</a><br></div><div><br></div><div>Anyone know where BlendMode is in the standard?</div><div><br></div><div><br></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 19, 2024 at 4:20 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">( I'm reposting here part of my answer from the "Possible negative<br>
values in UV texture" thread, so that people in this thread, and in<br>
mailing list, know the answer too. )<br>
<br>
To be clear, I'm testing exporting<br>
<a href="https://github.com/coderextreme/gramps/blob/main/gramps_animated_full_1.blend" rel="noreferrer" target="_blank">https://github.com/coderextreme/gramps/blob/main/gramps_animated_full_1.blend</a><br>
from Blender to glTF and opening in latest castle-model-viewer.<br>
Conclusions:<br>
<br>
1. First of all, the problem is completely not related to negative<br>
texture coordinates (which you don't seem to have) or even to texture<br>
coordinates at all.<br>
<br>
That is, you have UV texture coordinates, nothing special, all in<br>
0..1 range it seems, this is standard usage of UV texture. And texture<br>
coordinates seem OK everywhere -- in Blender, in glTF file exported in<br>
Blender, and in how this glTF is displayed by castle-model-viewer.<br>
<br>
There's no bug here to solve (in model, in implementations, in any specs).<br>
<br>
2. Your issue comes from using "Blend Mode" = "Alpha Blend" in<br>
Blender. This makes no sense for your model (you don't have<br>
partially-transparent parts), and makes all sorts of weird rendering<br>
artifacts since various browsers activate alpha blending, and the<br>
faces in your mesh are in ~random order, resulting in this weird look.<br>
<br>
For an explanation, please read how "alpha blending" aka "partial<br>
transparency" is done in real-time rendering, e.g. in OpenGL (but it's<br>
the same in all GPU APIs).<br>
<br>
Solution: Just switch "Blend Mode" to "Opaque" in Blender.<br>
Re-export to glTF and everything will look OK. Screenshot from<br>
castle-model-viewer attached.<br>
<br>
I also attach a screen from Blender where I outlined appropriate<br>
material setting. Note that you should probably also *not* put<br>
anything in Blender's "alpha" slot, it is also useless (but will be<br>
harmless after you set "Blend Mode" to "Opaque").<br>
<br>
Let's continue ev. further discussion here please, to make sure<br>
everyone has all the knowledge.<br>
<br>
( Hopefully mailing list will accept my attachments -- I remade them<br>
as really compressed JPGs. )<br>
<br>
Regards,<br>
Michalis<br>
<br>
<br>
<br>
<br>
<br>
niedz., 19 maj 2024 o 21:47 John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> napisał(a):<br>
><br>
> I was able to load the .glb appropriately into blender, and see that the texture was rendered OK by blender. This seems to indicate an issue with the .glb viewers I tried with this file:<br>
><br>
> gramps/gramps_animated_full_1.glb at main · coderextreme/gramps (<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>)<br>
><br>
> Here are the online viewers I've tried:<br>
><br>
> glTF Viewer (<a href="http://donmccurdy.com" rel="noreferrer" target="_blank">donmccurdy.com</a>)<br>
><br>
> PlayCanvas glTF Viewer<br>
><br>
> The texture/mesh didn't work<br>
><br>
> I just tried this one online, and it works!<br>
><br>
> glTF Sample Viewer (<a href="http://khronos.org" rel="noreferrer" target="_blank">khronos.org</a>)<br>
><br>
> So it appears that there are serious issues with viewing the .glb in some tools, namely, the above mentioned, and these:<br>
><br>
> Castle Model Viewer<br>
><br>
> Sunrize<br>
><br>
> X3DOM<br>
><br>
> X_ITE<br>
><br>
> There are plenty of data files, some as generated by X3D-Edit for you to see in the repository.<br>
><br>
> coderextreme/gramps: Demo of glTF/glb textures vs X3D textures, exported from Blender (<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>)<br>
><br>
> By all means, write your own Inlines!<br>
><br>
> My suggestion, based on many long hours working with different data files, UV files, is that negative coordinates in the TextureCoordinate (point field) are being ignored. But don't take my word for it, try to fix the texture/mesh in your viewers so it looks like Khronos' viewer!<br>
><br>
> Thanks!<br>
><br>
> John<br>
><br>
> On Fri, May 17, 2024 at 11:25 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>><br>
>> So it actually appears to be a problem with the Blender file or the Blender glTF/glb export of the gramps blend file, found here: gramps/gramps_animated_full_1.blend at main · coderextreme/gramps (<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>)<br>
>><br>
>> I did check the .glb with a very popular three.js glb viewer by Don McCurdy (first link on Bing). Here's the results:<br>
>> [ deleted ]<br>
>><br>
>> So I tried the 2nd glTF viewer on Bing the PlayCanvas one, with the glb:<br>
>><br>
>> [ deleted ]<br>
>><br>
>> Since .x3d texture seems to export OK (except for intentionally added geometry), I think it may be the glTF/glb export. But there could be a virulent problem with glTF/glb viewers, too. Probably X3D folks should make sure that their code does not produce results like the above.<br>
>><br>
>> Another thing may be that I exported the PNG directly from Blender, instead of with the .x3d file, but I don't think that's the case. I can double check. Since .glb contains the texture, AFAIK, the .glb should not have any issue. Well, as you can see above, it does!<br>
>><br>
>> X3D encodings rock!<br>
>><br>
>> For reference, here are my test files:<br>
>><br>
>> coderextreme/gramps: Demo of glTF/glb textures vs X3D textures, exported from Blender (<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>)<br>
>><br>
>> You may forward this message. Obviously, we want all web 3D graphics formats and Blender exports to improve.<br>
>><br>
>> Thanks!<br>
>><br>
>> John Carlson<br>
>><br>
>> On Fri, May 17, 2024 at 10:25 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
>>><br>
>>> While I appreciate that glTF works for this *one* model, perhaps with PBR materials, that doesn't help my use of PNG textures with glTF or glb. For me, normal X3D texture export from Blender works much better, especially with viewers like octaga, view3dscene/castle-model-view and sunrize (I tried X_ITE and X3DOM inside X3D-Edit as well).<br>
>>><br>
>>> I've already posted images, at least a couple of times. Here is a full repository for your own testing.<br>
>>><br>
>>> coderextreme/gramps: Demo of glTF/glb textures vs X3D textures, exported from Blender (<a href="http://github.com" rel="noreferrer" target="_blank">github.com</a>)<br>
>>><br>
>>> I did try replacing the png in glb with another image, and I got an error (???). Replacing the png in the glTF did not change the result.<br>
>>><br>
>>> So the problem is with the glTF use of ordinary textures, or the glTF viewers. Or perhaps Blender is exporting glTF/glb poorly.<br>
>>><br>
>>> Please address this. I will continue testing with non-X3D viewers.<br>
>>><br>
>>> John<br>
>>><br>
>>><br>
>>> John<br>
>>><br>
>>><br>
>>><br>
>>> On Fri, May 17, 2024 at 8:41 AM Brutzman, Donald (Don) (CIV) via x3d-public <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>> wrote:<br>
>>>><br>
>>>> X3D Standards Review meeting<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Participants: Nicholas Polys, Dick Puk, Vince Marchetti, Anita Havele, Don Brutzman<br>
>>>><br>
>>>><br>
>>>><br>
>>>> [apologies for late posting of minutes, some time was needed for executing followups.]<br>
>>>><br>
>>>><br>
>>>><br>
>>>> We discussed future change considerations for X3D and how to better support glTF<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Fix glTF examples by adding component statements, 3 are actually needed if not using X3D version=’4.0’ profile=’Full’<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Corrections applied and deployed. Also added new model to test glTF capability using Inline node.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> X3D Example Archives: X3D4AM, X3D for Advanced Modeling, Gltf Sample Models<br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> X3D Example Archives: X3D4AM, X3D for Advanced Modeling, Gltf Sample Models, Alpha Blend Mode Test Inline<br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineIndex.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineIndex.html</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Of happy note is that X_ITE and X3DOM both appear to render well (and full ZOOM rocks!)<br>
>>>><br>
>>>><br>
>>>><br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX_ITE.html" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX_ITE.html</a><br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX3dom.xhtml" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX3dom.xhtml</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Castle view3dscene worked well for me too, so forthcoming castle-model-viewer should be fine also. All three renderings were super high quality and apparently identical. Evidence:<br>
>>>><br>
>>>><br>
>>>><br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX3dom.png" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GltfSampleModels/AlphaBlendModeTestInlineX3dom.png</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Ladies and gentlemen, we have a demonstrated capability of X3D Inline of glTF models! 😊<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Do we need to consider a new profile? This adds much attendant overhead for implementers, and baggage for tools to keep track of, but might result in simplicity if use cases for a given community are well defined enough to show that the profile indeed adds value.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Always a perennial topic of interest, always a high hurdle to show that sufficient benefit results from a major change. Good discussion occurred, leading to the following.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Add glTF to Interactive and Interchange profile? Interesting that our prior motivations of not breaking browser support (e.g. “no changes to Interchange”) might be balanced with making X3D inclusion of glTF more appealing to new adopters.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> This seems like a promising avenue to pursue further. Integrating glTF more fully into X3D infrastructure holds much promise. Minor changes to X3D Architecture would be needed but likely provide big payoff. This would first be an X3D Recommended Practice, eventually leading to X3D amendment at ISO.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Next discussion: what exactly is Web3D strategy regarding deployment, testing and adoption of new capabilities?<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Encouraging browser permissiveness, i.e. rendering what they can while not blocking for what they can’t<br>
>>>><br>
>>>> if profile=Full then do not report “capability not supported” unless there x3d nodes in the file are indeed not supported<br>
>>>> if profile is less that actual content, but browser supports it, then render with no more than a warning (i.e. don’t be overly strict)<br>
>>>> Note that unsupported capabilities won’t render correctly, causing frustration… decision on when to issue warnings and when to fail is left up to browsers, since X3D does not impose requirements (potential performance burdens) on error handling.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Full profile always includes everything… meaning an author producing a model only has to be correct and valid X3D without having to worry about getting profile and component statements sliced and diced correctly. A permissive approach by browsers to permit content (even if only partially supported at the moment) encourages authors to use profile=Full regardless of other concerns, supporting long-term workability of models independent of evolution of browser capabilities over time.<br>
>>>> Do we need someone to look at MPEG4 again, is anything happening over there that we should consider?<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Group assessment: current X3D profile and component architecture design is flexible, descriptive, concise, and sound overall. No fundamental changes needed at all.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Near-term options:<br>
>>>><br>
>>>> Encourage correct profile/component combinations are provided in X3D model content<br>
>>>> Our recommended practices and examples should be much clearer about how authors can use glTF in X3D<br>
>>>> Consider additional profiles? None yet specifically proposed… so not now.<br>
>>>> Push glTF into other profiles, e.g. Interchange, Interactive, Immersive, Medical, CADInterchange? Hmmm…<br>
>>>> Similarly consider upgrading some of the components (e.g. Geospatial) by revising component prerequisites corresponding to glTF.<br>
>>>> Must be careful about modifying past components since that might cause backwards incompatibility.<br>
>>>> What do implementers think?<br>
>>>><br>
>>>><br>
>>>><br>
>>>> TODO for future meeting: lay down X3D Recommended Practices page.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Other activity:<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Good progress resuming unit testing of X3D Examples conversion from XML (.x3d) to produce Classic VRML (.x3dv) and VRML97 (.wrl) using the newly-renamed Castle Model Viewer. Ongoing progress results maintained in sourceforge version control and visible at<br>
>>>><br>
>>>><br>
>>>><br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/build.x3dv.all.log.txt" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/build.x3dv.all.log.txt</a><br>
>>>> <a href="https://www.web3d.org/x3d/content/examples/build.vrml97.all.log.txt" rel="noreferrer" target="_blank">https://www.web3d.org/x3d/content/examples/build.vrml97.all.log.txt</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> We are preparing a quarterly update release of X3D-Edit.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Dick and I continue updating two draft ISO specifications, with all improvements scrupulously documented in Web3D Issue Tracker. Specification comments always welcome.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> X3D XML Encoding<br>
>>>> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/X3D_XML.html" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/X3D_XML.html</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> X3D Classic VRML Encoding<br>
>>>> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/X3D_ClassicVRML.html" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-2v4.0-WD1/Part02/X3D_ClassicVRML.html</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> Have fun with X3D4! 8)<br>
>>>><br>
>>>><br>
>>>><br>
>>>> all the best, Don<br>
>>>><br>
>>>> --<br>
>>>><br>
>>>> Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
>>>><br>
>>>> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>
>>>><br>
>>>> X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">https://faculty.nps.edu/brutzman</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> x3d-public mailing list<br>
>>>> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
>>>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>