|
Re: Light oriented shadows
[Re: Orange Brat]
#32475
08/31/04 10:50
08/31/04 10:50
|
Joined: Feb 2004
Posts: 58 In space
Al
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2004
Posts: 58
In space
|
Thank you Orange
How about static lights, will that ever be possible?
Last edited by Al; 08/31/04 10:52.
|
|
|
Re: Light oriented shadows
[Re: Al]
#32476
08/31/04 11:00
08/31/04 11:00
|
Joined: Aug 2000
Posts: 7,490
Orange Brat

Senior Expert
|

Senior Expert
Joined: Aug 2000
Posts: 7,490
|
Here's the easy one. Just place a dynamic light object where the static light is at(or around it...whatever works once you get this up and running) and instead of defining a color for it, simply make 0,0,0. Make your lightrange whatever you wish(should be consistent with the static light's range so the shadow is affected while the model is within the lit up area). This way, you will have a nice static light that affects the model's shadow and the dynamic light, itself, won't "mix" with it.
In my own project, I combine two dynamic lights with my static. One is as I described above...0,0,0 and a range. The other has a color and that color affects the highlight that shines on the model. I have my.cast turned off on this light, so it does not affect the shadow. I do this to eliminate the bright spotlight effect on level geometry. That doesn't look so good unless you are using fixed point cameras and can hide it.
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: Light oriented shadows
[Re: Orange Brat]
#32477
09/22/04 13:57
09/22/04 13:57
|
Joined: Feb 2004
Posts: 58 In space
Al
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2004
Posts: 58
In space
|
Hi Orange, sorry for not replying sooner, I have been too busy to make anything in 3DGS for the past few weeks. :/ Thank you for the answer, sounds great and I'll try it tonight. You mentioned a second light. What color ( and perhaps what range ) do you usually give it. Do you make it darker than static light?
Last edited by Al; 09/22/04 13:59.
|
|
|
Re: Light oriented shadows
[Re: Orange Brat]
#32479
09/25/04 10:50
09/25/04 10:50
|
Joined: Feb 2004
Posts: 58 In space
Al
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2004
Posts: 58
In space
|
Hi Orange,
hmm it doesn't seem to work, I put a Shadow caster model next to the static light, gave it the following action:
action ShadowCaster
{
my.lightrange = 300; my.red = 0; my.green = 0; my.blue = 0;
}
and the shadow is still oriented by the sun. What could be wrong? I tried both stencil and normal shadow modes :/
Yeah when a model gets close to the static light it gets way too bright highlight from it, so I see your point with second dynamic light.  I assume you made it project a darker color, than the static light?
Last edited by Al; 09/25/04 10:52.
|
|
|
Re: Light oriented shadows
[Re: Al]
#32480
09/25/04 11:00
09/25/04 11:00
|
Joined: Aug 2000
Posts: 7,490
Orange Brat

Senior Expert
|

Senior Expert
Joined: Aug 2000
Posts: 7,490
|
Put this at the beginning of your dynamic light's action:
Code:
if(my.flag7 == on)
{
my.cast = on;
}
else
{
my.cast = off;
}
Change the "flag7" to whatever best suits your code. Make sure the one with color 0,0,0 has its flag set.
If your light action has a loop, place that code before the loop. No sense in checking that each frame. Also, make sure the player's origin actually enters the light's range. Try giving it a huge one for testing purposes. When I first started out, it would never work since I wasn't making the range large enough.
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: Light oriented shadows
[Re: Orange Brat]
#32481
09/25/04 11:10
09/25/04 11:10
|
Joined: Feb 2004
Posts: 58 In space
Al
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2004
Posts: 58
In space
|
Thank you very much, it works!  Let me play with the second light now ( the one that fixes the bright static light's highlight ). You mentioned you crank it way up, but I'm thinking - wouldnt that make it even more bright ? I'd think you'd use a darker color?
Last edited by Al; 09/25/04 12:19.
|
|
|
|