Dynamic Lighting for props/doors

Any aspects of level design for the Source engine.

Dynamic Lighting for props/doors

Postby c0ldpr0xy on Wed Aug 07, 2013 9:13 am

Searched the forums but couldn't find anything. So basically, my question is, does Source even support dynamic lighting? The flashlight and the shadows that are cast from it behind NPCs/objects looks amazing for Source. Is there any way to make a door or a prop_static lit after it opens or moves to a different location.

When my doors open, they always stay dark because their initial position are within walls/ceilings. Kinda like trapdoors. Even if I did light these doors with a special room (which isn't the way to do it), the lighting would be inaccurate.

Thanks in advance. - T
c0ldpr0xy
Member
Member
 
Joined: Sun Oct 03, 2010 8:58 pm

Re: Dynamic Lighting for props/doors

Postby Gary on Wed Aug 07, 2013 1:36 pm

The flashlight system is the only real dynamic per-pixel(as it lights surfaces at a pixel level) light source that also casts real shadows. It also had a few bugs, like improper culling, fading on brushes, and randomly projecting backwards. The flashlight system is also used by the env_projectedtexture entity. Which is in itself buggy and limited. I would rarely recommend using it outside of very tightly controlled scenes unless you are fixing it with mods.

dynamic props(any moving or changing entity) are lit in their entirety based on the lighting at their origin or other selected point. Doors are dynamic and their lighting point can move. I've seen your problem solved before. So I know it's possible. Can't test though cause I'm posting from my phone.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Dynamic Lighting for props/doors

Postby c0ldpr0xy on Wed Aug 07, 2013 9:49 pm

You say doors are dynamic and their lighting point can move, but how do I do it? As I said, when my doors move to a lit area, they are still 100% dark. (Because of their initial position)

Ps: forgot to mention that the doors are func_door not prop_door
c0ldpr0xy
Member
Member
 
Joined: Sun Oct 03, 2010 8:58 pm

Re: Dynamic Lighting for props/doors

Postby Dives on Wed Aug 07, 2013 11:18 pm

func_door is a brush and brush lighting is baked during compile. The door must be be a model (e.g. prop_door_rotating) for the lighting on it to be dynamic.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Dynamic Lighting for props/doors

Postby c0ldpr0xy on Thu Aug 08, 2013 2:14 am

Dives wrote:func_door is a brush and brush lighting is baked during compile. The door must be be a model (e.g. prop_door_rotating) for the lighting on it to be dynamic.


Yeah sorry I didn't mention this before but this was what I was wondering. Anyways, after some thorough research and some help from TopHATTwaffle, I figured it out to do it with env_projectedtexture. Cheers.
Last edited by c0ldpr0xy on Thu Aug 08, 2013 2:37 am, edited 1 time in total.
c0ldpr0xy
Member
Member
 
Joined: Sun Oct 03, 2010 8:58 pm

Re: Dynamic Lighting for props/doors

Postby joe_rogers_11155 on Thu Aug 08, 2013 2:35 am

You can have an env_projectedtexture to simulate a dynamic shadow-casting light, if you are inclined to manipulate the somewhat broken code for that entity. Other options include faking it by turning a light_spot on and off when the door opens or something, but you will not get crisp dynamic shadows that cast rays into a room or around objects.
"Day breaks, but decay soon follows." - Ava Winona
Currently developing in radio silence... 99 Bolts
Here's another project of mine... Assault on Overwatch
Are you new to Source SDK? VDC
joe_rogers_11155
Veteran
Veteran
 
Joined: Wed Oct 08, 2008 11:11 pm
Location: United States

Re: Dynamic Lighting for props/doors

Postby c0ldpr0xy on Thu Aug 08, 2013 2:45 am

joe_rogers_11155 wrote:You can have an env_projectedtexture to simulate a dynamic shadow-casting light, if you are inclined to manipulate the somewhat broken code for that entity. Other options include faking it by turning a light_spot on and off when the door opens or something, but you will not get crisp dynamic shadows that cast rays into a room or around objects.


Thanks for that.
c0ldpr0xy
Member
Member
 
Joined: Sun Oct 03, 2010 8:58 pm

Re: Dynamic Lighting for props/doors

Postby navatesap on Sat Aug 10, 2013 9:12 am

Gary wrote:The flashlight system is the only real dynamic per-pixel(as it lights surfaces at a pixel level) light source that also casts real shadows. It also had a few bugs, like improper culling, fading on brushes, and randomly projecting backwards. The flashlight system is also used by the env_projectedtexture entity. Which is in itself buggy and limited. I would rarely recommend using it outside of very tightly controlled scenes unless you are fixing it with mods.

dynamic props(any moving or changing entity) are lit in their entirety based on the lighting at their origin or other selected point. Doors are dynamic and their lighting point can move. I've seen your problem solved before. So I know it's possible. Can't test though cause I'm posting from
my phone.


Thanks for your share, it's very good
navatesap
Just Joined
Just Joined
 
Joined: Sat Aug 10, 2013 9:08 am

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users