• Register
Post news Report RSS Troublesome Transparency

In which I back-pedal on my level colour-variation approach; a new way of doing it may be available; a new key-binding profile is added for certain keyboards; the key-binding profile menu is moved; a new trailer is underway; and an odd transparency issue slows work on that video.

Posted by on

Greetings and salutations!

This week's screenshot shows two minor changes in the game's key-bindings: first, that the menu is now (more or less) centred above its button, and second, that a new key-binding profile has been added.

keymapPopupMenu

The week just past was another one of level-work alongside other things--the latter including a start on a new trailer-video:

You may recall that in last week's post I mentioned efforts to apply colour-variation to level two. I continued with that in the week just past; indeed, I completed the work, and tested it.

Unfortunately, while it functioned as intended, some part of it seems to have incurred a terribly variable frame-rate: some views ran at more than a hundred frames per second; while others ran at only around sixty frames per second--or even fifty-odd in one case!

This was... rather unsatisfying.

So, I've back-pedalled a bit.

I've undone the merging of the building-walls and the reparenting of objects to building-floors--those being my best guesses right now as to the source of the frame-rate variations.

I've thus also undone the colour-scaling of the buildings.

Instead, I now have it in mind to apply limited vertex-colouring to certain buildings. This calls for some care, as the geometry of the buildings wasn't designed for this and can easily cause unsightly artefacts in the shading between vertex-colours. Still, I think that it should work.

On the UI side, and as shown in the screenshot above, I've made some changes related to key-bindings.

To start with, I've added a new out-of-the-box key-binding profile:

Based on feedback that I was given regarding the demo, and supported by information from the Panda forum, it seems that some keyboards don't support the user holding down at the same time both one of the WASD keys and the space-bar. This interferes with jumping, and thus traversal, and may be a serious obstacle to playing the game, I fear.

In the week just past, however, I realised that I might be able to work around the issue by placing the "jump" command on the mouse instead of the keyboard. To that end, I've added a key-binding profile that swaps jumping and examination. This may have implications for some of the minigames, but I'm hoping that they'll be minor, and that the swap will allow more people to play the game.

That new key-binding profile, however, has a rather long name. Indeed, it's long enough it resulted in the profile-selection menu overrunning the right-hand side of the options-menu, and being cropped as a result. To solve this, I've now moved the menu to sit atop its button, and more or less centred. (I noticed just today that it wasn't properly centred; I may fix that! ^^; )

I also did some video-work in the week just past, specifically in building a new trailer for the redux-demo. Progress has been somewhat slow thus far, in part because of a lack of footage from the new version of level two--that being not yet ready--but also because of a nuisance issue regarding transparency in Blender:

The text that I'm overlaying on the video is prepared in a standard 3D scene, with a mist-effect used to dissolve it on cue. (And I discovered happily in the week just past that Blender's procedural "clouds" texture is, in fact, three-dimensional! :D) When rendered from the scene, this looked just as expected.

However, when rendered in the video via the "alpha over" mode, there was an odd problem: it was as though areas of full-transparency were being treated as fully-opaque, and furthermore being additively blended!

With some help from the Blender Stack Exchange, a solution was found: in short, I had to apply transparency in a particular way for it to work. It looks as though Blender expects transparency in the "alpha over" mode to be pre-multiplied, and takes non-pre-multiplied values to be emissive. Although why this only seems to be a problem with full transparency remains a mystery!

With all that said, I have a working set of Blender shader-nodes now, and I'm fairly happy with the resulting mist-dissolve! ^_^

mistText2

And along the way I implemented various changes and fixes that don't seem worth detailing here!

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

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: