Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 1,470 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
max_lights confusion ? #250650
02/09/09 08:42
02/09/09 08:42
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
I've created a standard "empty level" from the templates. I've added one block and ca. 25 MDLs (from Dexsoft SEWER-kit). Also, I've added 22 dynamic lights (since MDLs aren't lit by static lights.

I've checked the "Create_Meshes" box for compiling.

The first line in my main() routine is :

max_lights = 64;

but when I run the level, the engine turns off all but 8 of the lights (they are in different section of the sewer-maze, so I see it my walking around to where the lights should be).

I have A7-Pro, so I was under the impression this should get me around the 8-light limit.

Any help would be appreciated !

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: max_lights confusion ? [Re: Andreas C] #250737
02/09/09 15:06
02/09/09 15:06
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline
User
Stromausfall  Offline
User

Joined: Dec 2002
Posts: 616
Austria
from the online manual "The Lighting Engine" :

"Normal engines support only 8 dynamic light sources because that's the limit of today's 3D hardware. The A7 engine however contains a light manager that can render a theoretically unlimited number of dynamic light sources at the same time. Before rendering a particular mesh or object its 8 closest light sources are automatically activated and all other light sources are switched off. This way the 3D hardware limit is still kept, despite hundreds of light sources can be visible at the same time."



Maybe the problem lies in the limitation of 8 light sources per mesh. I have to admit that i'm not really sure what a mesh is.
But if your sewer complex is one big model (object) only 8 lights can affect it...
So if that's the problem you should split up your level models into smaller parts i think, so that each part is lighted by max 8 lights - but as i said, just a guess

Re: max_lights confusion ? [Re: Stromausfall] #250744
02/09/09 15:26
02/09/09 15:26
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
I understand about the limit of 8 lights per mesh ... this should not be the issue, since I have lots of individual MDLs and any individual MDL does not have more than 3 lights close to it.

What I see is that the lights 9-22 are turned off / not rendered. If I add another light (e.g. in front of or close to one that is being rendered), then another previously lit light gets turned off.

This is exactly what I would expect under A6 with its hard limit of 8 lights.

Very strange ...

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: max_lights confusion ? [Re: Andreas C] #250840
02/10/09 06:36
02/10/09 06:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Do you have the DYNAMIC flag set on those lights in WED?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: max_lights confusion ? [Re: EvilSOB] #250850
02/10/09 08:24
02/10/09 08:24
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Originally Posted By: EvilSOB
Do you have the DYNAMIC flag set on those lights in WED?


Yup ... DYNAMIC flag is set on all lights ... frown

And if I delete some of the "working" lights, the other ones show up again ... so it seems to definitely be the issue with only 8 dynamic lights being active.

I've put level blocks around the MDLs (in essence "encasing" them), just in case the fact that the sewer-mdls are only one sided, but that did not improve anything ...

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: max_lights confusion ? [Re: Andreas C] #251049
02/11/09 12:13
02/11/09 12:13
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Weird. If its possible, as a test,
can you create the same lights in position from your script?
Just to see if its maybe a compiling issue or a engine issue.
Start with less than 8 and increase till something happens...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: max_lights confusion ? [Re: EvilSOB] #252622
02/19/09 10:21
02/19/09 10:21
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Originally Posted By: EvilSOB
Weird. If its possible, as a test,
can you create the same lights in position from your script?
Just to see if its maybe a compiling issue or a engine issue.
Start with less than 8 and increase till something happens...


Well, I've done that and it just displays 8 dynamic lights. The debug (statistics) panel shows 8 lights ... never more than that ...

But I can't believe that it just doesn't work at all ... obviously to me, I've done something wrong here ... but I just can't figure out what.

I use A7, I've set max_lights to 128, I've checked the "create meshes" box in the compiler options ... I am NOT trying to get more than 8 lights to light a single entity.

I've been reluctant to post this under BUGS because I am pretty sure it is something I am doing wrong here ... I could post the level someplace, but it is so simple that anyone could recreate it in about five minutes.

Any more ideas ?

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: max_lights confusion ? [Re: Andreas C] #252636
02/19/09 11:33
02/19/09 11:33
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If I were you, I'd post a link to here in the "Ask the Developers" forum.

I can understand debug only saying 8 lights, cause there is only 8,
AT ANY ONE TIME. Check on Stromausfall's post to understand that.

If you are relying JUST on that number, dont do so, is a deceiving number.

But Id try posting a link to here in the "Ask the Developers" forum.
There maybe something in your code that is stopping the engine from doing
its "automatic switching lights on and off" to get past the 8-light limit.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: max_lights confusion ? [Re: EvilSOB] #252787
02/20/09 07:46
02/20/09 07:46
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Well, I've posted it in the BUG HUNT.

I've created a simple level (only blocks, no MDL-geometry) with 12 dynamic lights and when I enter the stat-view (pressing F11 twice) I see the bounding boxes for the dyn. lights (only a total of 8 are present in the level at this point). As I create new ones at runtime (in another part of the level that is not visible, I've put in code so I can individually add a total of 4 dyn. lights at specific locations by pressing the "L" key ...), I can see the engine remove one of the current dyn. light entities (in the order they were created ... just like mentioned in the manual)in view .

This does not sound like the A7 light manager is managing much of anything at all.

I hope that JCL & Co. can show me the error of my ways (because frankly, I still don't believe that it just doesn't work at all).

Cheers,
Andreas

Last edited by Andreas C; 02/20/09 08:03.

____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: max_lights confusion ? - SOLVED [Re: Andreas C] #252794
02/20/09 08:30
02/20/09 08:30
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline OP
Senior Member
Andreas C  Offline OP
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Ok,
as I suspected ... it was something I did (or didn't do in this case crazy !).

The T7-templates (display.c) sets the max_lights variable to 8 ... my setting the max_lights variable had no effect whatsoever.

I needed to change the template code.

And voilá ... it works.

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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