Polyhedron Procedural Meshes in Unreal Engine
Using this UE5 plug-in, you can quickly add procedurally-built Polyhedron meshes in your UE project. The meshes include UV Mapping and Tangents for normal-maps.
The main user interface for the plug-in is the APolyhedronConway Actor. It has the following properties:
ConwayPolyhedronNotationdetermines the shape of the polyhedron. See below for more details.Scalewill size the polyhedron to fit a sphere with a radius of Scale.EnableCollisionenables the collision and physics geometry on the primitive component. Please use this feature carefully, since UE has trouble with large complex physics geometry.Materialis the one-and-only material applied to the entire Polyhedron. The PolyhedronComponent supports multiple materials; you will need to write C++ code to leverage this feature.UVGenerationcontrols the generation of texture coordinates. See below for more details.
In the PolyhedronConway actor, you will need to write a notation string that includes a starter polyhedron and a sequence of Conway Polyhedron Notation operations. This string is parsed from back to front.
The following starter polyhedra are supported:
A<n>Antiprism where<n>is the number of vertices at each base.<n>must be >= 2. A special case:A2makes a Tetrahedron.CCubeDDodecahedronIIcosahedronOOctahedronP<n>Prism where<n>is the number of quads at the sides and the number of vertices at each base.<n>must be >= 3. For example:P3makes a Triangular Prism andP5makes a Pentagonal Prism.TTetrahedronY<n>Pyramid where<n>is the number of vertices at the base.<n>must be >= 3.
The following operations are supported:
aAmbobBevelcChamferdDualeExpandgGyrojJoinkKis or TriakismMetanNeedleoOrthosSnubtTruncatezZip
I can add more starter polyhedra and operations on request.
| Notation | D or dI |
tI |
tktI |
eC |
|---|---|---|---|---|
| Regular Dodecahedron | Soccer ball / Truncated Icosahedron | Golf ball | Expanded Cube |
For more details on Goldberg Polyhedron and its notation: https://en.wikipedia.org/wiki/Goldberg_polyhedron.
dIis GP(1,0).tIis GP(1,1).tktIis GP(3,3).tktktIis GP(6,6).
Three Texture Coordinate Generation functions are offered. Unreal will automatically generated the tangent-space so that you can apply normal maps on the Polyhedron. You can also disable texture coordinate generation.
Nonedisables texture coordinate generation. You should disable texture coordinates if your material has tri-planar mapping or uses cube-maps.Cellulargenerates texture coordinates to keep the center of each polygon at the center of the texture and to grow each polygon as large as possible within the texture. This UV generation should be used to project one texture map unto each polygon of the polyhedron. This works well when each polygon is intended to have gameplay value.Sphericalgenerates texture coordinates by applying a spherical projection. This generates texels of non-uniform sizes. This UV generation should be used to project one texture map unto the polyhedron. This has a known problem at the poles. This works well to build planets or asteroids.Cubicgenerates texture coordinates by applying a cubic projection. This generates texels of non-uniform sizes and will show seams. This works well for props.
You will need to enable the official UE "ProceduralMeshComponent" plug-in before the Polyhedron plug-in can work.
Based on the Polyhédronisme project. Copyright 2019, Anselm Levskaya. The PolyhedronConway actor notation is intended to match Polyhédronisme's notation. See the Polyhédronisme User Interface for more details.
Based on earlier work from George W. Hart.