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 (Hanky27, AndrewAMD), 1,271 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Issue with more than 8 dynamic lights ... #252628
02/19/09 10:50
02/19/09 10:50
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 simple level that contains some blocks and a number of MDLs (hallways).

I've placed around 20 dynamic lights in the level (inside the MDL-hallways).

The statistic panel shows 8 lights, never more than that.

Only eight lights are "turned on", all others are turned off.

I've tried adding lights at run time (linked to the "L"-key to add them individually). As soon as I add one, an existing one gets turned off.

I've set max_lights to 128 and have also compiled with the "create meshes" flag set.

Here's the code:
Code:
/**
 * Blank user project.
 *
 */
// Includes
#include "resources.h"	// paths and file binds
#include <acknex.h>
#include <default.c>

#include <t7\t7.h>			///@t7
#include <t7\t7Camera.h>	///@t7 Camera code

#include <t7\t7GE.c>		///@t7 GEs
#include <t7\t7GEBiped.c>	///@t7 Biped
#include <t7\t7GEMovers.c>	///@t7 Doors, Lifts, and Platforms
#include <t7\t7GEPickups.c>	///@t7 Pickup items.


typedef struct {
	
	VECTOR Lvec;
	COLOR Lcol;
	var LRange;
} Light_EntL;

Light_EntL DLights[20];

var NumRun = 0;

///////////////////////////////////////////////////////////////

action BlueLight()
{
 	wait(1);
 	
}

void init_DLights ()
{
	
vec_set(DLights[0].Lvec,vector(-1497,-212,148));
vec_set(DLights[0].Lcol,vector(0,0,255));
DLights[0].LRange = 300;

vec_set(DLights[1].Lvec,vector(-813,-212,148));
vec_set(DLights[1].Lcol,vector(255,0,0));
DLights[1].LRange = 300;

vec_set(DLights[2].Lvec,vector(-377,-668,24));
vec_set(DLights[2].Lcol,vector(0,10,128));
DLights[2].LRange = 110;

vec_set(DLights[3].Lvec,vector(-377,-1216,148));
vec_set(DLights[3].Lcol,vector(0,255,64));
DLights[3].LRange = 110;

}

function placelight()
{
	if (NumRun < 4)
	{
		you = ent_create(NULL, DLights[NumRun].Lvec, BlueLight);
		you.lightrange = DLights[NumRun].LRange;
		vec_set(you.blue,DLights[NumRun].Lcol);
		NumRun += 1 ;
	}
}
void main()
{

	
	max_lights = 128;
	
	init_DLights();
	
	
	if(project_load("myProj.xml") == 0)	// load up game from an xml file
	{
		sys_exit("Couldn't load myProj.xml");
	}

	on_l = placelight;
		
	while(project_update() != 0)
	{
	
		wait(1);
	}
	sys_exit("Normal Exit");
}


I'm using A7.66Pro, WinXP SP3, Nvidia 8800GTS 320MB - Treiber 6.14.11.8048 (Nov. 2008).

Any tips / help would be appreciated ...


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Issue with more than 8 dynamic lights ... [Re: Andreas C] #252632
02/19/09 11:24
02/19/09 11:24
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
First, use the current version. This probably won't help here, but you should not use an old version when looking into a problem.

If the statistics panel is stuck at 8 lights, you're possibly still in A6 light mode, and the A7 light manager is switched off. Bumpmapping shaders won't work then either. This happens when either your level - or some part of your level - was accidentally compiled in A6 mode, or when the "patch" variable is set.

The other possibility is that there is something wrong with your whole level construction, for instance when your level consists of a single gigantic mesh. Of course then you can't see more than 8 lights at any point. You mentioned "MDL hallways" - I hope you have not really used a single MDL for your hallways.

Re: Issue with more than 8 dynamic lights ... [Re: jcl] #252669
02/19/09 14:58
02/19/09 14:58
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: jcl
First, use the current version. This probably won't help here, but you should not use an old version when looking into a problem.


Updated to 7.70 ... problem still exists ...

Originally Posted By: jcl
If the statistics panel is stuck at 8 lights, you're possibly still in A6 light mode, and the A7 light manager is switched off. Bumpmapping shaders won't work then either. This happens when either your level - or some part of your level - was accidentally compiled in A6 mode, or when the "patch" variable is set.


I'm not touching the "patch" variable ... so it should be set to the default value.

I use the current compiler and the engine startup window says A7.70 ... is there any other way it could possibly be compiled in A6 mode ?

Originally Posted By: jcl
The other possibility is that there is something wrong with your whole level construction, for instance when your level consists of a single gigantic mesh. Of course then you can't see more than 8 lights at any point. You mentioned "MDL hallways" - I hope you have not really used a single MDL for your hallways.


No, I'm not using a single MDL for the hallways. The individual segments of the hallways are MDLs (three different MDLs that are duplicated "all over the place")

I really hope that it is something else that I've done with the level ... but it's not apparent to me.

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Issue with more than 8 dynamic lights ... [Re: Andreas C] #252712
02/19/09 21:04
02/19/09 21:04
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 built another small level, just using normal level geometry (no MDLs).

Same result. Lights get "switched off" as soon as I add another light, keeping the number of lights to 8 ...

I am using the T7-templates ... that shouldn't be a problem, correct ?

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Issue with more than 8 dynamic lights ... [Re: Andreas C] #252782
02/20/09 07:12
02/20/09 07:12
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Are you including A7 templates from "templates\code"? Have you then set the light number in the templates?

If you are not sure how many lights are actually set, just check max_lights in a panel or with a printf command at runtime. If you set it to 8 in the templates, you won't see more than 8 lights, no matter what you set at startup.

Re: Issue with more than 8 dynamic lights ... [Re: jcl] #252793
02/20/09 08:27
02/20/09 08:27
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: jcl
Are you including A7 templates from "templates\code"?

Yes ...

Originally Posted By: jcl
Have you then set the light number in the templates?

NO whistle ... and that ended up being the problem. Sorry, but I had intentionally NOT touched the templates (in the templates folder) because I wanted to avoid possible conflicts if a future update to the engine includes changed templates.

Is it really recommended to actually change the templates ? crazy Or is the idea to copy them to the project directory and work them from there ?

Originally Posted By: jcl
If you set it to 8 in the templates, you won't see more than 8 lights, no matter what you set at startup.

Yup ... I noticed that smile smile smile smile

And THANK YOU for your assistance !

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Issue with more than 8 dynamic lights ... [Re: Andreas C] #252804
02/20/09 11:27
02/20/09 11:27
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The idea is to copy the templates in the project folder and use the SED or WED "customize" feature for setting all the adjustable parameters. But you can also just directly edit the template copies.


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