Idea for a visual mod if anyone wants to try it.
Quote from Thunder79 on November 4, 2007, 9:06 pmmsleeper wrote:Normal lights can be turned off and on, very easily infact.Every single light that is turned off and on is pre-computed...when compiling it goes through every combination of lighting in the level. When you start working on lighting for a map you'll run into the fact fairly quickly.
Would this mod be possible? I don't know....what I'm fairly sure about is that it is impossible without the sdk. Don't think this is something you can accomplish with hammer alone.
Every single light that is turned off and on is pre-computed...when compiling it goes through every combination of lighting in the level. When you start working on lighting for a map you'll run into the fact fairly quickly.
Would this mod be possible? I don't know....what I'm fairly sure about is that it is impossible without the sdk. Don't think this is something you can accomplish with hammer alone.
Quote from CassataGames on November 4, 2007, 11:07 pmI love the feedback I got on this idea, even if the mod might not be made anytime soon or even at all, the reality of it seems to have sparked a lot of interest.
I'll keep this in mind for future idea's. Thanks guys!
I love the feedback I got on this idea, even if the mod might not be made anytime soon or even at all, the reality of it seems to have sparked a lot of interest.
I'll keep this in mind for future idea's. Thanks guys!
Quote from Artesia on November 4, 2007, 11:42 pmI think the best bet would be to "fake it"
make it part of certain puzzles but not work in all cases...
An example...
in order to escape a certain room, you must direct an energy field onto a hidden exit. Said energy field looks like a light, you put a portal in the center of the spotlight. in the other room there are only a couple places you can put the other portal. each possible point has a light that will be activated if you put a portal there. if you put it in the right place, the light shines on the exit, which once looked like a normal part of the floor, the portal detector turned off a portion of the floor making it passable.
you would have to severly limit where portals can be placed to limit the lights needed. but still make there enough variety that you have to try several times.
I think the best bet would be to "fake it"
make it part of certain puzzles but not work in all cases...
An example...
in order to escape a certain room, you must direct an energy field onto a hidden exit. Said energy field looks like a light, you put a portal in the center of the spotlight. in the other room there are only a couple places you can put the other portal. each possible point has a light that will be activated if you put a portal there. if you put it in the right place, the light shines on the exit, which once looked like a normal part of the floor, the portal detector turned off a portion of the floor making it passable.
you would have to severly limit where portals can be placed to limit the lights needed. but still make there enough variety that you have to try several times.
Quote from Rivid31 on November 5, 2007, 12:09 amThat is along the same lines as I had initially thought of faking it as well. If you're going to fake it, you can't make it universal.
Unless there is a way to move a light as part of a trigger, and get the location of a portal_detector... then you could possibly just have 1 extra copy of each light color/brightness you have in your map, and move the copy around based on where the portal detectors were. If this is even possible, I could see it getting pretty complicated.
That is along the same lines as I had initially thought of faking it as well. If you're going to fake it, you can't make it universal.
Unless there is a way to move a light as part of a trigger, and get the location of a portal_detector... then you could possibly just have 1 extra copy of each light color/brightness you have in your map, and move the copy around based on where the portal detectors were. If this is even possible, I could see it getting pretty complicated.
Quote from Rivid31 on November 5, 2007, 7:43 amThat isn't entirely correct. light_dynamic can be parented to things, and moves around with them. The trouble I had was figuring out how to teleport anything besides yourself.
That isn't entirely correct. light_dynamic can be parented to things, and moves around with them. The trouble I had was figuring out how to teleport anything besides yourself.
Quote from CassataGames on November 5, 2007, 8:23 amRivid31 wrote:That isn't entirely correct. light_dynamic can be parented to things, and moves around with them. The trouble I had was figuring out how to teleport anything besides yourself.If you can do this, then maybe you could set it up so that any dynamic lights near 1 portal, are copied over to the other portal so they appear to shine through the portal.
If you can do this, then maybe you could set it up so that any dynamic lights near 1 portal, are copied over to the other portal so they appear to shine through the portal.
Quote from thecake on November 5, 2007, 8:47 amRivid31 wrote:That isn't entirely correct. light_dynamic can be parented to things, and moves around with them. The trouble I had was figuring out how to teleport anything besides yourself.I stand corrected
I stand corrected
Quote from Rivid31 on November 5, 2007, 10:55 amAlright, I played around with this for about an hour and decided that teleporting lights to a portal_detector IS possible, it is just extremely buggy and wouldn't work for a general case.
In order for it to work, though, you need to create an invisible model in front of each portal_detector. Using the portal model as a prop_dynamic instead of a prop_portal, you can accomplish this. Then you have to set up your portal_detectors to parent your light to this model, and then SetParentAttachment of the light to 'particles' which is an attach point for the portal model... also, the portal model has to be perpendicular to the wall...
Setting up two of these I managed to make a light move between them, but it does get slightly glitchy...
Example:
blue portal on detector_1
orange portal not on a detector:
Light shines through to the opposite wall of blue
Move blue portal to detector_2:
Light moves with the blue portal
Put orange portal on detector_1:
No light from either
Move orange portal back off detector:
Still no light
Re-fire blue back right where it was:
Light goes across from blueAs you can see.... this is not optimal, and still is not universal, as you would need to set up MANY portal detectors, and MANY portal-props to attach to, and even then... still doesn't really work if you put both portals on portal detectors (which would happen quite frequently).
All this said, I did only work on it for a short amount of time... there could be another way. Also, I've only been working in hammer for ~2 weeks, so what the hell do I know.
Best bet: set up spot lights in distinct locations and only have this effect work there by switching on/off the lights.
Alright, I played around with this for about an hour and decided that teleporting lights to a portal_detector IS possible, it is just extremely buggy and wouldn't work for a general case.
In order for it to work, though, you need to create an invisible model in front of each portal_detector. Using the portal model as a prop_dynamic instead of a prop_portal, you can accomplish this. Then you have to set up your portal_detectors to parent your light to this model, and then SetParentAttachment of the light to 'particles' which is an attach point for the portal model... also, the portal model has to be perpendicular to the wall...
Setting up two of these I managed to make a light move between them, but it does get slightly glitchy...
Example:
blue portal on detector_1
orange portal not on a detector:
Light shines through to the opposite wall of blue
Move blue portal to detector_2:
Light moves with the blue portal
Put orange portal on detector_1:
No light from either
Move orange portal back off detector:
Still no light
Re-fire blue back right where it was:
Light goes across from blue
As you can see.... this is not optimal, and still is not universal, as you would need to set up MANY portal detectors, and MANY portal-props to attach to, and even then... still doesn't really work if you put both portals on portal detectors (which would happen quite frequently).
All this said, I did only work on it for a short amount of time... there could be another way. Also, I've only been working in hammer for ~2 weeks, so what the hell do I know.
Best bet: set up spot lights in distinct locations and only have this effect work there by switching on/off the lights.
Quote from CassataGames on November 5, 2007, 11:12 amWell having mild game programming experience myself, I think it's safe to assume that if you were able to do it period, regardless of the glitches, then eventually the glitches could be ironed out.
Like I said, I think this could be a rather successful project if anyone has the spare time to fix up all the issues and clean it up.
Perhaps the mod could be set up so that only dynamic lights that are parented to an invisible dynamic/physic (which ever would work) object, will go through portals. That way you could copy the actual object (similar to what the game already does when your mid-way through sliding an object through the portal), and then copy the dynamic light. Then parent the copy of the light to the copy of the object.
PS: The idea is not so that lights themselves can travel through portals, the idea is to have the illusion that light is being cast through the portal and showing up on the opposite portal.
Well having mild game programming experience myself, I think it's safe to assume that if you were able to do it period, regardless of the glitches, then eventually the glitches could be ironed out.
Like I said, I think this could be a rather successful project if anyone has the spare time to fix up all the issues and clean it up.
Perhaps the mod could be set up so that only dynamic lights that are parented to an invisible dynamic/physic (which ever would work) object, will go through portals. That way you could copy the actual object (similar to what the game already does when your mid-way through sliding an object through the portal), and then copy the dynamic light. Then parent the copy of the light to the copy of the object.
PS: The idea is not so that lights themselves can travel through portals, the idea is to have the illusion that light is being cast through the portal and showing up on the opposite portal.