How to create a torus for an atom?

Would anyone know how to create a torus within blueprints? Here are a few examples of what I need to create. Hydrogen, Oxygen, to create Water (Yes, this is what an atom actually looks like:

Real Life Hydrogen Atom:

aacf0d2761b63246dd04d895d075f654c45502bc.jpeg

Modeled Hydrogen Atom:

Modeled Oxygen Atom:

Water Molecule:

art_quantum.jpg

That would be problematic due to the amount of shapes / models I would need to design. There should be a way to do it with blueprints and the spline mesh tool, however, when I tried to hack something together, it crashed the engine.

See if you can adapt this to your needs:

This generates points on the circumference of a circle, the points are later on assigned to a spline. You can get rid of *Tilt *and *Ellipse *if you do not need them, of course.

The actor’s constructor:

The end result which can now be adorned with spline meshes:

edit:

I think there was a bug in 4.13 where if you tried to *Clear *spline points of a ClosedLoop spline, the editor would terminate in a less than elegant way. The bug may still be there but the above solution should work.

Sweet! That is almost exactly what I was looking for. I’ll give it a go tomorrow. Again, thank you.

Needed to smile reading this :wink:

I’m curious, what are you actually trying to do?

The bigger picture in all of this? Making a game in which the player is an explorer of sorts, investigating various planets for human colonization. Part sim, part RPG, all based on real science. For designing the atomic structure specifically? The player will be able to get perform experiments on various samples gotten from the planet, and then “deep dive”, visually speaking, into what makes up that sample, from seeing what compounds make up the sample, to the molecular structure of those compounds, to the atomic structure for those molecules, all the way down to the quantum structure. There will also be fires and explosions of course, can’t make a game without having explosions, can we? :slight_smile:

On the smaller scale, the scientific subsystem I’m designing for that game, will be released as a project for free (see my Chemistry! thread in WIP). This will, or rather, should be, a good project for e-learning, testing, real-time visualizations, and calculations. This is only the first part of the project, chemistry. I also need to work on systems for astronomy, biology, geology, oceanography, Newtonian physics, planetary science, and quantum physics.

You should play with particle effects. First learn how to do them, there is great module for you: orbit.

When you know a bit about particles play with GPU accelerated ones, you can create thousands of those. They have limits compared to CPU particles but for creating atoms it is all you need imo.
You probably could simulate those cloud shapes with bunch of cylinder spawning areas, then making them fuzzy with orbit modules.

However if shell of those shapes is what you need, you should look into custom meshes created by blueprints, but this will be a lot of work to properly model such surfaces from code.

Yea, the particle effects will be useful when I get to displaying forces and energy. I could do the same concept with particles as to what I am trying to achieve, but with the potential for VR usage, I fear that generating that amount of particles will be a huge detriment to frame rate.

Ahh particles and VR, they do not like each other. Some particle effects look very fake in VR.

Edit:
Thinking a bit more about all this. Easiest way to make it is to C++ into mordor.
Yes i know you may not know C++ and it may be scary.
But follow tutorial about how to setup visual studio.
Then look how to make simple blueprint node (this is very easy).
And finally hardest part is writting those loops that generate shapes.
But because it is C++ you probably can find code examples that do just what you need.
At that point it is matter of translating that code into unreal C++ code.

C++ is probably easier because blueprints can get messy for such code.

Just wanted to give a quick update on this. After having issues the past couple of days with generating the splines and spline mesh components to do what I needed, I had a bit of an “Eureka!” moment while making ramen. Decided to go the easy way out (for myself, and for the engine), and just made a quick torus in Max, 5cm diameter, 200cm radius, and imported into the engine. Works like a charm :slight_smile:

I figure that the engine was giving issues due to the origin point on the splines, and needing to “layer” the splines, up to 4 different layers, with each layer needing up to 18 torus meshes.

Can’t believe I didn’t think of this sooner >.< Oh, and the scale of my water molecule that I designed in Max? Well, it was WAAAAY off. Extremely way off.

Here, this makes a procedural mesh torus.

But are you sure the geometry your looking for isn’t more like electron orbitals?

Edit:The node directly under the second for loop node is a cross product, in case it is unclear.

That is exactly what i was writing about. You have C++ source for creating orbitals. All you need to do is learning how it works and copying it to unreal.