# Help with procedural mesh generation

**URL:** <https://forums.unrealengine.com/t/help-with-procedural-mesh-generation/376782>\
**Category:** Rendering\
**Tags:** unreal-engine, procedural-mesh, Blueprint, question\
**Created:** [November 19, 2016, 2:39am UTC](https://forums.unrealengine.com/t/help-with-procedural-mesh-generation/376782 "2016-11-19T02:39:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaviorNT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaviorNT](https://forums.unrealengine.com/u/SaviorNT)\
**Post date:** [November 19, 2016, 2:39am UTC](https://forums.unrealengine.com/t/help-with-procedural-mesh-generation/376782/1 "2016-11-19T02:39:25Z")

</div>

Looking at generating something that looks like this:

 ![115526-proceduralmeshhelp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/2/0d252e52c129315518bc184bb7f5af0d94f04fe8.png)

The idea is for there to be a sphere (or multiple spheres blobbed together in the center, followed a a series of “hoops”. The amount of hoops depends on some data, and they should scale outwards in XY fashion, maintaining their Z scale.

Ideally, this should 3 different materials, 2 for the sphere (say, a and b) and the third for the rings (c). If there are multiple spheres, they should cycle between the 2 materials: a, b, a, b, a, etc…

Any help on how I would get started on generating something like this would be immensely helpful, I tried to come up with something in blueprints, and the engine crashed on me :\

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [November 19, 2016, 4:03am UTC](https://forums.unrealengine.com/t/help-with-procedural-mesh-generation/376782/2 "2016-11-19T04:03:28Z")

</div>

parametric equations for a torus requires a bit of trigonometry, using sine and cosine to translate between Cartesian and polar coordinates, allowing you to plot out circles. once you can make a circle, you can make a circle of circles, which is a torus.

> **[Parametric Equations -- from Wolfram MathWorld](https://mathworld.wolfram.com/ParametricEquations.html)**
>
> Parametric equations are a set of equations that express a set of quantities as explicit functions of a number of independent variables, known as "parameters." For example, while the equation of a circle in Cartesian coordinates can be given by...

> **[Torus -- from Wolfram MathWorld](https://mathworld.wolfram.com/Torus.html)**
>
> An (ordinary) torus is a surface having genus one, and therefore possessing a single "hole" (left figure). The single-holed "ring" torus is known in older literature as an "anchor ring." It can be constructed from a rectangle by gluing both pairs of...

x = (c + a cos v) cos( u )   
y = (c + a cos v ) sin( u )   
z = a sin v

---

<div class="post-metadata">

**Author:** ![Fr3qee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fr3qee](https://forums.unrealengine.com/u/Fr3qee)\
**Post date:** [March 25, 2022, 4:31pm UTC](https://forums.unrealengine.com/t/help-with-procedural-mesh-generation/376782/3 "2022-03-25T16:31:41Z")

</div>

Did you have success generating your tori using procedural mesh generator? Would love for you to share your insights/BP as I am trying to achieve similar.
