Asset Store Link: https://assetstore.unity.com/packages/slug/377238
Minor Deity on Steam: https://store.steampowered.com/app/3876240/Minor_Deity/
Minor Deity Discord Server: https://discord.gg/2NEb4HxwhF
A couple of months ago, I participated in my first 48-hour game jam. I needed a handful of simple, rotationally symmetric models, so instead of modeling them by hand, I built a little potter's wheel tool that turns a 2D profile into a 3D mesh. It worked well enough for the game jam, but it was missing some important features. I'd also always been curious about what it takes to publish something on the Unity Asset Store, so I decided to turn this quick prototype into something polished enough to publish. Here's how I built it, improved it, and got it published.
My original tool did not cater for unwrapped UVs since I only used solid one-color materials. To support textured materials, I needed to generate UV coordinates, duplicate vertices along the UV seams, and fix the normals where the mesh splits to unwrap the UVs. But let’s start at the beginning – the profile curve.
We can specify the required radius of the mesh at each point across its height by a normal Unity animation curve. Depending on the chosen height resolution, we then step through this curve in discrete steps to get the Y coordinate. At each step, we sample the radius, and then step through 0- to 360-degrees by the chosen radial resolution and use the radius multiplied by the sine and cosine for the X and Z coordinates to form a circle of vertices around the object’s up-axis. These resolutions can be used to obtain the required level of detail, while the height and radius multipliers determine the overall size of the object.
We get indentations or bowls by reversing the direction of Y-coordinate, and can also reverse the reversal for the mesh to head upwards again, giving us water-feature like objects. Of course, this needs to be closely aligned with the radius curve to be sensible. I’ve also implemented a feature that reduces triangles by combining steps where the slope of the radius curve is small. The sensitivity of this feature to slopes can also be changed to create different level of detail versions of the mesh, while we could also reverse the order of the radius curve.
00:00 My First Game Jam
00:34 The Animation Curve
01:27 Different Parameters
02:17 UV Maps and Normals
03:39 Publishing to the Asset Store
04:19 Financial Support
04:46 Outro