Making Acid Sand

Let's make classic acid. A material that slowly destroys other materials over time. It's an easy one to get started with.

Create new sand

new sand

Click the new button in the editor. This will copy the current edit sand to give you a starting point for your new sand material.

new name and visuals

Give your sand a new name, an acid like color and toggle the variate, blur, Extend Radius flags on under the visuals. We're making acid be liquid like thus we want it a bit blurry, and radius extended.

Physics settings

acid physics settings

Ensure acid tries to move to any direction (when it cannot move to its velocity based destination). Make sure acid is affected by gravity and forces, and give it full liquidity. Lastly, give it viscosity of 20.0. Acid will then attach to other acid and move a bit more like honey.

Draw some acid.

acid moving


Give acid a characteristic: CORRODES. You can add your own, but this one is provided.

Your acid is ready now.

Reactivity to other materials

Acid itself does not need any rules, but we need some other (any you wish) material to be able to react when it touches acid. For this, we have a convenience function in the Editor's Rule Editor.

rule editor button

Open the Rule Editor and select Sand for edit.

select sand

Right-click the graph background and select function Sand Utils: Transform on touch another characteristic. Add also node Input: Get Position. Connect the position to the top of the transform node. This position is needed for the probability calculations. Also connect Input: Get Sand to the sand input in the transform node.

Then add CORRODES to the first char_1_in input. And add a probability of 0.05. becomes_1_in stays Empty.

Now connect the output of the transform node to Output.

It should look like this.

sand and acid graph.

We're saying: If sand touches another sand with characteristic CORRODES, sand will turn to Empty at probability 0.05 calculated each frame. Therefore, in one second (20 frames, sand will likely have turned to empty when touching a corroding material (acid)).

Acid should now dig through sand.

acid dig through sand

Any material you wish to react to CORRODES should have a rule in its graph for such a reaction.

Was this page helpful?