0

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.

  1. So, here's my donut:

enter image description here

  1. Here's the Shading config (this is applied to a group of 5 different sprinkle objects):

enter image description here

  1. Here's my Geometry Node config:

enter image description here

  1. Here's my Geometry Node config with 'Realize Instances' (note how the sprinkles all turn yellow):

enter image description here

  1. Finally, here's how it looks when viewed in the browser:

enter image description here

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.

  • 1
    https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures – Duarte Farrajota Ramos Feb 05 '23 at 22:07
  • Thanks for sharing that @DuarteFarrajotaRamos So I guess I'd need to make the instances real and then find a way to 'randomly' colour them? – Andrew Tanner Feb 06 '23 at 17:16
  • https://blender.stackexchange.com/questions/120290/procedural-random-different-colors-based-on-normal-direction/ https://blender.stackexchange.com/questions/84718/color-all-of-my-models-using-one-texture – Duarte Farrajota Ramos Feb 06 '23 at 17:38

0 Answers0