<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1533959046;
mso-list-type:hybrid;
mso-list-template-ids:-97475400 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:3;
mso-level-number-format:bullet;
mso-level-text:\F0D8;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>then uses an alpha texture to define the hole:</li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What I am seeing is where the texture isn’t painted, the shape is completely transparent. </p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'> .. window example uses another technique to model holes.</li></ul><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So; how do I get it to show the material, instead of making material transparency 1 for high (presumably) alpha areas of the texture?.</p><p class=MsoNormal>In fact, if I make the Material transparent, ImageTexture and Shape all disappear. That is, the texture can become transparent by changing Material.</p><p class=MsoNormal>So the texture alpha overrides Material transparency and Material transparency can somehow control in some way to override texture alpha. Seems to me more like the texture high alpha areas should expose the Material. After all, the material transparency overrides texture alpha. Do mid-alphas allow material to show? </p><p class=MsoNormal>Thanks,</p><p class=MsoNormal>Joe</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Wednesday, July 5, 2023 2:37 PM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] visual shape differencing with x3d</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Thanks for the nice glTF example.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It turns that the broken window example uses another technique to model holes. It uses a single shape for the window and then uses an alpha texture to define the hole:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/GlassBrokenWindow/glTF/WindowGlass_ColorAlpha.png">https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/GlassBrokenWindow/glTF/WindowGlass_ColorAlpha.png</a></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Textures are probably a more standard way to have cutouts but are less applicable to shape differencing or CSG. So the depthmask plus sort order technique solves a different problem which glTF cannot directly address. </p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Andreas</p></div></div><p class=MsoNormal style='margin-left:4.8pt'><br>Date: Wed, 5 Jul 2023 08:33:41 -0700<br>From: Leonard Daly <<a href="mailto:Leonard.Daly@realism.com" target="_blank">Leonard.Daly@realism.com</a>><br>To: <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>Subject: Re: [x3d-public] visual shape differencing with x3d<br>Message-ID: <<a href="mailto:2b27d08a-6db9-4f5b-27f6-5409fc631dc4@realism.com" target="_blank">2b27d08a-6db9-4f5b-27f6-5409fc631dc4@realism.com</a>><br>Content-Type: text/plain; charset="utf-8"; Format="flowed"<br><br>Hi Andreas,<br><br>The BrokenWindow glTF model <br>(<a href="https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/GlassBrokenWindow/README.md" target="_blank">https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/GlassBrokenWindow/README.md</a>) <br>shows the use of transparency (for the glass) and alpha masking (not <br>blending) for the "holes" (actually breaks). You can see the model and <br>work with various backgrounds at <br><a href="https://github.khronos.org/glTF-Sample-Viewer-Release/?model=https://raw.GithubUserContent.com/KhronosGroup/glTF-Sample-Assets/main/./Models/GlassBrokenWindow/glTF-Binary/GlassBrokenWindow.glb" target="_blank">https://github.khronos.org/glTF-Sample-Viewer-Release/?model=https://raw.GithubUserContent.com/KhronosGroup/glTF-Sample-Assets/main/./Models/GlassBrokenWindow/glTF-Binary/GlassBrokenWindow.glb</a><br><br>There is a discussion of various alpha modes at <br><a href="https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/AlphaBlendModeTest/README.md" target="_blank">https://github.com/KhronosGroup/glTF-Sample-Assets/blob/main/Models/AlphaBlendModeTest/README.md</a><br><br>glTF uses transparency for "see through" material. Alpha blending is use <br>when a transition from one material to another is required. For example <br>metallic coating on a surface that goes from fully opaque to fully <br>transparent over a visible distance.<br><br>Custom and embedded shaders were removed in glTF 2.0 for security and <br>other reasons.<br><br>Leonard<br><br><br><br>On 7/3/2023 8:51 AM, Andreas Plesch wrote:<br>> Thanks, Don, for the positive feedback.<br>><br>> Let me just adjust expectations a bit. This is a useful technique but<br>> only approximates actual CSG. The full hole shape is always rendered<br>> which means it may obscure other shapes in addition to the intended<br>> shape. This can be mitigated by making the hole shape only protrude a<br>> little bit outside of the solid shape intended to become cut out.<br>> Also, the way sorting works in x3dom the solid shape has to have a<br>> nominal amount of transparency to ensure it is rendered after the<br>> transparent hole shape, using the explicit sortkey.<br>><br>> On the plus side, the technique allows for material inside the<br>> cutouts, eg. tinted, shiny glass windows.<br>><br>> <a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/415d151abee114858c79c20c8c4b49e0/raw/0e8e270901077a2165d9d99b139eab27c10b0584/BoxWithHoles183.x3d" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/415d151abee114858c79c20c8c4b49e0/raw/0e8e270901077a2165d9d99b139eab27c10b0584/BoxWithHoles183.x3d</a><br>> is slightly updated with a longer cone.<br>><br>> With regards to glTF, it looks like glTF v.1.0 had the option to<br>> define a custom transparent rendering technique with depthmask=true.<br>> But the now prevalent glTF v.2.0 does not seem to have explicit<br>> depthmask control.<br>><br>> Here is a related, complicated discussion which mentions cutouts:<br>> <a href="https://github.com/KhronosGroup/glTF/issues/822" target="_blank">https://github.com/KhronosGroup/glTF/issues/822</a><br>><br>> It may be that glTF has an alphablend mode which enables cutouts,<br>> instead of standard blending. This may then also imply enabled<br>> z-buffer rendering. But the official glTF alpphablendmode test does<br>> not test for cutouts:<br>> <a href="https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/AlphaBlendModeTest/README.md" target="_blank">https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/AlphaBlendModeTest/README.md</a>.<br>> So I do not think currently glTF has that capability although it had<br>> been discussed and there may be a glTF extension for that.<br>><br>> Like depthmask sorting seems to be considered exclusively in the<br>> domain of the viewer which implements glTF.<br>><br>> All the best, Andreas<br>><br>> On Sun, Jul 2, 2023 at 10:13?PM Brutzman, Donald (Don) (CIV)<br>> <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>>> Andreas, thanks for sharing on x3d public mailing list. Agreed that this is an extremely powerful rendering technique - high "wow factor" for sure.<br>>><br>>><br>>><br>>> Perhaps of note is that the X3D working group spent a few years pursuing Constructive Solid Geometry (CSG) with little to show for it, since such approaches can be computationally intensive and not well suited to real-time rendering on diverse devices.<br>>><br>>><br>>><br>>> Wikipedia: Constructive solid geometry (CSG)<br>>> <a href="https://en.wikipedia.org/wiki/Constructive_solid_geometry" target="_blank">https://en.wikipedia.org/wiki/Constructive_solid_geometry</a><br>>><br>>><br>>><br>>> Avoiding the need for any geometry modification whatsoever when creating visual "holes" - totally sidestepping CSG modeling - seems quite novel.<br>>><br>>><br>>><br>>> Wondering if this differencing (see-through) technique is possible today using glTF 2.0 models? If a supporting X3D4 player might load it as glTF, then that might be a fast path to usage.<br>>><br>>><br>>><br>>> Looking ahead, when ready, this seems like the nodes you are using in X3DOM (or some version thereof) might be strong candidates for inclusion in a future X3D 4.1 specification.<br>>><br>>><br>>><br>>> Meanwhile (as you also recently discussed) we might experiment with extensions to X3D 4.0, perhaps through metadata for forwards/backwards compatibility and validation. (Wish list: the ImageAtlas node never made the cut for X3D 4.0 and seems like a candidate for broader implementation as well.) The X in X3D is Extensibility...<br>>><br>>><br>>> Congratulations on what seems to be a major achievement! 8)<br>>><br>>><br>>><br>>> all the best, Don<br>>><br>>> --<br>>><br>>> Don Brutzman Naval Postgraduate School, Code USW/<a href="mailto:Brbrutzman@nps.edu" target="_blank">Brbrutzman@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 roboticshttps://<a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><br>>><br>>><br>>><br>>> -----Original Message-----<br>>> From: x3d-public<<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> On Behalf Of Andreas Plesch<br>>> Sent: Sunday, July 2, 2023 9:20 AM<br>>> To: X3D Graphics public mailing list<<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>>> Subject: [x3d-public] visual shape differencing with x3d<br>>><br>>><br>>><br>>> Let me share that we found that it is possible to simulate differencing of shapes in x3dom to a useful degree. This allows for transparent cutouts or holes:<br>>><br>>><br>>><br>>> <a href="https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/415d151abee114858c79c20c8c4b49e0/raw/4c70463321df267b28298462af76b869adbfdfdb/BoxWithHoles183.x3d" target="_blank">https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/415d151abee114858c79c20c8c4b49e0/raw/4c70463321df267b28298462af76b869adbfdfdb/BoxWithHoles183.x3d</a><br>>><br>>><br>>><br>>><br>>><br>>> The idea is to draw first transparent shapes which define the holes, including to the depth buffer. Then standard drawing of the solid shape will be hidden where the holes 'obscure' it (although the holes are actually transparent).<br>>><br>>><br>>><br>>> To do that requires two changes to default rendering of transparent shapes. For best rendering normally transparent shapes are rendered last and do not write to the depth buffer. Here they are drawn first and do write to the depth buffer.<br>>><br>>><br>>><br>>> In x3dom this is implemented by allowing explicit definition of the sort (rendering) order of shapes (with a sortKey field), and by allowing direct access to the gl depthmask function with a Depthmode node.<br>>><br>>><br>>><br>>> An easy way to generate cutouts or holes which is otherwise only possible with external CSG tools is a powerful use case for these lower-level x3d extensions. Perhaps other browsers have similar features or are inspired to consider those.<br>>><br>>><br>>><br>>> Andreas<br>>><br>>><br>>><br>>> --<br>>><br>>> Andreas Plesch<br>>><br>>> Waltham, MA 02453<br>>><br>>><br>>><br>>> _______________________________________________<br>>><br>>> x3d-public mailing list<br>>><br>>> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>>><br>>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>><br>><br>-- <br>*Leonard Daly*<br>3D Systems Engineering<br>President, Daly Realism - /Creating the Future/<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230705/ce3ca302/attachment.html" target="_blank">http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230705/ce3ca302/attachment.html</a>><br><br>------------------------------<br><br>Subject: Digest Footer<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" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br><br><br>------------------------------<br><br>End of x3d-public Digest, Vol 172, Issue 24<br>*******************************************</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>