Sg lighting pack and the current head
by Kevin Johnson · in Torque Game Engine · 09/01/2004 (9:06 am) · 11 replies
Anyone getting anything like this on the latest head or did i dork something up in the install/compile.
exe that came with the pack

exe with sg and the latest head

exe that came with the pack

exe with sg and the latest head

#2
I patched torque 1.2.2 with the lighting pack and that works, however off the HEAD it produces the above result. Patching seems to have taken, as i did the following:
*patch 1.2.2 (no errors)
*merge with HEAD
I also did a manual check and it all seems there. I did some testing and I think it may have something to do with the particle emitter/engine code. Hope that helps, im stumped!
09/02/2004 (8:49 am)
I'm having the same problem.I patched torque 1.2.2 with the lighting pack and that works, however off the HEAD it produces the above result. Patching seems to have taken, as i did the following:
*patch 1.2.2 (no errors)
*merge with HEAD
I also did a manual check and it all seems there. I did some testing and I think it may have something to do with the particle emitter/engine code. Hope that helps, im stumped!
#3
UPDATE
ran the patch against 7/30 head
merged my codebase
works like a champ..
09/02/2004 (2:51 pm)
Ok.. I'll do a cvs checkout by date. -which i had no idea you could do..:)UPDATE
ran the patch against 7/30 head
merged my codebase
works like a champ..
#4
The file netConnection.h had its GhostConstants enum updated from:
enum GhostConstants
{
MaxGhostCount = 1024,
GhostIdBitSize = 10,
GhostLookupTableSize = 1024
};
to:
enum GhostConstants
{
GhostIdBitSize = 12,
MaxGhostCount = 1 << GhostIdBitSize, //4096,
GhostLookupTableSize = 1 << GhostIdBitSize, //4096
GhostIndexBitSize = 4 // number of bits GhostIdBitSize-3 fits into
};
This file is used included by the lightingpack in the files:
sgUniversalStaticLight.cc
sgNewMethods.cc
Im not sure what the problem is yet, however I reverted the enum to its previous form and it worked so it must mean something needs to be updated in the lightingpack files to make them compatible with the HEAD.
09/03/2004 (6:33 am)
I've found out what is causing the problem:The file netConnection.h had its GhostConstants enum updated from:
enum GhostConstants
{
MaxGhostCount = 1024,
GhostIdBitSize = 10,
GhostLookupTableSize = 1024
};
to:
enum GhostConstants
{
GhostIdBitSize = 12,
MaxGhostCount = 1 << GhostIdBitSize, //4096,
GhostLookupTableSize = 1 << GhostIdBitSize, //4096
GhostIndexBitSize = 4 // number of bits GhostIdBitSize-3 fits into
};
This file is used included by the lightingpack in the files:
sgUniversalStaticLight.cc
sgNewMethods.cc
Im not sure what the problem is yet, however I reverted the enum to its previous form and it worked so it must mean something needs to be updated in the lightingpack files to make them compatible with the HEAD.
#5
sgUniversalStaticLight.cc
lines 139,152
change
stream->writeInt(sgParticleEmitterGhostIndex, 10);
to
stream->writeInt(sgParticleEmitterGhostIndex, NetConnection::GhostIdBitSize);
line 166
change
sgParticleEmitterGhostIndex = stream->readInt(10);
to
sgParticleEmitterGhostIndex = stream->readInt(NetConnection::GhostIdBitSize);
09/03/2004 (11:40 am)
Found out what the problem was (The ghostindexid size has changed from 10->12 in torque HEAD), and here is the fix:sgUniversalStaticLight.cc
lines 139,152
change
stream->writeInt(sgParticleEmitterGhostIndex, 10);
to
stream->writeInt(sgParticleEmitterGhostIndex, NetConnection::GhostIdBitSize);
line 166
change
sgParticleEmitterGhostIndex = stream->readInt(10);
to
sgParticleEmitterGhostIndex = stream->readInt(NetConnection::GhostIdBitSize);
#6
1. fresh_cvs
2. my_last_sg_cvs
3. new_sg_cvs (copy of 1.)
then I was used WinMerge202 for looking for different part in code:
- I was updated all changes from my_last_sg_cvs to fresh_cvs (with WinMerge202)
- then I was copy folder fresh_cvs (now with changes) to new_sg_cvs
09/03/2004 (12:26 pm)
I have CVS from today and (after 1 hour) SG Lighting Pack applied too. All work fine. Good practise is create 3 folder:1. fresh_cvs
2. my_last_sg_cvs
3. new_sg_cvs (copy of 1.)
then I was used WinMerge202 for looking for different part in code:
- I was updated all changes from my_last_sg_cvs to fresh_cvs (with WinMerge202)
- then I was copy folder fresh_cvs (now with changes) to new_sg_cvs
#7
09/03/2004 (1:00 pm)
So you don't get the above problem with the white light?
#8
Excellent work, I'll add that to my list of things to update. That ghost bit code in sgUniversalStaticLight must be old - I think the ghost bit enums were added last fall, obviously it's older than that.
Thanks!
-John
09/03/2004 (2:14 pm)
Russell,Excellent work, I'll add that to my list of things to update. That ghost bit code in sgUniversalStaticLight must be old - I think the ghost bit enums were added last fall, obviously it's older than that.
Thanks!
-John
#9
09/03/2004 (8:55 pm)
No, don't problem with white light, because i was change only parts with SG_xxx macros and few functions about set/get colors, all extended or modified functions as stream/netconnection, ... i was used from new CVS release.
#10
09/04/2004 (6:44 am)
One problem. Terrain isn't hilited same as interrior objects. I have correct all changes in new CVS from SG LP 1.1.5. by DOC. If I try exe from SG LP demo, FPS demo show OK (all is hilited) => game scipts must by OK. Where I must looking for BUG?
#11
09/04/2004 (12:54 pm)
The ghost bit enums were added recently, as prep work for the RTS pack.
Torque Owner John Kabus (BobTheCBuilder)
Try patching 1.2.2 or HEAD from 8/16. A lot of changes were added to TGE mid August. Chances are the patch didn't take (did you notice any errors?) or the Lighting Pack code you've added already exists in TGE (if you hand integrated the pack).
Let me know if the earlier TGE version works for you.
-John