The procedural monster, MASH

25.01.2018 Home >Blog >The procedural monster, MASH

MASH was brought under the Autodesk umbrella in 2016, and positioned Maya as a viable alternative to Cinema 4D for motion graphics. Using a pallet of different procedural and dynamic nodes MASH gives artists the ability to create massively complex meshes from very few inputs.

For this blog, Mark is taking inspiration from 3D art from across the internet, and will work through a couple of MASH workflows to demonstrate its potential, and how easy it can be to use.

Part 1 – Distribution

For starters, here’s “Flower Girl” by Jean-Michel Bihorel, which looks perfect for trying out some procedural networking.

Let’s start with a simple object that we want to replicate, I’ve chosen to create a butterfly. This will form the basis of our MASH network.

After we’ve created our object, selecting it and clicking on the MASH button will create a basic Distribution Node to get us started.

A nice grid of butterflies. MASH automatically hides the original butterfly, so everything we see here is procedurally generated from that mesh. Setting such as the size and scale of the network can all be controlled from the attribute editor, and at any point you can go back and edit your original model to affect the whole network. So far this distribution is very unnatural, so I’m going to add a Random Node to the network and then tweak some of the settings.

Now we can see how the Random Node behaves, allowing us to give each butterfly a bit of character and making it look more like a flock than a network. This is still a mile away from the original art though, so we’re going to need to change the underlying shape to something more appropriate. I’m going to use a Head as I have one to hand. Add your base model to the scene, set the original Distribution Node to be ‘mesh’, and drag-drop the Head mesh from Outliner onto the MASH node.

Ok, that’s terrifying. We don’t need to see the original head any more so we can hide that. I’m also going to give a bit of life to the butterflies by getting some of them to fly away. That can be achieved with another Random Node with the Position modifiers increased. Then to ensure only the uppermost butterflies are affected, we need to create a Falloff Object by right clicking in the relevant section of the Random Node tab, and then position the object over the top of the head.

Not a bad effect. Adding a couple of lights and rendering gives the following result. Not quite on par with Jean-Michel’s work, but not bad for a first attempt

Part 2 – Dynamics

Next up let’s try the Dynamic Node, which gives every object inside the MASH network physical properties that interact with gravity and each other. For this example, I’ve chosen a real-life installation of a giant marble run by COS and Snarkitecture.

First up, we need our track. For this I’ve taken a simple Helix primitive and stretched sections of its vertices to create a rail. There’s no need to go into great details of complexity as MASH will multiply our efforts later. I found that it’s a good idea to have a nice straight section to start with so that the marbles can be easily placed. You should also try and keep a constant decline throughout the track to prevent the marbles getting stuck.

Duplicating this rail and then increasing the Width of the Helix gives us a nice simple track to work with. Make a note of the Width increase for later.

Group the two rails together and then create a MASH network from the group. It’s worth noting that if you don’t group the objects first, MASH will intelligently assume that you want the objects to exist as separate elements and base the result on this.

We want a single track rather than two independent rails, so the grouping is important. Create as many Distribution instances as you like and add some rotation and distance to create something resembling the original installation, or whatever you fancy. Once you’ve done this, select the MASH_Repromesh result in Outliner and create another MASH network from this, and set it to be a network of 1. You shouldn’t see any difference but this is very important so that the track functions as a single entity for the Dynamics we’re going to add next.

Create a Dynamics node on the second network and press play to see what happens. Hopefully you see a nice solid network of tracks falling through space, but equally you might see them bounce up into the air. If it’s the latter, then (like me) your network is starting life stuck below the ground plane that MASH creates (a dotted yellow square labelled BulletSolver). You can fix this simply by adding a Transform node and moving it up until it’s clear.

A tumbling track isn’t much use, so we need to lock it in place. To do this, we need to add a Constraint to the Dynamics node and double click to modify it. Set the Constraint to Custom, Connect to Input Points, and also set the Rotational Limits to Fixed to stop your track wobbling about.

That’s the track built: now we need some marbles. Create a simple Sphere, set its diameter to be a tiny bit larger than the width offset you used between the two rails earlier, and then create a MASH network from it. Using a Transform node, move the marbles to the start of the track and line them along the middle of the rails. Assign a Dynamics node and press play … good luck!

