2 registered members (Hanky27, AndrewAMD),
1,271
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Senior Member
|
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:
/**
* 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: jcl]
#252669
02/19/09 14:58
02/19/09 14:58
|
Joined: Sep 2001
Posts: 375 Hamburg, Germany / Springfield...
Andreas C
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
|
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 ... 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 ? 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
OP
Senior Member
|
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: jcl]
#252793
02/20/09 08:27
02/20/09 08:27
|
Joined: Sep 2001
Posts: 375 Hamburg, Germany / Springfield...
Andreas C
OP
Senior Member
|
OP
Senior Member
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
|
Are you including A7 templates from "templates\code"?
Yes ... Have you then set the light number in the templates? NO ... 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 ? Or is the idea to copy them to the project directory and work them from there ? 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 And THANK YOU for your assistance ! Cheers, Andreas
____________________________________________________ GameCore / Unity / UDK Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5 TextureMaker / PSP-X
|
|
|
|