swinging light

swinging light

Re: swinging light Posted by darkdruid on Fri Dec 17th 2004 at 8:26pm
darkdruid
14 posts
Posted 2004-12-17 8:26pm
14 posts 111 snarkmarks Registered: Sep 1st 2003 Location: United States of America
I am trying to create a swinging light (similar to those in
de_prodigy). I tried every tutorial on tieing entities to ropes and too
no avial. I know the light needs to be a light_dynamic, but when I go
to run the game to see the light_dynamic it doesn't show up. Anyone got
any ideas?
Re: swinging light Posted by Arzie on Fri Dec 17th 2004 at 8:39pm
Arzie
20 posts
Posted 2004-12-17 8:39pm
Arzie
member
20 posts 282 snarkmarks Registered: Nov 14th 2004 Occupation: - Location: -Finland
Light doesnt need to be a light_dynamic, you can use a normal light, and put it under the lamp. Should work better than the dynamic light (if you are using complex, or a big map). But the lighspot, use point_spotlight, and tie its parent to lamp, and remember to set the right direction. Should work fine.
Re: swinging light Posted by Vahn on Fri Dec 17th 2004 at 10:32pm
Vahn
8 posts
Posted 2004-12-17 10:32pm
Vahn
member
8 posts 1 snarkmarks Registered: Nov 22nd 2004
<DIV>i just did that following this tutorial :</DIV>
<DIV> </DIV>
<DIV>http://www.hl2world.com/wiki/index.php/Dynamic_Lights</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>It worked fine for me .... until i messed around with the ropelenght ... at one point the model ( prop_physics_override ) just dissapeared and i couldnt bring it back ...</DIV>
<DIV> </DIV>
<DIV>I carefully built everything from scrap again then and used another model ( models/props_c17/light_industrialbell01_on ) and positioned the move_rope , phys_pulleyconstraint, keframe_rope , the prop, and the light_dynamic exactly on one line of the grid and it works perfect now :biggrin: </DIV>
<DIV> </DIV>
<DIV>I alrdy built a hallway with 6 of these lamps and i have no problems at all </DIV>
<DIV> </DIV>
<DIV>if u want i can send u my .vmf somehow so u can have a look for urself :smile: </DIV>
Re: swinging light Posted by Raeth on Sat Dec 18th 2004 at 12:07am
Raeth
62 posts
Posted 2004-12-18 12:07am
Raeth
member
62 posts 16 snarkmarks Registered: Nov 24th 2004 Location: USA
I've been trying to produce this effect for some time now. I took
a look at the interlopers tutorial, and it was very similar to what I
had been trying. There are two main problems with this approach
-- the light swings crazily, and never goes back to a motionless state,
and the dynamic lighting is completely unrealistic. It looks
WRONG.

It seems clear from looking at Prodigy that the lighting effect was
produced with a point_spotlight parented to the lamp and set to produce
no dynamic light. The actual room lighting comes from a regular
light placed about 128 units below the actual lamp (you can see the
arcs on the walls from the light). This bypasses the horrible
dynamic lighting Half-Life 2 uses.

I'm still not sure how the actual lamp swinging is done. I've
used a phys_lengthconstraint and a phys_pulleyconstraint and neither
seems to give me quite what I what. The movement seems ok, but
the problem is that it never dampens... it just keeps moving at more or
less the same speed forever.

I'm also annoyed that Prodigy came out with this effect first... now
everyone who reviews my map is going to think I ripped it from Prodigy
:sad: .
Re: swinging light Posted by Vahn on Sat Dec 18th 2004 at 12:32am
Vahn
8 posts
Posted 2004-12-18 12:32am
Vahn
member
8 posts 1 snarkmarks Registered: Nov 22nd 2004
<DIV>Arzie i tried ur method and it works well :beerchug: </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>its a good alternative in some cases ... e.g. u cant start light_dynamic entities with "light off" so u cant switch it on or off ( or i just couldnt manage ) </DIV>
<DIV> </DIV>
<DIV>With normal lights and the point_spotlight u have a visible lightbeam and a slight blinding effect when u look directly into its lightsource </DIV>
<DIV> </DIV>
<DIV>the lightbeam might be a bit irritating sometimes due to the choppy movement of the lamp when being moved .... but i guess it would look cool if u would hang the lamp on some kind of static rod ( that moves with the lamp ) instead of attaching it to a rope ..... </DIV>
<DIV> </DIV>
<DIV> </DIV>
Re: swinging light Posted by Raeth on Sat Dec 18th 2004 at 3:20am
Raeth
62 posts
Posted 2004-12-18 3:20am
Raeth
member
62 posts 16 snarkmarks Registered: Nov 24th 2004 Location: USA
After some more fiddling, I was able to emulate the lights in Prodigy
by using a phys_ballsocket and adjusting the mass to .5 and the inertia
to about .25. The length and pulley constraints allowed the light
to sort of wobble back and forth while the light was rocking.
This looked horribly unnatural. The ballsocket, however, keeps
the light in line with the cable at all times. Scaling the mass
down mean the light takes less of a push to get started, and scaling
down the inertia means the light stops moving faster.

The only problem I've seen so far is that when the light goes back to
sleep after several minutes of rocking, it will go to sleep at an angle
instead of while pointing straight down. I'm not sure what causes
this.