This week(s) in Mirage #8

It’s been a while! I’ve final­ly fin­ished the new materials.

The new mate­ri­als now use image tex­tures instead of pro­ce­du­rals. While pro­ce­du­rals have many ben­e­fits, you get more bang for your buck with images. They bring lots of non-dis­crete details and vari­a­tion, along with bet­ter per­for­mance in exchange for some flex­i­bil­i­ty. This change was pos­si­ble now thanks to all the great CC0 tex­ture sites that have been pop­ping up in the last year or so.

I believe users should be able to do what­ev­er they want with the ter­rains they gen­er­ate with Mirage, so tex­tures that can’t be redis­trib­uted are a no-no. This made things a bit more dif­fi­cult. Even though there are scores of great CC0 tex­tures avail­able now, few of them are good land­scape tex­tures. The good news is that the new mate­ri­als def­i­nite­ly look bet­ter than before, and both the mate­r­i­al and tex­tures are CC0. You can do any­thing you want with them, com­mer­cial or not.

The mate­ri­als are more sim­ple now. The slope and height masks are man­aged with col­or­ramps, except for height off­set. I plan on mak­ing a video walk through of the noo­dle set­up once this ver­sion is released.

I’ve includ­ed the com­plete set of maps for each tex­ture used, even when they are not used. There’s also a textures.txt file in the assets fold­er with the license and the source of each tex­ture and I includ­ed
the orig­i­nal names since I renamed them all to be more consistent.

While the new mate­ri­als are an improve­ment, they are still far from per­fect. Or at least from what I’d like to see in Mirage.

Repetitiontiontiontiontion

A com­mon prob­lem when tex­tur­ing land­scapes is tiling. You need to have tex­tures look small so when you are stand­ing in the ter­rain you can sell the illu­sion of scale. This makes the tex­ture repeat a mil­lion times and look quite fake. One trick to solve this is mix­ing the tex­ture with itself using a dif­fer­ent scale
or rota­tion. This breaks the tiling some­what. But it won’t save you if you used a real­ly small scale and have a ton of rep­e­ti­tion, though you could keep mix­ing it over and over until it’s gone.

The oth­er way to deal with this prob­lem is lay­er­ing. Break up the space in the mesh into many tex­tures and none of them will have enough space to show any obvi­ous tiling. We could also include grass par­ti­cles and objects in this solution.

So, why not just do this? It’s the lim­i­ta­tions. More tex­tures, more RAM. With Eevee this could cause the mate­r­i­al to not ren­der, depend­ing on your GPU mem­o­ry. It can spi­ral out of con­trol quick­ly: Imagine hav­ing 2K-6K dif­fuse, rough­ness, nor­mal and dis­place­ment for each “lay­er” of mate­r­i­al, then we also have to con­sid­er the masks to mix all of those. Using height or slope alone looks arti­fi­cial, we need to dis­tort it with some noise. Oh yeah, and the dis­place­ment map should be at least 4K/16bits if you want microp­oly with­out any pix­e­la­tion or obvi­ous band­ing. Cycles can han­dle more tex­tures, but it can still mur­der your PC if go too far.

I’ve been con­sid­er­ing mix­ing and bak­ing all the tex­tures into images in the future. Mirage would have a spe­cial UI to han­dle the look of the ter­rain and when the user is done, it would bake all the lay­ers togeth­er into a sin­gle tex­ture. That would be way bet­ter for per­for­mance, but it would also remove the abil­i­ty to use tex­ture paint for masking.

Or maybe Eevee/Cycles/the hard­ware we use in gen­er­al will be able to han­dle this just fine in the future and I won’t have to get out of bed.

Have you also fought with per­for­mance in land­scapes? Let me know in the com­ments, I’d love to know how oth­er peo­ple are get­ting around this. Or whether this is a seri­ous prob­lem for every­one or I’m just over­think­ing things.

Next Up

  • No more fea­tures. Time to test every­thing and fight the horde of bugs.
  • Time for doc­u­ment­ing too. I also want to start writ­ing some ideas for video tutorials. 

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
TutorialsAddon, Blender, BlenderMarket, Development, Mirage, Python18.10.2019