I've been following a very popular YouTube tutorial for creating a donut. I'm a web developer keen to learn about 3D in the browser so please excuse my ignorance but basically I'm having trouble exporting a correct model of my donut as a GLTF file.
I'm using Geometry Nodes to add sprinkles to the icing of the donut. The GLTF export is only applying the mesh of the geometry nodes (via 'Realize Instances') and not the associated colour information that's added via Shading using ColorRamp. I found out about 'Realize Instances' when Googling around looking for answers. It's gotten me half way there as previously the sprinkles weren't visible in the GLTF export at all. This sort-of makes sense to me as I presume 'Realize Instances' will apply on top of the input mesh, therefore the sprinkles of my donut inherit the colour of the icing mesh.
- So, here's my donut:
- Here's the Shading config (this is applied to a group of 5 different sprinkle objects):
- Here's my Geometry Node config:
- Here's my Geometry Node config with 'Realize Instances' (note how the sprinkles all turn yellow):
- Finally, here's how it looks when viewed in the browser:
I'm struggling to figure out how this ColorRamp data can be applied to the GLTF export. I've tried removing the ColorRamp from Shading and replicating in Geometry Nodes, but no luck. I'm not even sure what I'm trying to do is compatible with my expectations!
Any help would be much appreciated .Thanks for reading.




