Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I guess I'm just adjusted to metric weeks (10 days) oh well ๐Ÿค”
not sure how to make a devlog about this .. it's mostly technical stuff and not much to show

in short: I rewrote the lightmapping code

the unwrapper now works on movers 
this means I can bake shadows into doors, elevators, conveyor belts


secrets are easier to hide

previously moving geometry (the movers)
only supported vertex lights
in my naivety I thought baking the lights into these vertices was enough
but in practice they always stood out

in the case of unwrapping it was mostly refining old code 
but calculating the pixels needed a whole new approach
this was done because on new maps as the maps got bigger
the lightmap preview got a lot worse
as it was only a small 256x256 texture representation
of an ingame 2048x2048 texture

here is a gif of a starship with unfiltered lightmap
comparing the result of the old one and the new one

now the speed up is quite significant
to make the ingame lightmap I made a seperate command line app
this took 2 mins to bake this spaceport map (which my largest most and complex map right now)
the new method finishes in ~8 seconds
this was achieved due to various factors:
- switch to BVH from a 2D grid for storing the triangles
- the new BVH was tread safe and so I increased the threads from 4 to 12
- early exit for the raycast - stop when the first light was hit
- this brought it down to ~10 second
- then the BVH was upgraded to BVH4 and simd was added but it only shaved 2 seconds off

and the preview in the editor skips pixels and blends things together ๐Ÿค”


the lightmapper in action - not much of a looker ๐Ÿค”

and the results of all this hard work.. a clean preview - not much of a difference for most maps ๐Ÿค”

now all is left is to make all these damn levels ๐Ÿ˜“

until next time ๐Ÿ‘‹