This week in Mirage #3

Thermal ero­sion is now ful­ly port­ed! There isn’t a very notice­able dif­fer­ence this time around, I think it looks a bit bet­ter though (but maybe I’m biased!).

I also changed the set­ting names to make them eas­i­er to understand:

  • Repose Angle is now Threshold
  • Iterations is now Time

They are also short­er too, so they work nice­ly in Blender’s new UI.

Also, some bad news. I was mak­ing ter­rains seam­less while they were gen­er­at­ed, but ther­mal ero­sion has to run after that. And since both ero­sions mod­i­fy the ter­rain, the seam­less effect is bro­ken when using them. So now I have to find a com­plete­ly dif­fer­ent way of mak­ing ter­rains seam­less. One step for­ward, one step back I guess 🙁

After I was done with ther­mal I decid­ed to take a lit­tle detour from ero­sions to improve the way I’m gen­er­at­ing the ini­tial heights. I used to gen­er­ate the ini­tial heightmap and the x/y ver­tex coor­di­nates at the same time and store them in a vec­tor of tuples (like a list of tuples in Python). While this might have a small per­for­mance gain (which is why I did it in the first place). It cou­pled ter­rain gen­er­a­tion with the mesh’s geom­e­try which made heightmaps com­pli­cat­ed. It was also annoy­ing to work with when the heights had to be mod­i­fied (since I had to replace the entire tuple).

One of the hard­est things about mov­ing from Python to Rust is shak­ing that fear of loops killing per­for­mance. Some loops in Rust even have no over­head at all!

Next up

Now that the heightmaps issue is done, it’s time to get back on track with hydraulic erosion.

If you want to have a seat in the first row when the next ver­sion of Mirage is released you can check it out on the BlenderMarket.

All the posts you can read
VariousAddon, Blender, BlenderMarket, Development, Mirage, Python21.10.2020