Moving objects and lightmaps / dynamic lights
Quote from cF^ on November 7, 2011, 3:09 amHi guys,
New to the board so go easy on me! I'm in the process of creating my first portal 1 level and have hit a problem I can't seem to work out how to solve. I have created a moving platform that hides a bottomless pit (which casts light). My problem is twofold.
Firstly the lightmap created by the orange texture on the bottom of the pit is cast on the surrounding walls when the platform is hiding the pit. I know its baking the lightmap while the pit is not covered as the pit platform starts hidden but I'm not sure how to go about fixing this (putting the platform on top when baking would only cause the opposite problem of no light cast when the pit is open).
Secondly, as the moving platform is out of the environment when light is baked, the surfaces are unlit when they enter the world. I've added a couple of screenies so you might understand my problem better.
Cheers,
Door Open
Door Closed
Hi guys,
New to the board so go easy on me! I'm in the process of creating my first portal 1 level and have hit a problem I can't seem to work out how to solve. I have created a moving platform that hides a bottomless pit (which casts light). My problem is twofold.
Firstly the lightmap created by the orange texture on the bottom of the pit is cast on the surrounding walls when the platform is hiding the pit. I know its baking the lightmap while the pit is not covered as the pit platform starts hidden but I'm not sure how to go about fixing this (putting the platform on top when baking would only cause the opposite problem of no light cast when the pit is open).
Secondly, as the moving platform is out of the environment when light is baked, the surfaces are unlit when they enter the world. I've added a couple of screenies so you might understand my problem better.
Cheers,
Door Open
Door Closed
Quote from Brainstone on November 7, 2011, 6:17 pmIn Hammer, all the lightmaps are created in the compiling process (before you play the map), not during the game itself. That means, if your door starts open, the orange light will be calculated to be everywhere.
If the door starts closed, the lights will never shine through the door, even when it opens. The solution to this problem is to add a dynamic light at the bottom of the pit. Dynamic lights are entities called light_dynanamic and are calculated during playing the map. Therefor they cost a lot more power for your PC. Only one dynamic light can be active at a time. The orange textures which you have at the bottom of the pit emit light, but can never be dynamic. You will have to delete them.
Also, your door must be a entity, which is able to cast shadows.Hope that helped and you understood.
In Hammer, all the lightmaps are created in the compiling process (before you play the map), not during the game itself. That means, if your door starts open, the orange light will be calculated to be everywhere.
If the door starts closed, the lights will never shine through the door, even when it opens. The solution to this problem is to add a dynamic light at the bottom of the pit. Dynamic lights are entities called light_dynanamic and are calculated during playing the map. Therefor they cost a lot more power for your PC. Only one dynamic light can be active at a time. The orange textures which you have at the bottom of the pit emit light, but can never be dynamic. You will have to delete them.
Also, your door must be a entity, which is able to cast shadows.
Hope that helped and you understood. ![]()
Quote from ChickenMobile on November 8, 2011, 1:53 amYou said it man! Dynamic lights are the way to go for this one.
You said it man! Dynamic lights are the way to go for this one.
Quote from cF^ on November 8, 2011, 2:58 amI've gotten rid of the orange light texture on the floor of the pit to get rid of the shadows being cast. My next problem is making the brushes cast shadows. Currently they are just func_brush. Is there another brush I can change them to or how do I go about creating an entity that will do the same job?
Cheers for all the help!
I've gotten rid of the orange light texture on the floor of the pit to get rid of the shadows being cast. My next problem is making the brushes cast shadows. Currently they are just func_brush. Is there another brush I can change them to or how do I go about creating an entity that will do the same job?
Cheers for all the help! ![]()
Quote from Moth on November 8, 2011, 5:34 amShadows are determined by positioning of lights and objects blocking those lights, in combination with lightmap texture sizes and less commonly, light-emitting textures.
You can't just magically create shadows. Try placing a light_spot behind a beam, and lower the lightmap size on an opposite wall. EXPERIMENT! learn the different kinds of light and how they work.
The Valve wiki is your friend:
http://developer.valvesoftware.com/wiki/Lighting
Most people here, myself included, started out like you with very little knowledge. Don't be disheartened or daunted. We're here to help, provided your questions aren't *too* stupid :-p
Shadows are determined by positioning of lights and objects blocking those lights, in combination with lightmap texture sizes and less commonly, light-emitting textures.
You can't just magically create shadows. Try placing a light_spot behind a beam, and lower the lightmap size on an opposite wall. EXPERIMENT! learn the different kinds of light and how they work.
The Valve wiki is your friend:
http://developer.valvesoftware.com/wiki/Lighting
Most people here, myself included, started out like you with very little knowledge. Don't be disheartened or daunted. We're here to help, provided your questions aren't *too* stupid :-p

