Mirage 3.4 is out today!

The time has final­ly come. Mirage 3.4 is out today! The high­light of this release is the new ter­rain engine.

It’s been a while, has­n’t it? This has prob­a­bly been the longest time between releas­es, but there’s a good rea­son for the delay!

Mirage 3.4 comes with a new ter­rain engine com­plete­ly rewrit­ten in Rust for top-per­for­mance. I’ve code­named the new engine Pangu, for the cre­ator of the world in Chinese mythol­o­gy. He sep­a­rat­ed the Yin and Yang with a swing of his axe, and then split the heav­ens and the earth with his own arms. Pretty cool, huh?

Performance isn’t the only thing the new engine is bring­ing. Terrains can have any res­o­lu­tion now (no more pow­er-of‑2 lim­i­ta­tions), and they can even be rec­tan­gu­lar. Height now works prop­er­ly too. You can move and rotate the gen­er­at­ed ter­rain with the off­set and rota­tion set­tings now. Offset can also be used to make tiled ter­rains, which com­bine into a larg­er ter­rain (I’ll auto­mate this in a future release!).

The Scale set­ting lets you con­trol the real-world size the ter­rain rep­re­sents. It can go from a small patch of land to a large area.

My favorite new fea­ture though is the Live Mode. Now we can tweak set­tings and see the changes in real time. This is the first step towards ful­ly inter­ac­tive ter­rain gen­er­a­tion with view­port wid­gets and all. Also, the default pre­sets have been updat­ed for the new engine and there’s plen­ty of oth­er bug­fix­es around too.

While Mirage now uses a bina­ry mod­ule, the code remains 100% GPL. You can find the source code in the pangu_src fold­er of the addon.

Terrain Types

After lots of tri­al and error I found that using a sin­gle algo­rithm for ter­rains isn’t enough to cov­er all pos­si­ble ter­rains. Unless I added a tril­lion options and made the UI look like a flight sim­u­la­tor.

The bet­ter solu­tion is Terrain Types. These types relate to real world kinds of ter­rains. Each one has its own algo­rithm as well as dif­fer­ent set­tings unique to it.

This ver­sion includes Mountainous and Smooth Hills. The first gen­er­ates alpine ter­rains, while the sec­ond one cre­ates rolling hills. I plan on expand­ing on this con­cept in the future with more types like desert, canyon and more. Even includ­ing a cus­tom ter­rain type where you can pick and mix dif­fer­ent nois­es to cre­ate the ter­rain.

Terrain types to cover more kinds of landscapes

New modifiers

Terraces

The new Terraces mod­i­fi­er replaces the stra­ta mod­i­fi­er, as well as the plateau and sea floor set­tings. You can now decide how many ter­races to gen­er­ate in the ter­rain and at which height they will hap­pen. By chang­ing only the high­est ter­race you can repli­cate plateau, and by set­ting the low­est you can do the same for sea floor.

Data maps

In pre­vi­ous ver­sions Mirage would gen­er­ate ver­tex groups for slope and height auto­mat­i­cal­ly. These were used by the dis­tri­b­u­tion sys­tem to con­trol where objects were placed. We don’t do this by default any­more.

This makes ter­rain gen­er­a­tion faster, but if you want ver­tex groups or ver­tex col­ors you can enable them using this mod­i­fi­er. Also, if you don’t gen­er­ate them but lat­er decide to add a dis­tri­b­u­tion lay­er both ver­tex groups will be gen­er­at­ed auto­mat­i­cal­ly.

Mirage generating Blender vertex groups

Seamless

This mod­i­fi­er changes ter­rains bor­ders so they can be tiled. It works by tak­ing oppo­site edges and inter­po­lat­ing between them, then the result of that inter­po­la­tion is set as the new edges. The amount of inter­po­la­tion can be con­trolled with the tran­si­tion set­ting.

Seamless terrains for larger landscapes

Others

The edges set­tings are out. Island has become a mod­i­fi­er, while radi­al smooth is now part of the smooth falloff mod­i­fi­er. The smooth lin­ear mod­i­fi­er also has a new start set­ting where you can define at which point the smooth­ing effect goes to zero.

Fluvial ero­sion is now called Water Erosion and has a much bet­ter UI. You can also have springs as a source of water besides rain. Springs are a con­stant source of water that can carve rivers or paths through the ter­rain.

Thermal ero­sion also got a bet­ter UI, it also looks a bit bet­ter than before (IMHO!).

Better erosion for more realistic landscapes

New materials

The old pro­ce­dur­al mate­ri­als have been replaced by images now. While you can get real­ly amaz­ing results with pro­ce­dur­al tex­tures I’ve found the per­for­mance degrades real quick when you make ter­rain mate­ri­als. And in the case of Eevee you can end up hit­ting the mem­o­ry lim­it of your GPU. The only remain­ing pro­ce­du­rals are masks.

Botch the mate­ri­als and tex­tures are CC0. You can do any­thing you want with them, com­mer­cial or not. The sources for all the tex­tures is includ­ed in a text file in the tex­tures fold­er.

What’s next

There’s noth­ing set in stone for the next release since there’s still a lot of research to do, but here’s a ten­ta­tive roadmap:

  • Converting the island mod­i­fi­er into a ter­rain type
  • Adding a new ter­rain type for deserts
  • Create an object instead of a sin­gle func­tion, so more of the ter­rain can be cached
  • Add the first inter­ac­tive view­port wid­gets and set the base for inter­ac­tive edit­ing of ter­rains

All the posts you can read
ArticlesBlender, BlenderMarket, Mirage, Python25.06.2020



No comments yet

Leave a Reply

Your email address will not be published.