<style class="ke-style">
[list-style-type] {padding-left:20px;list-style-position:inside}
[list-style-type] li {margin:0}
[list-style-type] li:before, span.ke-list-item-matter {font-family:"sans serif",tahoma,verdana,helvetica}
[list-style-type] li p,[list-style-type] li h1,[list-style-type] li h2,[list-style-type] li h3,[list-style-type] li h4,[list-style-type] li h5,[list-style-type] li div,[list-style-type] li blockquote{display:inline;word-break:break-all}
[list-style-type] li table {display:inline-block;vertical-align:top}
p{margin:0}
td {word-break: break-word}
.default-font-1758731814770{
}
</style><div class="default-font-1758731814770" dir="ltr"><p style="font-size:14px;">Thanks for your reply.</p><p style="font-size:14px;">Material.diffuseColor is specific to the Phone lighting model. The default value of 0.8 0.8 0.8 may darken diffuseTexture.</p><p style="font-size:14px;">For Unlit lighting model, the default value of UnlitMaterial.emissiveColor is 1.0 1.0 1.0, and multiplying it by emissiveTexture does not darken emissiveTexture.</p><p style="font-size:14px;">Similarly, for Physical lighting model, the default value of PhysicalMaterial.baseColor is 1.0 1.0 1.0, and does not darken baseTexture.</p><p style="font-size:14px;">In the older <a href="https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#t-Litcolourandalpha" target="_blank" title="Original URL: https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#t-Litcolourandalpha
Hold down Ctrl and click to open the link">X3D V3.3</a>, diffuseTexture is not multiplied by diffuseColor. Once diffuseTexture is enabled, diffuseColor or vertexColor is useless. This is effectively equivalent to multiplying diffuseTexture by 1.0 1.0 1.0. DiffuseTexture does not darken.</p><p style="font-size:14px;">(I haven't found a test case yet.)</p><p style="font-size:14px;"><br></p><p style="font-size:14px;"><br></p><p style="font-size:14px;">> -----Original Messages-----</p><p style="font-size:14px;"><br></p><p style="font-size:14px;">> From: "Michalis Kamburelis" <michalis.kambi@gmail.com></p><p style="font-size:14px;">> Send time:Wednesday, 24/09/2025 16:27:02</p><p style="font-size:14px;">> To: "Extensible 3D (X3D) Graphics public discussion" <x3d-public@web3d.org></p><p style="font-size:14px;">> Cc: microaaron@pku.edu.cn</p><p style="font-size:14px;">> Subject: Re: [x3d-public] Should Material.diffuseColor be updated to 1.0 1.0 1.0? & Should normalTexture be removed from UnlitMaterial?</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> Hello,</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> Let me answer these two points (as I was designing them in X3D 4.x:) ):</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> > 1.The Unlit lighting model formula has changed in v4.0/4.1: fragmentColor = applyFog(mixTexture(applyColorPerVertex(emissiveParameter), emissiveTextureParameter)). This differs from the definition in v3.3. However, the default value of Material.diffuseColor remains 0.8 0.8 0.8, which may results in a darkened diffuseTexture.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> The unlit lighting formula should be equivalent to how things worked before.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> In X3D 3.x there was no UnlitMaterial, but we had capability to make</p><p style="font-size:14px;">> unlit stuff e.g. when apperance=NULL or apperance.material=NULL or</p><p style="font-size:14px;">> when Material has all things except emissiveColor set to zero. All</p><p style="font-size:14px;">> these things should still work in equivalent way to X3D 4.x . The new</p><p style="font-size:14px;">> equations account for new things introduced (like emissiveTexture that</p><p style="font-size:14px;">> can multiply component-wise with emissiveColor).</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> That's also why we left Material.diffuseColor = (0.8,0.8,0.8). So</p><p style="font-size:14px;">> things here behave like before. Things should not be darker / lighter</p><p style="font-size:14px;">> compared to X3D 3.x.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> It's of course possible I miss something or made a bug in some</p><p style="font-size:14px;">> thinking :) If you have a testcase where things are different</p><p style="font-size:14px;">> (darkened) but they should not, let me know.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> ></p><p style="font-size:14px;">> > 2.normalTexture should be useless for UnlitMaterial. Should it be removed from UnlitMaterial?</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> It's a bit surprising, but UnlitMaterial also has use for normalTexture.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> See https://github.com/michaliskambi/x3d-tests/wiki/How-to-add-PBR-to-X3D%3F#does-it-make-sense-that-unlitmaterial-also-has-normaltexture</p><p style="font-size:14px;">> , section "Does it make sense that UnlitMaterial also has</p><p style="font-size:14px;">> normalTexture?" . In short: TextureCoordinateGenerator with some modes</p><p style="font-size:14px;">> (CAMERASPACENORMAL, CAMERASPACEREFLECTIONVECTOR) can use normals, from</p><p style="font-size:14px;">> geometry and them modified by normalTexture, and this makes sense</p><p style="font-size:14px;">> regardless of the material type and being lit.</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> IOW, normals (and thus, also normalTexture) are *not* only for</p><p style="font-size:14px;">> lighting interaction (even though that's their only purpose in most</p><p style="font-size:14px;">> cases).</p><p style="font-size:14px;">> </p><p style="font-size:14px;">> Regards,</p><p style="font-size:14px;">> Michalis</p></div>