What is the right way to export particles in gltf from Blender?

I am trying to upload a Donut with sprinkles through the loader in three.js for a personal project. I am still self-teaching and I’ve hit a wall.

The sprinkles were made with the particle system in Blender, and then converted into objects. Unfortunately when I do this it creates about a hundred little meshes ( one per sprinkle).

It’s not an issue for rendering in blender, but it becomes a problem when I want to upload my donut into react-three-fiber. Basically all I want is to be able to treat the sprinkles as one object and turn them on or off on my website.

Is there any way to group all of sprinkles together in Blender so it’s treated as one object on export as a GLTF file or a way to group them easily in three.js? Any help would be greatly appreciated thanks!

@makc3d I tried this ( I did google quite a bit before posting here) but it doesn’t appear to work for objects that were converted from particles

let me add this: if you exported to gltf and imported back, it does no longer remember that they were particles. you could now join them and export again, no?

@makc3d thanks for the help but I just figured out what it was :smiley: If anyone else is looking it looks like even after particles are converted into objects they are still linked to the emulator. It needs to be turned off before joining or you get funky effects. Select all of the objects and press U to unlink them. They can now be joined into one mesh.

4 Likes

Ooo I remember the hidden data link gave me some issues as well when I was trying to export exactly the same thing a couple months ago. I was very confused as to why after joining the meshes I had more meshes than before. Unfortunately Blender, while powerful, does have those hidden caveats :confused:

@makc3d In my role as a moderator and want to say this: The way you have responded in this topic is not polite. I’m not sure you are aware of this but posting a screenshot of a google search result without adding further comments (or ??) implies the OP is not smart enough to use a search engine.

I know you want to help others but with such a style you are damaging this forum more than anything else.

2 Likes

i would pull out the positions and rotations from the original GLTF. then delete all sprinkles but one (from the GLTF) and render it via instancedMesh.