"Such monstrous sucking-constructions aren't built within one afternoon"
Quote from Vordwann on November 8, 2011, 6:57 amVALVE YOU NEED TO MAKE ALL LIGHTING IN SOURCE DYNAMIC! PLEASE!
VALVE YOU NEED TO MAKE ALL LIGHTING IN SOURCE DYNAMIC! PLEASE!
[spoiler][SP] Alternate[/spoiler]
Quote from Spam Nugget on November 8, 2011, 7:48 am...but only if they can find a way to do so without causing SERIOUS LAG.
...but only if they can find a way to do so without causing SERIOUS LAG.

I think in terms of boolean variables. Generally, it makes things easier.
Quote from Moth on November 8, 2011, 8:27 amIf you're looking for completely dynamic lighting, look at idTech 4 (DOOM3 engine)
Source has its roots in the original Quake, and uses BSP, which doesn't fully support real-time dynamic lighting, or per-pixel lighting which is what idTech uses.
I used to map for idTech and whilst it has some nice features, like thre complete lack of a compile stage (because it's all realtime) - it's not as versatile, modular or flexible as Source.
Advanced lighting techniques in Source are easy once you learn the tricks.
A bad workman always blames his tools...
If you're looking for completely dynamic lighting, look at idTech 4 (DOOM3 engine)
Source has its roots in the original Quake, and uses BSP, which doesn't fully support real-time dynamic lighting, or per-pixel lighting which is what idTech uses.
I used to map for idTech and whilst it has some nice features, like thre complete lack of a compile stage (because it's all realtime) - it's not as versatile, modular or flexible as Source.
Advanced lighting techniques in Source are easy once you learn the tricks.
A bad workman always blames his tools...

"Such monstrous sucking-constructions aren't built within one afternoon"
Quote from cF^ on November 8, 2011, 12:47 pmHi guys,
Thanks for all the positive input. I do have an understanding of how lightmaps work and understand the compile process to an extent. My reply was simply to understand which objects cast _dynamic_ shadows as it appears that my bsp brushes are not i.e when my door is closed the dynamic light can be seen in the room and casts light on the walls, though I wish for a shadow to be cast by the closed doors(currently func_brushes).
It seems like a really nice community here, thanks for all the help
Hi guys,
Thanks for all the positive input. I do have an understanding of how lightmaps work and understand the compile process to an extent. My reply was simply to understand which objects cast _dynamic_ shadows as it appears that my bsp brushes are not i.e when my door is closed the dynamic light can be seen in the room and casts light on the walls, though I wish for a shadow to be cast by the closed doors(currently func_brushes).
It seems like a really nice community here, thanks for all the help ![]()
Quote from Vordwann on November 8, 2011, 6:09 pmMoth lol I have no problem with the source tools, I love them. I just think it would be better if they had dynamic lighting. Source IS becoming outdated. No matter what anyone thinks.
Moth lol I have no problem with the source tools, I love them. I just think it would be better if they had dynamic lighting. Source IS becoming outdated. No matter what anyone thinks.
[spoiler][SP] Alternate[/spoiler]

