• Register
Post news RSS The Case of the Disappearing Level Geometry

In which performance is improved a little; the sky is removed in places; level-geometry is expanded, detailed, and fixed; and an oversight results in level-geometry vanishing.

Posted by on

Greetings and salutations!

This week's screenshot shows progress made on the geometry and appearance of level five:

Screenshot from 2020 09 05 15 54

The week just past was perhaps a bit of a slow week, but nevertheless a few things were done:

I believe that I mentioned in last week's blog-post that I had encountered some performance issues with certain views within level five. In the week just past, then, I worked on ameliorating these issues.

My initial attempts focussed on the idea of creating a lightweight version of my primary player-light shader. However, exploring and experimenting here produced few results: while sweeping changes could improve the game's frame-rate, the smaller-scale changes implied by them didn't seem to be all that effective.

However, another idea to come to me: I realised that in a level like this, the sky-box would never be visible. But it was nevertheless being rendered, unseen behind everything, potentially affecting the game's performance.

So I tried removing it--and indeed, this did help! Not hugely, mind you, but enough to be worthwhile, I feel! ^_^

Furthermore, with that discovery I went through some of the preceding levels and added logic (and triggers as appropriate) to do likewise there. It's hard to say whether it's a significant aid in those places, but it likely helps a little, at least.

But most of the work of the week just past went, as I recall, into the geometry of level five.

To start with, I added a pair of lecterns near the entrance to the level. Once perhaps guard-posts, all that remains to tell of their use is the graffiti carved into their surfaces.

Screenshot from 2020 09 05 16 03

Screenshot from 2020 09 05 16 03 1

Also visible above is the decorative curlicue-work that has been added to the level. This sort of design was somewhat ubiquitous in ornamenting the upper districts of Tenereth-of-old; as such, this particular decal may see re-use when I go back to make level three.

Screenshot from 2020 09 05 15 55

A minor addition is the inclusion of a handful of breaks in the facade of the structure; places where cladding has cracked, or fallen away to reveal stone blocks within. One example of this might be somewhat seen in the first screenshot of this post, beside the left-hand lectern.

Furthermore, there were a number of changes made that don't seem worth detailing here--work on the textures used on the floor and ceiling; fixes to minor issues of geometry; moving a chair that intersected a table-leg; and so on.

Towards the end of the work-week, however, something happened:

It was near to the time at which I intended to stop work, and I decided to make a fairly minor change--the moving of the working crystal light from one spot to another. This I did, and afterwards exported the level and imported it into the game.

Only to find that much of the level-geometry was gone! It simply wasn't there; the level was composed of a handful of elements surrounded by an empty black void.

This was, as you might imagine, a little distressing. o_o

So I set about investigating. I exported-and-imported various sub-sets of the level; I looked at engine-provided scene analysis; I examined and experimented with various bits of my code.

In the end, it seemed that exporting certain sub-sets of the level resulted in the geometry appearing as expected, while others resulted in the problem of parts disappearing. Furthermore, it looked as though the problem was being caused by the exporter crashing when dealing with some object or other.

But why? It seemed to make no sense. And no matter what I tried, the issue persisted.

Then I discovered something: an object that, presumably in the moving of the light, had ended up with all of its vertices deleted. And this, it seems, was the thing that was causing the exporter to trip up: deleting the object and re-exporting the scene resulted in everything showing up properly again! To quite my relief, as I recall!

That, then, is all for this week--stay well, and thank you for reading! ^_^

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.