Nathan Koch

Procedural Systems: Week 7

Wednesday, September 12th 2018

Procedural Mesh Manipulation in Unity

This week I returned to dynamic meshes in Unity. This time I worked with existing models (both Unity primitives and subdivided models created in C4D) while I learned how to play with the mesh data programmatically.

Sketch 1: Moving vertexes

I chose a few vertexes directly and moved them in the y direction during the update loop. It became clear that the shape will break pretty quickly under these circumstances.

Week 7 1

Sketch 2: Noise displacement on one side of a cube

I created a list of vertexes along one side of the cube, and moved those along their x axis only.

Week 7 2

Sketch 3: Noise displacement on one side and one edge of a cube

Once I had a way to keep track of one side of a cube, I was also able to work with the top edge of the chosen side.

Week 7 3

Sketch 4: Moving points within one side of a subdivided cube

I created a cube with several layers of subdivision in Cinema 4D, and moved just those vertexes. Triangulation in Unity is still a bit confusing to me – hard to make attractive forms with these hard triangled edges.

Week 7 4

Sketch 5: Noise displacement across subdivided cube

I wanted to recreated a 4D Perlin noise technique I used frequently in Houdini, real-time in Unity. I think I would need significantly more geometry in the shape to create the effect I was originally looking for.

Week 7 5

Sketch 6: Manipulate just one side within a subdivided cube

This sketch wasn't completely successful. I want to get clean square shapes, and I ended up with a form that looks stretched slightly as it pulls out. Moving vertexes is definitely not the same as animating an extrusion, as it doesn't create the additional geometry necessary for it to stay clean and flat.

Week 7 6

Week 5 code

Code for this week's Procedural Systems sketches is available on GitHub