In an ideal world, you now have a trail of marbles racing down a track and whipping round the corners with ease. In reality they may fly off at the first corner, or roll like they’re making their way through treacle. Play around with the levels of Friction for both the marbles and the track, along with the Mass, until you start seeing a result that works for your setup.

I also found it useful to set the Collision Shape to Sphere under the Dynamics node; this seemed to give more accurate and faster result than the default Automatic setting. Once you have one set of marbles behaving themselves, duplicate the above steps to create marbles for each section of track to complete the illusion.

Here’s one I made earlier.

Part 3 – Flight

I started this blog talking about motion graphics, so for the final piece I’m going to try and use some of the untouched MASH nodes to create a graphic for the YellowDog logo. Using Flight and Merge I’m going to try and create a flowing Plasma Ball effect, which I’m hoping looks the part.

The Flight node creates a dynamic network of attraction and repulsion between individual MASH elements and the centre of the network. The result looks a lot like a flock of birds chasing each other around the sky. The Merge node allows us to blend together two MASH networks, specifically the location of their elements for this example. Hopefully the interplay between these two nodes gives us an interesting result.

First, we need a target for the flock. For this I’ve created a basic Distribution network of spheres spread over the surface of the YellowDog logo. Each of the MASH elements in this network will be used as a target for an element in our Flight node so they need to have roughly the same number, I’ve used 2000. Once this has been created you can hide the entire Network – we don’t need to see it as it’s only for reference.

Next up we need our Flock. Create another MASH network the same size as your Target and add a Flight node to it. I’ve also added a Random node at this point for a bit of variety in the network. The Flock node should create a large green and small pink region in your viewport, surrounded by a blue circle. These are the areas of influence that affect how your Flock behaves, the pink is the centre of mass of the Flock that all members will try and get back to, the blue is the boundary of the flock that elements will turn back from if they get near or pass it, and the green is the area between the two. These regions will adapt to your network and move as it does. Press play and see what happens, you should see your flock spring into action.

Looking good! Next up, we need to utilise our target via a Merge node. Create one on the second network and drag your target network into the Child Node input. Next, create a Falloff object centred about your target, and select Invert Falloff under its settings. This now means that any Flight elements caught inside the Falloff area will be attracted towards the YellowDog logo and will stick to it if they get close enough. you may need to adjust the size of the Falloff area until the effect looks right.

At this point, the Merge node also affects the Random node I added earlier, making it less powerful and amplifying the effect of the Flight by adding further change to just its position away from the target. You may need to replay your animation from 0 for all changes to take effect.

That’s quite a cool effect for only a couple of inputs.

I could probably leave this here but I’m going to squeeze in one final node, and that’s Colour. As you might expect, the Colour node allows you to alter or randomise an object’s colour. This is quite a handy way to add variety to network elements that would otherwise only receive a single material. In this case I’m going to add some randomness to the blobs so that they don’t blend together.

There we go! Depending on your render engine, you may need to tweak some settings for the Colour node to have any impact. With Arnold I found that I needed to set my material’s colour to be an aiUserDataColor map, which interestingly also disables the Colour node visibility within the Viewport, so I found that some back-and-forth was needed to get it just right.

Here’s the finished result!

So, three very different results from one simple toolset. Hopefully that showcases the versatility of MASH and encourages you to try your own experiments. I promise you’ll enjoy it.



Share this: Latest Blog Articles
The Importance of Rebuilding the Economy With a Sustainable Mindset 06.08.2020
Interview with Marie-Lou Merceron – Customer Success Manager 03.06.2020
Cloud Technology and the Rise of the Super Model 21.05.2020
YellowDog Please upgrade your browser

You are seeing this because you are using a browser that is not supported. The YellowDog website is built using modern technology and standards. We recommend upgrading your browser with one of the following to properly view our website:

Windows Mac

Please note that this is not an exhaustive list of browsers. We also do not intend to recommend a particular manufacturer's browser over another's; only to suggest upgrading to a browser version that is compliant with current standards to give you the best and most secure browsing experience.