In this answer is explained how to create an object which looks like a nucleus.

However, I have a problem when merging multiples spheres into one object. Exactly what I do is the following

1) I created a parent object with many spheres.

2) Then I do Object -> Apply -> Make duplicates real. This will give me all spheres, which are as before colored in red and blue.

3) I select all these spheres and Object-> Join (Ctrl-J). This gives me a single object that I would like to further use as a base object for other geometry.

But after step three all spheres become of the same color.

The question is how to preserve colors of individual spheres when Joining them into a single object?

Thanks in advance. (I was using blender 2.80)

  • 3
    $\begingroup$ I don’t understand why this has been downvoted - whoever downvoted, please add explanation so the issue can be addressed. I’ve upvoted but perhaps their issue was with the title - perhaps change the title to something more generic (“preserve materials when joining meshes” perhaps) $\endgroup$ Feb 23, 2019 at 9:43
  • 1
    $\begingroup$ Thank you. According to your recommendation I changed the title. $\endgroup$
    – tupos
    Feb 23, 2019 at 9:49
  • $\begingroup$ I think this is a good question. I think I would create a script that assigned a random vertex color on all vertex points on each object before joining them. Then create a material that uses the vertex color as an input to the shader. Or try to bake it to a texture... but that would require unique UV coordinates for each object... not good answers I'm afraid :-P $\endgroup$
    – Jackdaw
    Feb 23, 2019 at 10:17
  • $\begingroup$ Are there any particular reason why you need to join the objects? $\endgroup$
    – Jackdaw
    Feb 23, 2019 at 11:03
  • $\begingroup$ @Jackdaw I want to join spheres because later on I would like to create a crystal cell, i.e., cube, in vertices of which I have these nuclei. I was thinking to make an individual nucleus a parent for this cube and later use the same steps how I created nucleus itself. The description is in the links from the post. $\endgroup$
    – tupos
    Feb 23, 2019 at 11:12

2 Answers 2


Perhaps a more suitable way of generating instances would be with a Particle System?

  • CtrlG Make a Group of a proton and a neutron
  • Make an Emitter object, (maybe a rounded cube, to avoid crunching at the poles?)
  • Assign a Particle System to the emitter
  • No physics, start and end frames at 1
  • If you want to vary the proportion of neutrons and protons, you can 'Use Count' in the settings

Settings to taste, but this produced the illustrated result.

enter image description here

  • Now you can hit 'Convert' in the modifier stack of the emitter.. and..
  • ..Ctrl ShiftA 'Make Duplicates Real'
  • Because the material is not dependent on Object ID, Ctrl J preserves materials

enter image description here

  • $\begingroup$ But I still think you could do everything you describe without joining duplis into a single mesh.. and the option would be left open to have your nuclei components jiggle about.. but that would be another question.. $\endgroup$
    – Robin Betts
    Feb 23, 2019 at 21:04

There is. You can use Particle system's hair to do it. With a sphere as a dupli. It's emitted from vertices, Random unchecked. These are Advanced options. Adjust the dupli's size. When done, convert the particles to mesh. Your nucleus should look like this

enter image description here

Then you can color "protons and neutrons" - select a small sphere; Shift+G > Type; deselect the big sphere; apply material color; checker deselect and add second material color. The result is a two color nucleus.

And if you want a cube you need to subdivide it first. And use vertex groups (make some effort and read about it) for locating different atoms.

  • $\begingroup$ When you say "color protons and neutrons" how shall I do it? $\endgroup$
    – tupos
    Feb 23, 2019 at 11:14
  • $\begingroup$ Checker deselect to add second color. $\endgroup$ Feb 23, 2019 at 11:40
  • $\begingroup$ I tried to follow what you wrote, however, I could not really. I also do not understand what will be the result? Can you please provide more instructions? $\endgroup$
    – tupos
    Feb 23, 2019 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .