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
1 registered members (Quad), 4,644 guests, and 16 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
lightmanager bug? #252487
02/18/09 14:33
02/18/09 14:33
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
I have an indoor level compiled with WED and I wanted to add a muzzle flash to my player( which just an empty sprite since its first person).

My code looks like this:
Code:
my.lightrange = 300;
wait( -0.1 );
my.lightrange = 0;


The code works on some of the level but in other parts it doesn't.

Its really strange, I will be walking along particular spots in the map and it just stops working. Its not like the light doesn't affect particular polygons - it simply does nothing when I cross certain boundaries in the level.

Any tips on how to debug this behavior?

Re: lightmanager bug? [Re: DavidM] #252600
02/19/09 07:03
02/19/09 07:03
Joined: Jul 2000
Posts: 28,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
Frankfurt
Make sure the level is compiled with "Create Meshes". Otherwise it's an A6 level that has a 8 lights limit.

Re: lightmanager bug? [Re: jcl] #252664
02/19/09 14:24
02/19/09 14:24
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
Its compiled with Create Meshes. Plus there is only one light present when the gun 'fires'.

The only guess I had was that perhaps genius was not set on the view, tho I am not sure that would keep it from working.

Re: lightmanager bug? [Re: DavidM] #252702
02/19/09 20:27
02/19/09 20:27
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
Does the lightmanager work from the ABT? Its very odd that as soon as I cross one particular plane in my level the lighting simply stops.

I had a similar issue once before and I 'fixed' it by radically increasing the value of lightrange - but it should still work for smaller values.

Re: lightmanager bug? [Re: DavidM] #252784
02/20/09 07:25
02/20/09 07:25
Joined: Jul 2000
Posts: 28,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
Frankfurt
Yes, the light manager uses the ABT. If the problem only occurs with small light ranges, then no surface is in the range of the light. At least one vertex must be inside the light sphere for seeing any effect of the light. You can see the vertex positions when pressing F11 twice.

If you are unsure about which walls are in the range of your light, I've uploaded a light test shader here:

http://opserver.de/down/lightcount.fx

Set this shader to the wall material - mat_shaded - and you'll see the number of lights on any surface in its color. 0 lights are black, one light is blue, 2 lights green and so on.

If you can't find the reason of the problem this way, you can send the project to support. We'll check.

Re: lightmanager bug? [Re: jcl] #252876
02/20/09 23:34
02/20/09 23:34
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
Sorry I am inexperienced with materials/shaders.

So do I need to add a line like this:
Code:
mat_shaded = "lightCount.fx";

in my source then set the material of the floor to shaded?

I should also mention I have Extra edition (tho I plan to upgrade to Commercial).

Thanks for your help.

Last edited by DavidM; 02/20/09 23:35.
Re: lightmanager bug? [Re: DavidM] #253026
02/22/09 10:20
02/22/09 10:20
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
effect_load(mat_shaded,"lightCount.fx");

Re: lightmanager bug? [Re: TechMuc] #253071
02/22/09 14:34
02/22/09 14:34
Joined: Dec 2008
Posts: 43
D
DavidM Offline OP
Newbie
DavidM  Offline OP
Newbie
D

Joined: Dec 2008
Posts: 43
I get a popup which reads "Shader: Unsupported feature".

JCL I can send it to you if you want to take a look, just msg me instructions.

Re: lightmanager bug? [Re: DavidM] #253072
02/22/09 14:44
02/22/09 14:44
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
Do u have pro or commercial edition?
If not then you can't use shaders


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: lightmanager bug? [Re: Blade280891] #253224
02/23/09 15:53
02/23/09 15:53
Joined: Jul 2000
Posts: 28,094
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,094
Frankfurt
Which version do you use?

Page 1 of 3 1 2 3

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