More Walls, Rendering Bug, and Sick Family

Hey Folks! Slower day today, as I discovered a rendering bug while working on auto-tiled walls. Also, with the family feeling sick today, I had to duck out frequently to help.

After a bit of email and admin stuff, I was back on my wall sprite rework, updating the complete wall sprite sheet's normal map. I fired-up the engine to see how it looked, and it wasn't too bad! But there was a problem: some of the highlights were in the wrong place.

I've been noticing this off and on over the past months, and every time I adjust my normal maps thinking their RGB channels are backwards (Unity flips one of them compared to other engines). However, O noticed a new detail today that eluded me before: the bug only happens on some lights.

Turns out, it's the orientation of the light! Not the normal maps I'm drawing.

More specifically, the way the shader calculates the direction from the light to an object assumes the light has a zero rotation. But lights can have any rotation on a ship, and even whole ships can have a rotation.

The good news is that this is probably a trivial fix. I've already found the place in the shader where I calc this direction, and all I have to do is rotate that direction by the opposite amount of the light's rotation.

The bad news? This is shader matrix math, and not my forte. I'm not sure how to access the rotation info I need from the available shader params. There are a whack of built-in variables and helper functions which all seem to be close to what I need. But not exactly.

I'll have to dig into this more tomorrow. Once I get that, it should make all things look better everywhere, which is nice! And I can resume making the walls look more detailed/directional. (Which, ultimately, should be a good step towards generating better videos and promotional screenshots.)

Tags: Ostranauts


Braderunna's picture

Keep up the good work, its gonna pay off. Im sure there are many silent watchers, following the development of you world here. I for one am looking forward to revisiting the universe and feeling of Neoscavenger. I played so many games, and even with its limits, Neoscavenger is amongst the games with the most potential out there, when it comes to igniting a spark in the immersion-centre of my imagination. I just wanted to swing by and say that i enjoy the way you think, when you create your tiny, yet deep and vast dimensions, for all of us to experience.


dcfedor's picture

Thanks! It's always nice to hear others are enjoying the universe as much as I am. I tend to think of this as a giant RPG where I'm the GM and everyone else is a player, so it's my goal for everyone to have a good time!

Dan Fedor - Founder, Blue Bottle Games