This week(s) in Mirage #7

Welcome to anoth­er pro­duc­tive week for Mirage! This time I focused on fix­ing seam­less ter­rains.
Seamless ter­rains have match­ing edges and can be tiled and repeat­ed.

I had this work­ing a while ago at the noise gen­er­a­tion lev­el. The Perlin func­tion I’m using is peri­od­ic, so it’s pos­si­ble to grab coor­di­nates out­side of the ter­rain and inter­po­late them with the noise in the ter­rain to make it tileable.

This worked just fine ear­ly on. But after port­ing the mod­i­fiers I real­ized there was a lot of post-pro­cess­ing that broke the effect. Adding ero­sion, for instance, changed the whole ter­rain and turned it non-tileable again.

Seamless is a mod­i­fi­er now. It works by tak­ing oppos­ing edges and inter­po­lat­ing between them, then set­ting the result of that inter­po­la­tion as the new edges. Finally, the new edges are blend­ed with the ter­rain over sev­er­al columns or rows. This last step can be con­trolled with the tran­si­tion set­ting. Though I rec­om­mend keep­ing it high so the change looks nat­ur­al. The seam­less effect is applied last so it works with ero­sions, ter­races and every­thing else.

I also hacked on the Map2D datatype some more. Water and Thermal ero­sion are using it now, and you can use it to make maps of any type. I sim­pli­fied parts of the code, fixed a few bugs for non-square maps, added a func­tion to get 1D indices, and added more unit tests. I will be post­ing this code soon!

Next Week

  • Work on mate­ri­als
  • Review non-square ter­rains. They are not work­ing with either ero­sion, and have sev­er­al oth­er bugs.
  • Keep fix­ing stuff 🙂

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

Various(Addon, Blender, BlenderMarket, Development, Mirage, Python)Last updated 13.09.2019
All the posts you can read

No comments yet

Leave a Reply

Your email address will not be published.