Lighting Code Pack Question
by Banshee · in Torque Game Engine · 08/16/2004 (2:46 am) · 33 replies
I was wondering how hard it is to install the lighting pack manual without using a patch, because my version of torque has many modifications I have made to it inside and I don't really want to re-program them back in.
Do you have a guess of how long and how hard it would be.
Thanks
-Banshee
Do you have a guess of how long and how hard it would be.
Thanks
-Banshee
About the author
#2
Updated docs are coming out very soon that outline different ways to merge the Lighting Pack into your existing code.
For now I recommend this:
-Backup your source
-Download TGE 1.2.2
-Patch 1.2.2 with the Lighting Pack patch file
-Test to make sure it's working
-Then use a visual diff tool like WinMerge to merge the Lighting Pack changes into your source tree. Use the Lighting Pack's Install Guide to help identify Lighting Pack changes (some differences in the source will be TGE updates).
This process is fast, easy and helps you become familiar with the Lighting Pack's code.
Hope this helps!
-John
08/16/2004 (3:31 am)
Hi Banshee,Updated docs are coming out very soon that outline different ways to merge the Lighting Pack into your existing code.
For now I recommend this:
-Backup your source
-Download TGE 1.2.2
-Patch 1.2.2 with the Lighting Pack patch file
-Test to make sure it's working
-Then use a visual diff tool like WinMerge to merge the Lighting Pack changes into your source tree. Use the Lighting Pack's Install Guide to help identify Lighting Pack changes (some differences in the source will be TGE updates).
This process is fast, easy and helps you become familiar with the Lighting Pack's code.
Hope this helps!
-John
#3
08/16/2004 (4:44 am)
Took me about an hour and a half w/o the patch
#4
cd to the torque/engine directory
That is 1 set of instructions in a recent patch i tried, i think they are saying :
click the patch.exe, when the dos prompt appears type in something. (but that is not self explanatory type in what?)
so patching is the easy est way to merge code but there definitely needs to be a more understandable method of applying the patch .
cant wait to see what the new docs say.
08/16/2004 (5:09 am)
I haven't had any luck with any patches, i tryed 3 different ones, either they dont patch or they dont compile, probably cuz i never did them be fore, my trouble is they are not very explanatory on how they work, the trouble with most coders is they assume everyone should know what they are talking about, heres an example:cd to the torque/engine directory
That is 1 set of instructions in a recent patch i tried, i think they are saying :
click the patch.exe, when the dos prompt appears type in something. (but that is not self explanatory type in what?)
so patching is the easy est way to merge code but there definitely needs to be a more understandable method of applying the patch .
cant wait to see what the new docs say.
#5
'cd' is a command in the Window, Linux and Mac command prompts that changes the current directory.
Assuming that you've copied the patch file into your Torque directory (clearly defined in docs) all you need to do is (this is from memory - refer to the docs for specifics):
-open the command prompt
-change the current directory to your Torque directory
-run the patch command provided in the docs ('patch p0 < release_x_x_x' where '_x_x_x' is the TGE version number, for instance 'patch p0 < release_1_2_2').
That's it.
-John
08/16/2004 (6:02 am)
Ace,'cd' is a command in the Window, Linux and Mac command prompts that changes the current directory.
Assuming that you've copied the patch file into your Torque directory (clearly defined in docs) all you need to do is (this is from memory - refer to the docs for specifics):
-open the command prompt
-change the current directory to your Torque directory
-run the patch command provided in the docs ('patch p0 < release_x_x_x' where '_x_x_x' is the TGE version number, for instance 'patch p0 < release_1_2_2').
That's it.
-John
#6
08/16/2004 (6:56 am)
Ok thanks for the help
#7
08/16/2004 (6:58 am)
I did the manual installation and it worked great, aside from one spelling error somewhere in the docs, and the fact that I forgot to comment out one line.
#8
08/16/2004 (12:53 pm)
Well its purchased, I have seen what some of my stuff looks like in the demo and it is amazing the difference it makes, I am just gonna install it now!
#9
Btw: can we see a sneak peek of what you're working on?
-John
08/16/2004 (12:59 pm)
Welcome aboard! If you have any questions just ask.Btw: can we see a sneak peek of what you're working on?
-John
#10
Just watch this thread because I will post some pics!
08/16/2004 (1:04 pm)
No problem, you guys are all a great help, once I add it into my main game .exe I will show off some ingame shots.Just watch this thread because I will post some pics!
#11
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static class AbstractClassRep * __cdecl fxLightData::getStaticClassRep(void)" (?getStaticClassRep@fxLightData@@SAPAVAbstractClassRep@@XZ) referenced in function "public: static class AbstractClassRep * __cdecl sgUniversalStaticLightData::getParentStaticClassRep(void)" (?getParentStaticClassRep@sgUniversalStaticLightData@@SAPAVAbstractClassRep@@XZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static class AbstractClassRep * __cdecl fxLight::getStaticClassRep(void)" (?getStaticClassRep@fxLight@@SAPAVAbstractClassRep@@XZ) referenced in function "public: static class AbstractClassRep * __cdecl sgUniversalStaticLight::getParentStaticClassRep(void)" (?getParentStaticClassRep@sgUniversalStaticLight@@SAPAVAbstractClassRep@@XZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static void __cdecl fxLightData::initPersistFields(void)" (?initPersistFields@fxLightData@@SAXXZ) referenced in function "public: static void __cdecl sgUniversalStaticLightData::initPersistFields(void)" (?initPersistFields@sgUniversalStaticLightData@@SAXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual bool __thiscall fxLight::onNewDataBlock(struct GameBaseData *)" (?onNewDataBlock@fxLight@@UAE_NPAUGameBaseData@@@Z) referenced in function "public: virtual bool __thiscall sgUniversalStaticLight::onNewDataBlock(struct GameBaseData *)" (?onNewDataBlock@sgUniversalStaticLight@@UAE_NPAUGameBaseData@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static void __cdecl fxLight::initPersistFields(void)" (?initPersistFields@fxLight@@SAXXZ) referenced in function "public: static void __cdecl sgUniversalStaticLight::initPersistFields(void)" (?initPersistFields@sgUniversalStaticLight@@SAXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLight::inspectPostApply(void)" (?inspectPostApply@fxLight@@UAEXXZ) referenced in function "public: virtual void __thiscall sgUniversalStaticLight::inspectPostApply(void)" (?inspectPostApply@sgUniversalStaticLight@@UAEXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLightData::packData(class BitStream *)" (?packData@fxLightData@@UAEXPAVBitStream@@@Z) referenced in function "public: virtual void __thiscall sgUniversalStaticLightData::packData(class BitStream *)" (?packData@sgUniversalStaticLightData@@UAEXPAVBitStream@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLightData::unpackData(class BitStream *)" (?unpackData@fxLightData@@UAEXPAVBitStream@@@Z) referenced in function "public: virtual void __thiscall sgUniversalStaticLightData::unpackData(class BitStream *)" (?unpackData@sgUniversalStaticLightData@@UAEXPAVBitStream@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual bool
....
....
map2dif.exe : fatal error LNK1120: 23 unresolved externals
I maybe be dreaming but it seems as though the latest source release has the lightmap fixes in map2dif, or did I merge it, and didn't remember doing so. I wish garagegames, would make a release with all the lighting stuff in it, I did mine by hand, took some time to do, I just don't feel 100% confident in it :) I did see that it doesn't seem to be compatible with directx, is this true?
08/18/2004 (2:41 pm)
I think I have mine working, although I can't for some reason get map2dif to compile.sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static class AbstractClassRep * __cdecl fxLightData::getStaticClassRep(void)" (?getStaticClassRep@fxLightData@@SAPAVAbstractClassRep@@XZ) referenced in function "public: static class AbstractClassRep * __cdecl sgUniversalStaticLightData::getParentStaticClassRep(void)" (?getParentStaticClassRep@sgUniversalStaticLightData@@SAPAVAbstractClassRep@@XZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static class AbstractClassRep * __cdecl fxLight::getStaticClassRep(void)" (?getStaticClassRep@fxLight@@SAPAVAbstractClassRep@@XZ) referenced in function "public: static class AbstractClassRep * __cdecl sgUniversalStaticLight::getParentStaticClassRep(void)" (?getParentStaticClassRep@sgUniversalStaticLight@@SAPAVAbstractClassRep@@XZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static void __cdecl fxLightData::initPersistFields(void)" (?initPersistFields@fxLightData@@SAXXZ) referenced in function "public: static void __cdecl sgUniversalStaticLightData::initPersistFields(void)" (?initPersistFields@sgUniversalStaticLightData@@SAXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual bool __thiscall fxLight::onNewDataBlock(struct GameBaseData *)" (?onNewDataBlock@fxLight@@UAE_NPAUGameBaseData@@@Z) referenced in function "public: virtual bool __thiscall sgUniversalStaticLight::onNewDataBlock(struct GameBaseData *)" (?onNewDataBlock@sgUniversalStaticLight@@UAE_NPAUGameBaseData@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: static void __cdecl fxLight::initPersistFields(void)" (?initPersistFields@fxLight@@SAXXZ) referenced in function "public: static void __cdecl sgUniversalStaticLight::initPersistFields(void)" (?initPersistFields@sgUniversalStaticLight@@SAXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLight::inspectPostApply(void)" (?inspectPostApply@fxLight@@UAEXXZ) referenced in function "public: virtual void __thiscall sgUniversalStaticLight::inspectPostApply(void)" (?inspectPostApply@sgUniversalStaticLight@@UAEXXZ)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLightData::packData(class BitStream *)" (?packData@fxLightData@@UAEXPAVBitStream@@@Z) referenced in function "public: virtual void __thiscall sgUniversalStaticLightData::packData(class BitStream *)" (?packData@sgUniversalStaticLightData@@UAEXPAVBitStream@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall fxLightData::unpackData(class BitStream *)" (?unpackData@fxLightData@@UAEXPAVBitStream@@@Z) referenced in function "public: virtual void __thiscall sgUniversalStaticLightData::unpackData(class BitStream *)" (?unpackData@sgUniversalStaticLightData@@UAEXPAVBitStream@@@Z)
sgUniversalStaticLight.obj : error LNK2019: unresolved external symbol "public: virtual bool
....
....
map2dif.exe : fatal error LNK1120: 23 unresolved externals
I maybe be dreaming but it seems as though the latest source release has the lightmap fixes in map2dif, or did I merge it, and didn't remember doing so. I wish garagegames, would make a release with all the lighting stuff in it, I did mine by hand, took some time to do, I just don't feel 100% confident in it :) I did see that it doesn't seem to be compatible with directx, is this true?
#12
08/18/2004 (2:59 pm)
I guess I got it to compile, I need to export some stuff to test it.
#13
You need to add the Lighting Pack files to the map2dif project.
(from the Integration Guide):
The map2dif light map changes are included in both the patch files and the docs.
-John
08/18/2004 (3:59 pm)
Hi Tim,You need to add the Lighting Pack files to the map2dif project.
(from the Integration Guide):
Quote:
The following files need to be added to project or make files for both the demo app and map2dif (this step is dependent on your development environment; for Visual Studio create a source folder named 'source files/synapseGaming/contentPacks/lightingPack' in the FileView workspace tab and then add the files to that folder):
-synapseGaming/contentPacks/lightingPack/sgLightMap.cc
-synapseGaming/contentPacks/lightingPack/sgNewMethods.cc
-synapseGaming/contentPacks/lightingPack/sgUniversalStaticLight.cc
-collision/concretePolyList.cc (may already be added depending on the Torque version)
-game/fx/fxLight.cc (already added to demo app)
The map2dif light map changes are included in both the patch files and the docs.
-John
#14
Just a heads up ...
In 1.1.5, the patch file for head as of 07/30/2004 (which is typoed in the install docs as 2003 in one place) is slightly fubared.
A "no new line at end of file" error from diff has crept in, which causes patch to barf around the volume light stuff.
Also, when using patch from unxutils it just "crashes" with a useless error message. Dunno if that's anything to do with my setup, but I had to dig out an old patch.exe I had laying around to get it to "work".
I dont know if the other patch files have similar issues. You can fix the patch file easily enough by hacking it by hand (make sure it gets saved with Unix style line endings, though)
Anyway, shouldnt be doing this at 5am after no sleep so will relook at it tommorow.
T.
08/18/2004 (7:47 pm)
Hey John,Just a heads up ...
In 1.1.5, the patch file for head as of 07/30/2004 (which is typoed in the install docs as 2003 in one place) is slightly fubared.
A "no new line at end of file" error from diff has crept in, which causes patch to barf around the volume light stuff.
Also, when using patch from unxutils it just "crashes" with a useless error message. Dunno if that's anything to do with my setup, but I had to dig out an old patch.exe I had laying around to get it to "work".
I dont know if the other patch files have similar issues. You can fix the patch file easily enough by hacking it by hand (make sure it gets saved with Unix style line endings, though)
Anyway, shouldnt be doing this at 5am after no sleep so will relook at it tommorow.
T.
#15
Did you run patch with the option to read the file as binary? I was positive the HEAD and 1.2.2 patches were generated the same way.
08/19/2004 (5:57 am)
Thanks Tom, I'll check it out tonight.Did you run patch with the option to read the file as binary? I was positive the HEAD and 1.2.2 patches were generated the same way.
#16
I have TGE CVS from today (19.08.2004) and I was apply patch_1_2_2, after patching, big part of code have duplicate function or redefinition, or other compiler error !!!!
08/19/2004 (8:05 am)
Hi,I have TGE CVS from today (19.08.2004) and I was apply patch_1_2_2, after patching, big part of code have duplicate function or redefinition, or other compiler error !!!!
#17
That's because Ben added the light map fix into HEAD.
Also the 1.2.2 patch is only for the 1.2.2 release not HEAD. The 7/30/2004 patch works with HEAD prior to 8/17/2004.
I recommend getting TGE out of cvs by date using 8/16/2004 then patch it with the 7/30/2004 patch.
-John
08/19/2004 (8:17 am)
Andy,That's because Ben added the light map fix into HEAD.
Also the 1.2.2 patch is only for the 1.2.2 release not HEAD. The 7/30/2004 patch works with HEAD prior to 8/17/2004.
I recommend getting TGE out of cvs by date using 8/16/2004 then patch it with the 7/30/2004 patch.
-John
#18
08/19/2004 (8:37 am)
OK. I.G.I. :)
#19
In the end I did it manually. Seems somehow I managed to overlook the --binary option in the docs, so that was probably what happened there. Matt F said it applied cleanly for him earlier so it may be ok.
I'm not 100% confident everything is in and working at the moment, but near as I can tell it is. Any remaining issues are due to the codebase I'm merging with, though, not your stuff. I like to live dangerously :)
T.
08/19/2004 (12:53 pm)
John,In the end I did it manually. Seems somehow I managed to overlook the --binary option in the docs, so that was probably what happened there. Matt F said it applied cleanly for him earlier so it may be ok.
I'm not 100% confident everything is in and working at the moment, but near as I can tell it is. Any remaining issues are due to the codebase I'm merging with, though, not your stuff. I like to live dangerously :)
T.
#20
I had added the files to the map2dif project, but for some reason it didn't like it, until I added into the torque lib, then it was fine with it. I'm not convinced that the editor is working(with the lighting pack), sure I can press f12, and get the new light dialog, but I don't see the sgUniversalStaticLight, in my editor. I put the .cs files in, and stuff, but I'm not sure why it doesn't show up, any ideas?
08/20/2004 (1:59 pm)
Couple things of note, I notcied that the lightmap fix was added to the HEAD, and I don't want to bitch, but I don't think that John Kabus's name should have been removed from the code, if he is responsible for the fix. I had added the files to the map2dif project, but for some reason it didn't like it, until I added into the torque lib, then it was fine with it. I'm not convinced that the editor is working(with the lighting pack), sure I can press f12, and get the new light dialog, but I don't see the sgUniversalStaticLight, in my editor. I put the .cs files in, and stuff, but I'm not sure why it doesn't show up, any ideas?
Torque 3D Owner Marco Meier
Slickware Games
There's no better way to do this.