Chainbot

I dusted off a prototype I threw together years ago, the Chainbot. It was composed entirely of gray boxes so I gave it some polish with proper art assets. Designing the robot allowed me to finally learn Modo’s live boolean toolset Mesh Fusion. It was also a great opportunity to develop my Mesh Processor further and implement the features I didn’t have time for previously. Here is the result:

The code

As usual I used Unreal’s Blueprints to set up the “game mechanics”. The main components (chain driver box, suspensions, etc) are positioned manually while the chain itself is generated procedurally so the number of links can be changed in-game.

The chain links are physics driven static mesh components in the bot actor but they are moving independently from the root component. To create the illusion that the parts are a single system and the chain carry the main body I reposition the root every frame based on the locations of the links closest to the top center of the ring.

 

The main body keeps tracing downward from a few locations to measure the average distance from the ground and rotate the suspension arms when necessary for more clearance.

Chainbot ChainBot02 300x211

The bot is looking around randomly by rotating the eye piece. When moving backward the whole head rotates by a certain amount. These very simple mechanics add a surprising amount of “life” to the creature.

The walking is achieved by brute force IK where each branch of the broken chain is constrained to an invisible target. When a target is repositioned (by holding the left or right buttons and moving the mouse) then another target is activated: it pulls the still planted leg so the overall posture remains in balance. (At least visually, the physics simulation is 2D and helper constrains keeps things stable no matter what.)

The robot model

Every part of the robot was modeled in Modo using its live boolean tech: the final surface consists of simple subdivision surfaces (spheres, boxes, cylinders, etc) and union, subtraction, intersection operations between them. The whole thing remains “live” so mesh transforms and topology can be modified at interactive speeds, making experimentation and tweaking easy.

I assembled the machine parts in Modo to iterate on dimensions, structure and fine tune the overall look before transferring the mesh to Unreal. When a part was done the frozen mesh was exported and fed into my mesh processor tool in Houdini.

Chainbot ChainBot01 300x226

A most pieces can only be seen from a single side so I set up the importance based tool so the bulk of the detail (polycount and texture resolution) is facing the camera. The unseen areas are super simple but not deleted so the shadows are not truncated and distance field generation doesn’t suffer.

The texturing was done in Substance Painter using materials and alphas from both Substance Source and Gumroad. First I finished the head and saved the layer stack as a smart material which was then applied and fine tuned for every other machine part.

The environment
Chainbot ChainBot03 279x300

The environment pieces were modeled after the graybox level I originally built for the prototype. Each mesh is unique and was sculpted using Modo’s multiresolution (image-less) tools.

Chainbot MeshProcessor20 300x300

The SDS meshes had unwrapped UVs where I wanted to control the flow of the textures. (For example the rock layers on the side of the rock formations or the wood grain on the plank ramp.) This data was maintained throughout the next step (processing the high poly mesh in Houdini) and got baked into a texture.

 

Since the camera path is very constrained it was fairly easy to set up the simplification so the polygons and texels are spent where they matter the most.

Chainbot MeshProcessor21 300x190

The baked UV data was used in Substance Painter to control the projection of underlying materials. (For more on how it works click here.)

 

As per usual I used ArtEngine to generate a bigger scope for almost all of the Substance materials.

Chainbot ChainBot04 300x207

The plants are mostly from the excellent Megascans library and they only received some color correction in Unreal. I created meshes for a few of their textures where I wanted to customize the look.

 

I placed the bigger plants by hand as static meshed while painted the rest as foliage.

Chainbot ChainBot05 300x216

The wooden pieces, barrel and coffin went through the same Modo – Houdini – Substance Painter pipeline like the rest of the environment but I bought the zombie from CGTraders.

Chainbot ChainBot07

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/zoltanec/public_html/pages/wp-includes/functions.php on line 4556

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/zoltanec/public_html/pages/wp-includes/functions.php on line 4556