This week(s) in Mirage #6

03.09.2019 @ Various(Addon, Blender, BlenderMarket, Development, Mirage, Python)

Whoa, how long has it been? Wasn’t I sup­posed to do this every week? These last few weeks have been crazy with work, life, the release of Blender 2.80, Mirage 3.2 and Render+ 2. But that’s all done now. Time to get back on the horse! The good news is that I still man­aged to put some work on the new ter­rain engine.

I imple­ment­ed a new Map2D type to hold the ter­rain and ero­sion maps. This new type lets me reduce a lot of com­plex­i­ty, add some more unit tests and in gen­er­al, make every­thing more pleas­ant. The only miss­ing bit is improv­ing the code to find neigh­bor cells. Once I’m done I will share Map2D here since I’m sure it will be use­ful to any­one work­ing on heightmaps.

Water ero­sion got some more pol­ish. Now it has bet­ter defaults, so you can see an effect right away. I’ve most­ly fixed the code for springs. Mostly. There are still sit­u­a­tions when it will cre­ate spikes, but you have to crank ero­sion or water amount to see them.

I’ve also revert­ed one of the last changes in the rain code. I had it using the same code as springs to drop water on the ter­rain. This was great for me (less code), but not so much for per­for­mance.

Water from a spring carv­ing its way down

Terrain Types

Terrain types are a cool new fea­ture that replaces almost all the pre­vi­ous set­tings. After a lot of try and error, I found that one-size-fits-all set­tings don’t work well with ter­rains. Not if you want an intu­itive UI. So instead of hav­ing a group of set­tings to gen­er­ate any kind of ter­rain we now have dif­fer­ent types of ter­rains, each with their own algo­rithm and options. I’m includ­ing 2 ter­rain types for this ver­sion:

Smooth hills which cre­ates smooth rolling hills and val­leys, and Mountainous which cre­ates dif­fer­ent kinds of moun­tain ranges. An exam­ple of how the types sys­tem works is ridged­ness. This is only an option for moun­tains, since it would­n’t make sense for hills to be “peaky”.

In the future ter­rain types could also extend to oth­er areas. Materials, tree/grass dis­tri­b­u­tion (accord­ing to bio­mes) and more. I plan on adding more types going for­ward, like dunes, desert canyons and more. Island could become a ter­rain type too (instead of a mod­i­fi­er). Let me know in the com­ments if there’s a kind of ter­rain you would like to see.

Next Week

We are com­ing around in terms of fea­tures, so now it’s time to start sta­bi­liz­ing and pol­ish­ing.

  • Work on seam­less ter­rains again. I have an idea on how to do this now.
  • Improving neigh­bors on Map2D and use it in more places
  • Start plan­ning new mate­ri­als

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.

All the posts you can read

No comments yet

Leave a Reply

Your email address will not be published.