Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 3,464 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Lighting problems in pure model level #229513
09/28/08 09:54
09/28/08 09:54
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hi,

My levels are pure models levels in one hollow block, but I have some strange lighting problems.

I'm using the following action for dynamic lighting:

action light() {
set(my,LIGHT);
vec_set(my.blue,vector(integer(my.skill1),integer(my.skill2),integer(my.skill3)));
my.lightrange = integer(my.skill4);
if is(my,FLAG1) {
set(my,PASSABLE | INVISIBLE);
}
if is(my,FLAG2) {
set(my,CAST);
}
if is(my,FLAG3) {
set(my,SPOTLIGHT);
}
if is(my,FLAG4) {
while(1) {
my.lightrange = integer(my.skill4);
wait(random(20)*time_step);
my.lightrange = 0;
wait(1);
}
}
}

In my main.c I set the following values for lighting:

video_mode = 8;
video_depth = 32;
video_screen = 2;
//shadow_mode=IGNORE_SPRITES+IGNORE_PASSENTS+IGNORE_PASSABLE;
shadow_threshold = 50;
shadow_stencil = 3;
shadow_offset = 2.5;
shadow_range = 100;
floor_range = 1000;
tex_share = 1;
d3d_anisotropy = 0;
mip_flat = 1.5;
mip_shaded = 1.0;
detail_size = 4;
max_lights = 8;
sun_light = 10;

The problem is that depending on the camera's angle my models that are in light range are reacting on my lights or not.
The game is a point and click adventure and the camera is following the player from a static point by just changing the angle.

Can somebody help me please ???
Maybe any hints on how to use dynamic lighting in pure model levels the right way.

Best regards,
Pegamode.

Re: Lighting problems in pure model level [Re: pegamode] #229556
09/28/08 15:46
09/28/08 15:46
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hmm ... I noticed that using lighting with dynamic lights as I do it currently (you can see the code above) costs a lot of FPS.

Is there any better way? Can I use static lights to light my models (I don't mean just to have a shadowmap)???

Does somebody has experiences with lighting model levels ???


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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