Mirage 3.2 is out today!

28.08.2018 @ Uncategorised()

After sev­er­al months of work, I’m launch­ing the great­est ver­sion of Mirage today. In case you’re not famil­iar with it, Mirage is a land­scap­ing addon for Blender cov­er­ing every­thing from ter­rain gen­er­a­tion to vegetation/object dis­tri­b­u­tion. The big news of this release is that it now comes with default mate­ri­als. Finally! And it only took a cou­ple of years to hap­pen 🙂 This new hot­ness includes a new Material mod­i­fi­er for ter­rains, a mate­r­i­al option for rocks and mate­r­i­al tog­gles for the new mod­i­fiers.

Materials come in two fla­vors: with pro­ce­dur­al tex­tures or with emp­ty image nodes. The image nodes option gives you a full set­up ready to open and use your favorite tex­tures, while pro­ce­dur­al tex­tures give you a good mate­r­i­al for far-away shots. In either one you also get masks, node groups and an orga­nized node­tree. Note that mate­ri­als are Cycles-only for now, since Mirage does­n’t sup­port Blender 2.8 yet, how­ev­er they should also work in Eevee if you open the blend file in 2.8.

Rock Materials

Now with modifiers

Noticed some­thing pecu­liar in the last para­graph? “Modifiers”? Yes, the old fea­tures list has now been renamed as Modifiers to fit in bet­ter with Blender. Also, mod­i­fi­er is more self-explana­to­ry. But that’s not the only change.

Terrain Modifiers in Blender 2.79

The old Edge Settings now live in sep­a­rate mod­i­fiers. The Smooth edge option is now part of the Smooth Falloff mod­i­fi­er (for­mer­ly know as Slopes) as the Radial option. The Island option is now the Island mod­i­fi­er and comes with a default mate­r­i­al for the ocean object as well as set­tings to con­trol tur­bu­lence, foam and water col­or.

Finally the Straight Edges option has been reborn as the Diorama mod­i­fi­er. This is uses a dif­fer­ent method from before, the old set­ting sim­ply took the edge ver­tices of the ter­rain mesh and pulled them down. This result­ed in dis­tor­tions, UV prob­lems, issues with ver­tex weight cal­cu­la­tions (eg. height) and hav­ing to man­u­al­ly merge ver­tices to cre­ate a the box. Yup, it sucked.

The new mod­i­fi­er cre­ates a new object for the dio­ra­ma box and par­ents it to the ter­rain. Not only you don’t have to wor­ry about fix­ing verts but it also includes a cap at the bot­tom and is UV unwrapped by default. The box’s trans­for­ma­tions are locked to pre­vent acci­den­tal changes and the height can now be changed from the mod­i­fi­er (of course, you can also just edit the mesh).

The new mod­i­fi­er also includes (you guessed it) a default mod­i­fi­er with a pro­ce­dur­al tex­tures option. One small caveat is that now we have to update the dio­ra­ma object when the ter­rain is mod­i­fied (by sculp­ing for exam­ple). However Blender does­n’t have a way to do this auto­mat­i­cal­ly so there’s a new Update Diorama but­ton in the tools pan­el that you can use to update the select­ed dio­ra­ma.

Faster terrains

On the per­for­mance front I’ve decid­ed to remove the code that ran the ter­rain gen­er­a­tion in a sep­a­rate thread. This allowed Mirage to run the gen­er­a­tion code with­out block­ing the UI while it worked and while this was usu­al­ly quite nice, the code under­neath was a pret­ty ugly hack that abused Blender’s modal oper­a­tors. It caused plen­ty of bugs, made devel­op­ment hard­er (any small excep­tion would make Blender freeze) and actu­al­ly nev­er worked on Windows at all.

Now Mirage’s ter­rain gen­er­a­tion works like any oth­er Blender oper­a­tor and I’ve final­ly learned that com­pro­mis­ing code qual­i­ty for fan­cy fea­tures is a bad idea. Note that if you are using Windows you won’t notice any dif­fer­ence in the ter­rain gen­er­a­tion process. Well, except the fact that it’s now faster.

To com­pen­sate for UI block­ing, I’ve also worked on mak­ing ter­rain gen­er­a­tion faster by improv­ing the code to write heights to ver­tices, gen­er­at­ing ver­tex groups only when need­ed and dis­abling the con­ver­sion of ver­tex groups to ver­tex col­ors by default. Now ver­tex groups for Plateau and Below sea are now only cal­cu­lat­ed if you actu­al­ly change those set­tings. Vertex col­or groups are not gen­er­at­ed by default but can be enabled in the Material mod­i­fi­er. This changes have yield­ed quite a speedup and gen­er­at­ing a ter­rain with a nor­mal lev­el of detail is now instan­ta­neous. I’m con­sid­er­ing oth­er options to improve per­for­mance fur­ther, although right now I’m much more inter­est­ed in find­ing ways to improve ter­rain gen­er­a­tion and make it more inter­ac­tive.

Up next: Blender 2.8 and more!

Here is a ten­ta­tive list of fea­ture tar­gets for the next ver­sion:

  • Support Blender 2.8
  • Weather sim­u­la­tions (using the par­ti­cles sys­tem)
  • Faster/better ways to cre­ate rocks and ter­rains
  • Better mate­ri­als

This ver­sion end­ed up hav­ing way more changes that I antic­i­pat­ed but it was a blast. Mirage is final­ly start­ing to come togeth­er as a more com­plete pack­age and 2.8 will bring lots of new pos­si­bilites. If you haven’t got­ten Mirage yet you can buy 3.2 at the Blender Market now, just hit the but­ton below.

All the posts you can read

No comments yet

Leave a Reply

Your email address will not be published.