This week I took a little break from bug fixes and optimizations while waiting for a new GPU for testing to arrive. Instead I worked on improving the terrain engine when used to create caves so I can complete a rough pass across the entirety of the Isle of Kasau.
Terrain System Improvements
While waiting for an AMD Radeon GPU to arrive for testing and debugging shader issues, I took a little break from performance and bug fixing to work on Antilia's terrain engine. I'm still hoping to have a rough pass done for all of the major regions on the Isle of Kasau before the year's end, and there are only a few regions left that really need it. A lot of that work revolves around the cavern system under "Gajoi's Claw", and to complete that pass I'd need to add some features missing in the terrain engine.
Cave Layer Collisions
The first thing I worked on was on adding some missing collision geometry on the cavern ceiling and "roof" terrain layers. These layers are a bit trickier to get working with collisions due to the irregular holes that can be cut into them where one terrain layer goes above or below another. In the process of creating the missing collision data I also ended up generating optimized index buffers for these layers as well, reducing triangle counts in the area around caves.
There is still one remaining task for these layers before they are working perfectly - I need to implement a triangle scissoring function that splits triangles up along an edge. It's not visible in the screenshots, but it can cause small collision glitches around the edge of certain cliffs.
Please forgive the crude appearance of this terrain - this is the first time I've been able to walk around with a character up here. It was only ever visible at a distance until a few days ago!
Cave Layer Clutter
With collision data finally being generated for the cavern layers I was also able to add support for terrain clutter on the cavern ceilings and the upper terrain layer. I'm still gathering resources together and designing terrain layers for use in the caves, but here are a few preview shots of this in action as I started to experiment a bit:
Cave Lighting Effect
Another little issue with these small "surface scene" caves has been the lighting. As these caves are part of the terrain scene they share the same day/night cycle of lighting and atmospheric effects as Tasii Garden and the Burning Sands. Even with shadows turned on it looked strange how bright everything was deep in the twisting passages under Gajoi's Claw. With shadows turned off they don't look like caves at all.
I resolved that lighting issue this week by adding environmental override objects. These objects can be freely positioned and when the player's camera is inside of one it can set overrides values for lighting, atmosphere, wind, and other environmental parameters.
Now it can get really dark in caves, even when the Miiraun Star is shining bright in the sky or the thick morning haze rolls in.
That's all for this week. Next week I expect to be back to working on bug fixes and shader issues in preparation for the next test build, but I may find some more time to work on the caves more.
Thanks for reading!