Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,699 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Light oriented shadows [Re: Orange Brat] #32483
09/26/04 01:57
09/26/04 01:57
Joined: Feb 2004
Posts: 58
In space
A
Al Offline OP
Junior Member
Al  Offline OP
Junior Member
A

Joined: Feb 2004
Posts: 58
In space
Thank you I'll play with it and see what looks best hehe.

By the way, do you perhaps know of a Resident Evil style inventory script, or even better, how to make it ? I need one :/

Re: Light oriented shadows [Re: Al] #32484
09/26/04 04:41
09/26/04 04:41
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I haven't gotten to that point, but I'm sure there is something around here.


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] #32485
10/05/04 07:59
10/05/04 07:59
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline
Developer
LogantheHogan  Offline
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
Orange brat:

I have a question about your method. I haven't tried it, but it sounds like it would look fine, but that is not my question. My question is, wouldn't having so many dynamic lights cut down the framerate quite a bit, and wouldn't you easily exceed the alotted number of dynamic lights, causing some of them to be extinguished? I would expect that you have some code that extinguishes the light when it is out of the player's view or out or range of the player - would you mind sharing it if you do?

Thanks,

Logan

Re: Light oriented shadows [Re: LogantheHogan] #32486
10/05/04 09:04
10/05/04 09:04
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I usually don't have very many of the lights in the view at once, so you can get away with it. The only thing that hogs my framerate are stencil shadows when they are close to the camera(I use fixed point views mainly) and areas that have not been optimized due to only using preview builds. Final builds will take care of them.

Below is the poor man's, basic version of my dynamic light action. The one I use is 2 or 3 times longer, and it allows for lots of control over blinking, color, and range(constant or random), as well as, a few other things.

If you want the light to influence a model's stencil shadow, set its FLAG1. SKILL1-SKILL4 deals with color and range, and if the player is greater than the value assigned to SKILL5, the light is turned off:

Code:
  
action dynamiclight
{
while(player == null) {wait(1);}
my.passable = on;
if(my.flag1 == on)
{
my.cast = on;
}
else
{
my.cast = off;
}
while(1)
{
while(player == null) {wait(1);}
if(vec_dist(player.x,my.x) < my.skill5)
{
my.lightrange = my.skill1;
my.red = my.skill2;
my.green = my.skill3;
my.blue = my.skill4;
}
else
{
my.lightrange = 0;
}
}
wait(1);
}




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] #32487
10/05/04 09:19
10/05/04 09:19
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline
Developer
LogantheHogan  Offline
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
Thanks Orange Brat! I assume its probably OK to have values 1 and 5 always the same (or maybe 5 just a little greater), and skill 2-4 would be 0 if flag1 is on (I know you know all this I'm just thinking out loud). I'll definitely give it a whirl to see how I like the effect.

Logan

Re: Light oriented shadows [Re: LogantheHogan] #32488
10/05/04 16:26
10/05/04 16:26
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I usually keep 1 and 5 the same for the shadow influencer and set 2-4 to 0. It emits no light; thus you won't see the light extinguish.

That's the most tricky part of turning non-0 lights off and on. It just doesn't look good if the player can see the light go off. That's why you have to make sure to keep it on long enough for them not to. It gets tricky and frustrating sometimes....esp with traditional 1st person and 3rd person chase cams. I can hide it better with fixed cams, but I have a tendency to want to show the player way off in the distance, and I run into problems, sometimes.

Stencil shadows are somewhat limited right now, so you'll have lots of shadows just appear out of nowhere and disappear just the same. I made a lot of suggestions a few weeks ago, and now that DX9 is in, hopefully that will get upgraded sometime during the next couple of updates.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1