This week(s) in Mirage #7
Welcome to another productive week for Mirage! This time I focused on fixing seamless terrains.
Seamless terrains have matching edges and can be tiled and repeated.
I had this working a while ago at the noise generation level. The Perlin function I’m using is periodic, so it’s possible to grab coordinates outside of the terrain and interpolate them with the noise in the terrain to make it tileable.
This worked just fine early on. But after porting the modifiers I realized there was a lot of post-processing that broke the effect. Adding erosion, for instance, changed the whole terrain and turned it non-tileable again.
Seamless is a modifier now. It works by taking opposing edges and interpolating between them, then setting the result of that interpolation as the new edges. Finally, the new edges are blended with the terrain over several columns or rows. This last step can be controlled with the transition setting. Though I recommend keeping it high so the change looks natural. The seamless effect is applied last so it works with erosions, terraces and everything else.
I also hacked on the Map2D
datatype some more. Water and Thermal erosion are using it now, and you can use it to make maps of any type. I simplified parts of the code, fixed a few bugs for non-square maps, added a function to get 1D indices, and added more unit tests. I will be posting this code soon!
Next Week
- Work on materials
- Review non-square terrains. They are not working with either erosion, and have several other bugs.
- Keep fixing stuff 🙂
If you want a seat in the first row when the next version of Mirage comes out you can check it out on the BlenderMarket.