Spellcaster Studios

Make it happen…

Bug-fixing

Today it was bug-fixing time…

First bug was an old one that was annoying me, even if it was simple to solve: the screen would turn purple on transition between areas…

The second bug was the normals on the objects… For imported objects, I’m using the 3ds format (because it was simple and I already had a function to load them), but the 3ds format doesn’t store normals, so they have to be computed after importing…

What I was doing so far was building smooth normals: assume all points that share a (X,Y,Z) are the exact same point and as such they should share the normal and should be smooth along the surface…

This would lead to weird results in stuff that should be more “straight” in nature, by smoothing stuff that should be flat:

screen450

You can see that on the console and especially in the “power generators”…

Now I’ve added a tolerance factor, which basically makes all adjacent triangles that differ by less than the tolerance angle to be treated as continuous…

Below you can see the effect with the new normal generation:

screen451

Much more accurate and in line with what I actually want from the system in visual terms…

Now listening to “Red Shift” by “Asgaroth”

Link of the Day: The game doesn’t seem much like my thing, but the graphical style is amazing!

Comment