...

Me, Mystic and the Saga of the Trees…

Hilly terrain and trees at sunset — Mystic game environment screenshot

I see a lot of people very easily complain about “asset flips” when they see games online. Its an easy reach because you look at the abundance of assets online, and a lot of young people (or youtubers) just importing some TPS and calling it a “game”. Yet, going from just plopping something into Unreal, to a full game is REALLY hard work. Unreal Engine is amazing, however, there are nuances to get it to work well beyond the defaults.

When we started building Mystic’s world, we thought trees would be simple. I mean, there is an abundance of foliage online so we could just buy the assets, right? Wrong…

The very first biome in Mystic is based on an actual village in northwestern Pakistan. We decided we wanted something authentic, and after searching, we couldn’t really find anything online that matches. No problem, we can just recreate local species like KikarNeemPalosa, and Shawa, along with regional cactus types that look nothing like the tall, Western-movie kind…from scratch. How hard could it be?

We began researching the trees and thought a few SpeedTree nodes later we would have something unique. After our artist Taiyab painstakingly tweaked every branch and leaf to match reference photos, we saw the results and… they looked generic, without a feel of the region. You couldn’t tell one tree from another. We had about 7 variations of each kind. It didn’t matter.

So, I travelled to Pakistan, took real-world photos and 3D scans of the village, integrated them into our custom trees, matched textures, and relit. Looked great! Until we brought them into Unreal…Lighting didn’t behave properly. The subsurface scattering (which makes leaves glow naturally when hit by light) was completely off. We fixed that, and then performance was terrible. Too many glowing leaves! We switched the trees to Nanite, because ofcourse Nanite promises you can throw anything at it…and it made things worse. Oh right, Nanite doesn’t like Masked textures! It causes overdraw like no tomorrow. Leaves were killing performance again. By then we had a new environment artist (Marcos Romero) join us, and he had to completely recreate every single tree using meshes. At this point our team is already getting tired of trees.

The new trees looked a bit worse than before, but at-least performance was okay. It wasn’t great but it could be ignored for a while…until we remembered to make the trees choppable. We could only make a handful of trees interactive before the frame rate tanked. In our first demo, some trees could be chopped, others couldn’t, and players definitely noticed. They were being loud (and rightly so). Begrudgingly, optimizing became our (my) top priority. 

Marcos removed animation from the trees because WPO causes a hit on nanite, and that helped, but the world felt dead. That was a regression. Definitely not doing that.

I went back to the drawing board with good old LODs, with some relatively modern Octahedral Imposters to improve performance. Unreals Imposter Baker seems to be broken (material/shader issues). Fixed those, and then saw that naturally Imposters didnt didn’t work well for every tree type. We ended up using Billboards for some trees and imposters for others. Everyone knows LODs lead to popping artifacts when switching, which looked awful, so we recreated them multiple times until the transition was smooth. There is a bug in Unreals LOD system we resets values based on various things you do, which made iteration and experimentation a very long and painful process. Im still not happy with it, but I will get around to reducing the popping even better at some point..

After all this, we find out that Unreal 5.7 will feature Nanite Foliage…Im in tears almost, and Im not sure if they are tears of joy, frustration, or both, but by now it doesnt really matter. Nanite Foliage looks great, and I am looking forward to it, however, it uses a Voxel representation, which im sure will come with its own set of problems, especially requiring more memory than the traditional nanite foliage system I presume.

In any event, as a small team, with people wearing multiple hats, its gets insanely difficult to wrangle everything to a level of polish that is expected nowadays to stand out in from the plethora of games out there. Add to that the AI slop that is coming our way, I fully expect people to quickly generate 3D assets, without any regards to how they work in game, and then complain that we are being lazy because “AI could have done that in an hour”. Maybe someday it will. Today is not that day…

Share This Article

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.