Craft’s magic tricks

In a recent Craft project, we worked together with OOI to create a simulation that teaches students the protocols of isolating tubes, aka keeping heat in or out.

A lot of these operations involve cutting into the isolation material. To realize this in the virtual world, we’ve had to come up with some ideas that we’d like to share with you all.

Angled Cut

Here we see our standard cutting operation. Instead of going with procedural mesh generation, we simply modeled a building block that is cut at 45 degrees which we can scale based on the cut angle.

When applying the cut operation, we reduce the base shape in size and add this shape at the according scale.

 

Non symmetrical shapes

This got more complex with non-symmetrical shapes. Some isolation material is bought in halves!

To implement this feature, we had to make more building blocks. That was quite an investment, as the material had a bunch of variations in size and isolation thickness.

Taper Cut

We repeated the same building-block-trick for a bunch of other cut operations. To taper the material from a larger to a smaller tube radius, students need to learn how to cut the material so it can be bend into the correct shape.

Here we took the liberty of having only one model for all cut operations that we do scale in X, but the cuts won’t get wider in shape. We got away with it as the difference is rather small.

Hole Cut

Cutting a small hole did have noticeable changes in shape, so we needed to come up with a different solution.

For this purpose, we created a shader that projects a small dark circle on the material that represents the hole. It does not actually affect the shape, but does enough to communicate what happened.

Concave Cut

To isolate a T-junction, students have to cut concaves. First we thought we could solve this using the same building-block-trick, but it needed more magic. Some T-junctions are not set at a 90 degrees angle and therefore some concaves have angles other than 90 degrees.

To simulate this operation, we wrote a shader that uses a second UV channel to offset vertices based on a provided angle.

The shader uses the green colour to check whether to push the vertex out or not (the base edge loop needs to stay in place). The red colour is used to multiply the offset of the vertex.

Conclusion

Combining the different modifications was tricky because of the different offsets. In hindsight we figured we should have done everything using mesh generation. But in the end the features are fulfilling their purpose, which is teaching students the craft of isolation!