Author Topic: ...Static lights don't cast shadows...  (Read 3275 times)

I noticed this when shaders were first added to the game, why can't static (event based) lights cast shadows like the sky does? I'm not even sure if this is the appropriate question to ask, but I also noticed that a single item can only have one shadow as well.



When I set azimuth and elevation both to the lowest values, the yellow light doesn't make my character cast a shadow, or anything else in the area.



More questions to either think about or evaluate: How much of a performance impact would this create to allow static lighting to cast shadows?, Would this even be a fathomable addition to allow the Torque engine to endure, would it even be possible?. Noticing this again really makes me hate doing interior designing, because sometimes it looks... Strange.

Other times it just looks gross when building in night time settings.







I can expand upon this in many directions, I just wanted to get the very basic idea out there, even though I know for certain it has been talked about beforehand.

Almost all basic engines that have lighting that can cast shadows are all pre-rendered (e.g. Source Engine). The Source Engine calculates all of the lighting and possible situations during the compile stages of the .bsp, more specifically vrad.exe. Exceptions do exist however. A such entity that allows casting light can only have one with an initial on state, but that's for "real time" shadows.

Go ahead and prove all these things wrong, because I know for certain I typed something wrong above.

Annnndddd..... Discuss.

Please note that, in Blockland, shadows have to be able to cast up to 256k bricks and any other objects you can stuff into the game in real time.

Other engines have the luxury of low object counts (along with massive development teams and engines fleshed out over multiple games).

If this existed my computer would be in a grave (my old one)

The only way I could see this working is if a complete rehaul of how shadows even work in the game is done.

relevant quote

We have to rerender the whole scene at least twice for every shadow casting light source. Imagine taking your framerate and dividing it by (4 + # of shadowcasting lights * 2). In other words, if you get 60fps right now, you would get 6 fps with just one or two shadowcasting lights.

So we are going to just do one directional light for now. Maybe eventually we will allow multiple lights to cast shadows.

It would be cool if it rendered on screenshots.

yeah if it did it for screenshots that'd be cool

would be ok since it's only one frame, might just take a few seconds to process it all

I was also thinking it would be cool if you could bake lights for builds that you won't change, like gamemode builds.

I also don't know if this would count as rendering shadows, but having lights not shine through walls would be nice. :P

I also don't know if this would count as rendering shadows, but having lights not shine through walls would be nice. :P
there's also a relevant quote from badspot about this

basically there was a fix they tried but it led to really goofy cutoff with lights for no reason or something

I was also thinking it would be cool if you could bake lights for builds that you won't change, like gamemode builds.

yeah, i think baking shadows would be really cool, and would even allow dark maps to look properly dark even to people who are unable to run shaders

I was also thinking it would be cool if you could bake lights for builds that you won't change, like gamemode builds.
yes pls

yeah, i think baking shadows would be really cool, and would even allow dark maps to look properly dark even to people who are unable to run shaders
implement this

shadows in games have always been a performance issue. im not sure if proper optimization doesn't exist yet but damn I wish someone got it right. im keeping my fingers crossed at gta v pc

shadows in games have always been a performance issue. im not sure if proper optimization doesn't exist yet but damn I wish someone got it right. im keeping my fingers crossed at gta v pc
don't count on it