<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use original colors for GLTF geometry in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1335298#M82403</link>
    <description>&lt;P&gt;I didn't saw your answer, so thank you it is perfect!&lt;/P&gt;&lt;P&gt;Specifiy material.colorMixMode is not necessary, default values are enough.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 10:07:58 GMT</pubDate>
    <dc:creator>BenjaminLecuona</dc:creator>
    <dc:date>2023-10-05T10:07:58Z</dc:date>
    <item>
      <title>How to use original colors for GLTF geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1332032#M82301</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I would like to load a GLTF on a map using its orignal symbology.&lt;/P&gt;&lt;P&gt;Following this documentation (&lt;A href="https://developers.arcgis.com/javascript/latest/visualization/3d-visualization/visualizing-points-3d/#using-mesh-geometry" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/visualization/3d-visualization/visualizing-points-3d/#using-mesh-geometry&lt;/A&gt;), I am able to convert a GLTF into a single geometry and add it to a map.&lt;/P&gt;&lt;P&gt;But the symology of the loaded geometry is not the same as the original.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Original (expected)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;STRONG&gt;Loaded&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenjaminLecuona_0-1695655238119.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81547iB9B069D768E38FBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BenjaminLecuona_0-1695655238119.png" alt="BenjaminLecuona_0-1695655238119.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenjaminLecuona_1-1695655277098.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/81548iBC828B98BEB94E8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BenjaminLecuona_1-1695655277098.png" alt="BenjaminLecuona_1-1695655277098.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I do is to add the geometry without specifying any symbology. Maybe it is incorrect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Mesh.createFromGLTF(location, "https://developers.arcgis.com/javascript/latest//sample-code/geometry-mesh-elevation/live/pine_tree.glb")
.then(function (geometry) {
    geometry.scale(1, { origin: location });
    geometry.rotate(-90, 0, 0);
    const graphic = new Graphic({geometry});
    view.graphics.add(graphic);
})
.catch(console.error);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in my sample code (&lt;A href="https://codepen.io/blecuona/pen/ZEVxXxN" target="_blank" rel="noopener"&gt;https://codepen.io/blecuona/pen/ZEVxXxN&lt;/A&gt;), colors are automatically modified.&lt;/P&gt;&lt;P&gt;I am doing something wrong? Is there any solution to my problem?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 15:33:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1332032#M82301</guid>
      <dc:creator>BenjaminLecuona</dc:creator>
      <dc:date>2023-09-25T15:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use original colors for GLTF geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1334476#M82380</link>
      <description>&lt;P&gt;Hello, Benjamin!&lt;/P&gt;&lt;P&gt;You are correct in that you would&amp;nbsp;&lt;SPAN&gt;need to specify symbology when creating a geometry object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This modification of your code provides the result you are looking for:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const graphic = new Graphic({
                          geometry,
                          symbol: {
                            type: "mesh-3d",
                            symbolLayers: [{
                              type: "fill",
                              material: {
                                colorMixMode: "tint"
                              }
                            }]
                          }});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 12:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1334476#M82380</guid>
      <dc:creator>Martin_B</dc:creator>
      <dc:date>2023-10-03T12:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use original colors for GLTF geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1335298#M82403</link>
      <description>&lt;P&gt;I didn't saw your answer, so thank you it is perfect!&lt;/P&gt;&lt;P&gt;Specifiy material.colorMixMode is not necessary, default values are enough.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 10:07:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-use-original-colors-for-gltf-geometry/m-p/1335298#M82403</guid>
      <dc:creator>BenjaminLecuona</dc:creator>
      <dc:date>2023-10-05T10:07:58Z</dc:date>
    </item>
  </channel>
</rss>

