ID:111276
 




With the last show-stopping bug squashed, I'm releasing the "Soft Shadow" update to my Static Lighting Generator 2 demo.

Visit the hub page for more example screenshots, or download the demo and try it out for yourself!

There is one more bug that I'm aware of, where the generator will crash/hang if you use a light radius greater than 15 (i.e. it extends outside the light's tile). I don't know how hard it will be to fix, so I decided to release what I have, in case I never get back to this. If you find any others, please post them on the hub page's comments.

Despite being more complicated (and double the size!), the generator still runs at a good pace. In my tests, it generated the example 22x70 Office map in just 5 seconds.

If you can come up with a practical use for this, feel free to use it in your projects! I've got something special in mind, but only time will tell if my class-load will let me get to it.
This would work in a game that doesn't use 32x32 tiles, right?

Could we get, say, X and Y dimension multipliers in the event that we need lighting solutions for non-"top down" camera angles?
Yes, it should work at any icon-size setting.

I'm not sure I understand your second question. Generating lighting for a 2.5D camera style (like Decadence) would require 3D lighting calculations and data. Or did you have something simpler in mind?
DarkCampainger wrote:
I'm not sure I understand your second question. Generating lighting for a 2.5D camera style (like Decadence) would require 3D lighting calculations and data. Or did you have something simpler in mind?

Generating lighting for a 2.5D camera style but only with infinitely tall obstructions. Like say for when the walls are taller than the altitude of the lights.
D4RK3 54B3R wrote:
Generating lighting for a 2.5D camera style but only with infinitely tall obstructions. Like say for when the walls are taller than the altitude of the lights.

I'm having a hard time imagining what the corners of the walls would look like. Can you put together an example image of approximately what you want the output to look like?
For the sake of casting shadows you can assume that obstructions are infinitely tall (or at least taller than the light source), but you still have to figure out what the normal is at each point. With a top-down view the normal is the same for all points.

Unless you'd make it work for isometric too, I'm not sure its worth the time worrying about 2.5D. I'm not sure how nice it would look anyway. By simulating a 3D space in 2D you have many points in space represented by the same pixel on the screen, and because the lighting is static things might look strange. The top-down view avoids this problem too.
Looks amazing, but I'm more interested in could this work with Isometric, or if you're planning an isometric release. Haha.
I just learned that you need the latest version of the C++ runtime library before you can use the generator. I've added links to the hub's description. So if you had trouble running it before, try updating.
Uploaded version 2.1 with better error-handling. It will now also suggest updating the C++ runtime environment if the DLL fails to load.