Sunday, January 19, 2014
Big day for nodes, HUDs, and all things shiny (well, I couldn't really think of a third thing so...)
At long last, the interface is integrated with the rest of the rendering pieces of the game. It used to be a mere module, throwing itself directly on the screen. Now, however, it holds a place among the elements of the exalted "render chain," having full access to the many buffer, bits, and barnacles (??) of the rest of the rendering subsystems!
There are several exciting advantages to this, although perhaps the most exciting is the fact that I can now use fancy, shader-based blending to draw the UI. Instead of just additive / subtractive / alpha, I can get fancy for the sake of visibility. I wrote a blend mode today that interpolates between additive and subtractive blending based on the luminance of the target frame - it works wonders! I can see the UI now whether I'm staring into a bright sun or the cold, dark abyss of space. And all without any kind of background overlay! I can also do neat things like fade out the edges of the node viewports as I blend them onto the screen, which provides a lovely, continuous HUD effect
I had a nice surprise today when I first played with compositing the UI onto the rendered frame. I was puzzled when I noticed that the text responded to the compositing just like all the other nodal elements For a long time (probably around 9 or 10 months) I've been under the impression that something deep within SFML would prevent me from rendering text to a texture. I thought it always rendered directly to the backbuffer, ignoring any custom framebuffer setup. I could have sworn I tested this theory And yet...when I tried compositing the UI with subtractive blending, I was immediately surprised to see the white text turn black, just as it should have. This implied that the text was going through the same pipeline as everything else...e.g., being rendered to the UI's target texture!
It might seem small, but to me this tiny little thing opens up immense possibilities. I could now render a nodal UI onto a game object, if I wanted! I could create textures with custom text on them, perhaps markings on a station or ship. I could apply post-processing to the UI, and finally achieve that lovely glowing text effect that I see being heavily-abused by every single Scaleform UI in existence So much potential, all because text works just like it should! Hooray!!!
PS ~ Sorry for the late log! Went to bed entirely too late night
Post
Mon Jan 20, 2014 9:45 am
#1
Week of January 19, 2014
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford