MontyTRC89 / Tomb-Editor

Tomb Editor
57 stars 16 forks source link

TE: Allow sun bulb placement in void #795

Open Nickelony opened 5 months ago

Nickelony commented 5 months ago

Add a sun bulb property, which allows placing them further away from the owner room to create effects like this:

image

If the sun bulb is in the void above the ceiling, full wall pillars shouldn't completely obstruct the light, but cut off at some point as if they were a very tall floor.

Raildex commented 4 months ago

This needs an overhaul of how Sun lights work. Currently, Sun Lights behave more like Point Lights with an infinite radius. Since it's like this in winroomedit.

For Sun Lights to have an uniform direction, you need to invert the ray casting: Instead of raycasting from light to vertex, the vertex needs to be the origin and raycasted into an unknown location. This is impossible in the current implementation, since it's a DDA algorithm.