Modernization Kit Beta
by Alex Scarborough · in Torque Game Engine · 02/26/2007 (12:02 am) · 331 replies
Due to the absurd length of this thread, a new one has been started HERE. Please post in the new thread!
This thread is essentially a restatement of this except it's crossplatform now.
I am contractually obligated to do at least one (1) shiny thing a month, so here's my shiny thing for this month:
A working Win32 version of the ModernizationKit.
A huge thanks to OneST8 for getting the port started, and to GG for putting me in front of a PC and not minding that I quietly spent around 20 minutes a day getting this working.
Current version is: v0.8 build 0010 released 4-10-07
This is for TGE 1.5.0/1.5.1 ONLY!
Modernization Kit Website
Username: torqueUser
Password: tMK60152
This code is compatible with the latest version of Mac OS X and Windows 2000/XP
Thanks to the fabulous Jeff "Reno" Raab for letting me host this on the server he runs, and to Ben Sparks for setting up the website and forums!
I can't guarantee this code will work, or even compile, on anything other than my personal computer! Backup your copy of TGE if you use this! Actually, download a clean copy and play with that. I am not responsible for any damage done to your hardware or software as a result of using this!
Some notes: Cg is disabled by default, because it saved me the trouble of shoving Cg into TGE under Windows. Trust me, you're not going to miss the Cg layer anyways, GLSL is where it's at. If you do happen to want to enable Cg for whatever reason, uncomment #define SHADER_MANAGER_USE_CG in mkShaderManager.h.
Unit tests are disabled on Windows, to save the trouble of getting the CppUnit library up and running properly. Unit tests are enabled on OS X because you don't have to do anything for them to work; the bundled project file will link with the compiled dylib, copy it into the application bundle, and even change the install path so you really don't have to do a thing to use unit tests.
This code has not been tested on ATI GPUs under Win32. Presumably it will all work, but who knows. It has been confirmed to at least function on nVidia cards (there are a couple of known issues which will be addressed before 2008).
If you would like to subscribe to the Modernization Kit mailing list, submit a bug, or send some general feedback, please use the links on the Modernization Kit Web Center.
Best of luck, and I hope you get some good use, pretty screenshots, or fun out of this code!
This thread is essentially a restatement of this except it's crossplatform now.
I am contractually obligated to do at least one (1) shiny thing a month, so here's my shiny thing for this month:
A working Win32 version of the ModernizationKit.
A huge thanks to OneST8 for getting the port started, and to GG for putting me in front of a PC and not minding that I quietly spent around 20 minutes a day getting this working.
Current version is: v0.8 build 0010 released 4-10-07
This is for TGE 1.5.0/1.5.1 ONLY!
Modernization Kit Website
Username: torqueUser
Password: tMK60152
This code is compatible with the latest version of Mac OS X and Windows 2000/XP
Thanks to the fabulous Jeff "Reno" Raab for letting me host this on the server he runs, and to Ben Sparks for setting up the website and forums!
I can't guarantee this code will work, or even compile, on anything other than my personal computer! Backup your copy of TGE if you use this! Actually, download a clean copy and play with that. I am not responsible for any damage done to your hardware or software as a result of using this!
Some notes: Cg is disabled by default, because it saved me the trouble of shoving Cg into TGE under Windows. Trust me, you're not going to miss the Cg layer anyways, GLSL is where it's at. If you do happen to want to enable Cg for whatever reason, uncomment #define SHADER_MANAGER_USE_CG in mkShaderManager.h.
Unit tests are disabled on Windows, to save the trouble of getting the CppUnit library up and running properly. Unit tests are enabled on OS X because you don't have to do anything for them to work; the bundled project file will link with the compiled dylib, copy it into the application bundle, and even change the install path so you really don't have to do a thing to use unit tests.
This code has not been tested on ATI GPUs under Win32. Presumably it will all work, but who knows. It has been confirmed to at least function on nVidia cards (there are a couple of known issues which will be addressed before 2008).
If you would like to subscribe to the Modernization Kit mailing list, submit a bug, or send some general feedback, please use the links on the Modernization Kit Web Center.
Best of luck, and I hope you get some good use, pretty screenshots, or fun out of this code!
About the author
#62
Thanks for the tip! In the meanwhile I ve figured that out myself. I had that file 'windows.h' in my torque>sdk>lib>msplatfomsdk folder and I added it to the global include and libraries in VS2005. I got to a point where I can make full build with no errors and some warnings. Now I have another problem... When I load up the new torquedemo.exe file, it crashes straight away, not even the gg logo shows up... Any thoughts about this? I think I sent the buildLog file to the WK bug report page last night, but Im not shure (It was really late and I was really tired) Anyways, im sending it again and hope that someone could help me on this one!
EDIT: one other thing I forgot to mention: In the process I also got an error about vc7fix.cpp not being found. I found that file in the vc7 folder and copied over to vc8 folder. I dont know if this has something to do about it, but I think its kinda odd to have a vc7 file in a vc8 project... But hey, Im a total noob in this matter :)
TKX again though!
03/09/2007 (8:51 am)
Hello everyone!Thanks for the tip! In the meanwhile I ve figured that out myself. I had that file 'windows.h' in my torque>sdk>lib>msplatfomsdk folder and I added it to the global include and libraries in VS2005. I got to a point where I can make full build with no errors and some warnings. Now I have another problem... When I load up the new torquedemo.exe file, it crashes straight away, not even the gg logo shows up... Any thoughts about this? I think I sent the buildLog file to the WK bug report page last night, but Im not shure (It was really late and I was really tired) Anyways, im sending it again and hope that someone could help me on this one!
EDIT: one other thing I forgot to mention: In the process I also got an error about vc7fix.cpp not being found. I found that file in the vc7 folder and copied over to vc8 folder. I dont know if this has something to do about it, but I think its kinda odd to have a vc7 file in a vc8 project... But hey, Im a total noob in this matter :)
TKX again though!
#63
03/09/2007 (9:14 am)
I'm not sure about the crashing issue, but I just removed the vc7fix.cpp file from the filelist in Visual Studio. I assumed it was something to do with vc7 and therefore assumed I didn't need it :o)
#64
Im trying to solve all the warnings i get in compile though, but if anyone knows what is going on, please! any help is more than apreciatted!
TKX!
03/09/2007 (10:40 am)
Hmmm... Took that vc7fix off the filelist in VS, but I still have the same problem, the torquedemo crashes straight away...Im trying to solve all the warnings i get in compile though, but if anyone knows what is going on, please! any help is more than apreciatted!
TKX!
#65
03/09/2007 (10:52 am)
One thing I have noticed now I have updated the starter.fps to use this. The surface of the water when you are above it looks nice with the reflections and refraction, but when you go underwater and look up everything is flat again. Is this just me or is the shader not used from under the water? If so, would this be difficult to implement - I would have thought that the water should look / behave the same way whether you are above the surface or below it..?
#67
03/09/2007 (3:57 pm)
@Mike: Please submit a bug report. "It doesn't work" isn't enough information for me to go on, really.
#68
03/09/2007 (4:45 pm)
@Alex: I'm not sure I said "It doesn't work" - I was just asking if it had been implemented. If it has and I am supposed to be seeing refraction from underwater then let me know and I will submit a bug report with the necessary logs. Again - I (we) appreciate your work on this - excellent stuff...
#69
03/09/2007 (4:48 pm)
Yes, there's supposed to be refraction underwater. Refraction was broken on nVidia cards for a while, however that should have been fixed as of build 0008. Please submit a bug report so I can figure out why refraction isn't working (There's a 99% chance it's something really simple).
#70
03/09/2007 (5:05 pm)
OK cool, I'll run it again in the morning and get a console output to send to you. Thanks.
#71
What did you exclude to get it to compile?
03/09/2007 (7:32 pm)
I'm getting the same problem:mkCgTests.cpp ..\engine\ModernizationKit\UnitTests\mkCgTests.cpp(49) : error C2680: 'CGShader *' : invalid target type for dynamic_cast 'CGShader' : class must be defined before using in a dynamic_cast ..\engine\ModernizationKit\UnitTests\mkCgTests.cpp(69) : error C2680: 'CGShader *' : invalid target type for dynamic_cast 'CGShader' : class must be defined before using in a dynamic_cast ..\engine\ModernizationKit\UnitTests\mkCgTests.cpp(89) : error C2680: 'CGShader *' : invalid target type for dynamic_cast 'CGShader' : class must be defined before using in a dynamic_cast
What did you exclude to get it to compile?
#72
Finally I got it working! I really thought that I had my drivers fully updated. Now the torquedemo.exe file runs with no prob! Although I don't get the water shader going... I have to leave now and I will try to sort it out later when Im back.
Thanks Alex, Jeff and Mike for the support, and excuse my 'newbiness' on this matter.
Take care!
EDIT:Great! Ive finally managed to get this great resource working. Still having trouble with the mkFluid::setReflectionSize(...) which crashes torque as soon as I enable it, there is a reference about this issue some posts above where Alex says that ATI cards dont deal very well with paralax mapping. I think this might be the reason, but I sent Alex an email reporting this anyway. Everything else is running smooooooth.
Some screenshots of a map that Im developing but with the MK:
DRL enabled and Blooming!
Another one...
Some flickering occurs, but again I think its the graphic card.
Im going to study the documentation that comes with MK to learn more about how this stuff really works.
I know that this subject was discussed earlier but... Is there a way for .dts shapes aswell? hehehe Hope it comes out wit the 0009 version.
TKX!
03/10/2007 (9:09 am)
Blaaaaaahrg!Finally I got it working! I really thought that I had my drivers fully updated. Now the torquedemo.exe file runs with no prob! Although I don't get the water shader going... I have to leave now and I will try to sort it out later when Im back.
Thanks Alex, Jeff and Mike for the support, and excuse my 'newbiness' on this matter.
Take care!
EDIT:Great! Ive finally managed to get this great resource working. Still having trouble with the mkFluid::setReflectionSize(...) which crashes torque as soon as I enable it, there is a reference about this issue some posts above where Alex says that ATI cards dont deal very well with paralax mapping. I think this might be the reason, but I sent Alex an email reporting this anyway. Everything else is running smooooooth.
Some screenshots of a map that Im developing but with the MK:
DRL enabled and Blooming!
Another one...
Some flickering occurs, but again I think its the graphic card.Im going to study the documentation that comes with MK to learn more about how this stuff really works.
I know that this subject was discussed earlier but... Is there a way for .dts shapes aswell? hehehe Hope it comes out wit the 0009 version.
TKX!
#73
1>LINK : fatal error LNK1181: cannot open input file 'ljpeg.lib'
after removing vc7fix.cpp
Im using vc8 btw.
03/13/2007 (1:37 pm)
I get this error, 1>LINK : fatal error LNK1181: cannot open input file 'ljpeg.lib'
after removing vc7fix.cpp
Im using vc8 btw.
#74
03/13/2007 (2:10 pm)
Sounds like you tried to build the project only without previously building the rest of the solution
#75
Clean stock TGE 1.5 and VC++ Express 2005.
Specifically, I've found the following issues, checked twice now for my own sanity:
1. The Torque Demo.vcproj file in the vc8 folder is for VC7, as it includes out.VC7.DEBUG as the target build directory, the vc7fix.cpp file, and a whole load of references for the nvidia cg.lib files. Also contains some compiler specific options for VC7.
2. A lot of the .cs files for the updated demo are missing, at first glance all of the updated scripts in example/demo/data/interiors
3. For the scripts that are included there are some evil text encoding issues going on causing script compilation to fail. (Double-byte symbols in ascii-encoded files.)
At this point, after about 4 hours I've got the MK compiling, but without the cs files for the updated demo am yet to see anything working. You can fix the project file issue by just adding the ModernisationKit folder and lightingSystem/sgD3DCompatibility.[cc|h] files to your original Torque Demo project and rebuilding.
But a working version would be most appreciated. :)
03/13/2007 (4:48 pm)
I had all the same problems as T Squared, having downloaded the MK zip file (http://www.ttrgame.com/MK/MKcode/RELEASE.zip) a few hours ago.Clean stock TGE 1.5 and VC++ Express 2005.
Specifically, I've found the following issues, checked twice now for my own sanity:
1. The Torque Demo.vcproj file in the vc8 folder is for VC7, as it includes out.VC7.DEBUG as the target build directory, the vc7fix.cpp file, and a whole load of references for the nvidia cg.lib files. Also contains some compiler specific options for VC7.
2. A lot of the .cs files for the updated demo are missing, at first glance all of the updated scripts in example/demo/data/interiors
3. For the scripts that are included there are some evil text encoding issues going on causing script compilation to fail. (Double-byte symbols in ascii-encoded files.)
At this point, after about 4 hours I've got the MK compiling, but without the cs files for the updated demo am yet to see anything working. You can fix the project file issue by just adding the ModernisationKit folder and lightingSystem/sgD3DCompatibility.[cc|h] files to your original Torque Demo project and rebuilding.
But a working version would be most appreciated. :)
#76
1) I'll run that by Jeff. Again. From what I know, the VC8 file was generated by opening the VC7 file with VC8. Ergo, the given issues (out.VC7.DEBUG, vc7fix.cpp, etc.) are to be expected and don't cause issues.
2) ALL modified scripts are provided with the MK download. Those scripts in example/demo/data/interiors? The MK generates those the first time you run it. Did you call the necessary console functions?
3) I'll look into it. I find that rather odd as I have personally run the MK on some six different computers now without issues, and no one else has reported a similar issue to date.
Sorry if I sound a bit snippy, but I take claims that the MK download doesn't work quite seriously.
@coxosclassic: I didn't get your email. Could you resend it?
03/13/2007 (5:47 pm)
@Sebastian1) I'll run that by Jeff. Again. From what I know, the VC8 file was generated by opening the VC7 file with VC8. Ergo, the given issues (out.VC7.DEBUG, vc7fix.cpp, etc.) are to be expected and don't cause issues.
2) ALL modified scripts are provided with the MK download. Those scripts in example/demo/data/interiors? The MK generates those the first time you run it. Did you call the necessary console functions?
MaterialManager::setShaderQuality(500); mkFluid::setReflectionSize(1024); mkFluid::enableRefraction(1); DRL::enable(1); DRL::setBloomQuality(3);
3) I'll look into it. I find that rather odd as I have personally run the MK on some six different computers now without issues, and no one else has reported a similar issue to date.
Sorry if I sound a bit snippy, but I take claims that the MK download doesn't work quite seriously.
@coxosclassic: I didn't get your email. Could you resend it?
#77
Thanks for the prompt reply. You don't sound snippy at all, I'd be exactly the same if somebody was claiming my code didn't work!
When using the vc8/Torque Demo.proj project file VC++ Express 2005 is writing output to out.CV7.DEBUG, but libraries are not being found by the linker when using that project file, and it tries to compile a vc7fix.cpp file that doesn't exist in the provided zip file or in the Torque SDK. I'll be happy to provide a cleaned working project file based on the stock TGE vs2005 project if it helps.
I didn't run those console commands. I see they're in the Getting Started.rtf which I only read the first couple of paragraphs of because I mistakenly thought it was a Mac setup guide. Entirely my fault and I withdraw my point about MK missing files. :)
example/demo/data/init.cs is the file that contains strange double-byte characters near the comments. Bizarrely it shows as an issue on my Win2k3 kit but not on my WinXP kit. I'll dig around a little more and try to find out what's going on there.
I forgot to thank you for making such a remarkable resource available to the community. This is an enchancement to TGE that I would happily pay for as it has visually rejuvenated TGE at a time when I was maintaining an increasingly messy codebase from multiple DRL/cg resources and unhappily contemplating migration to TGEA.
Seb.
03/14/2007 (3:25 am)
@AlexThanks for the prompt reply. You don't sound snippy at all, I'd be exactly the same if somebody was claiming my code didn't work!
When using the vc8/Torque Demo.proj project file VC++ Express 2005 is writing output to out.CV7.DEBUG, but libraries are not being found by the linker when using that project file, and it tries to compile a vc7fix.cpp file that doesn't exist in the provided zip file or in the Torque SDK. I'll be happy to provide a cleaned working project file based on the stock TGE vs2005 project if it helps.
I didn't run those console commands. I see they're in the Getting Started.rtf which I only read the first couple of paragraphs of because I mistakenly thought it was a Mac setup guide. Entirely my fault and I withdraw my point about MK missing files. :)
example/demo/data/init.cs is the file that contains strange double-byte characters near the comments. Bizarrely it shows as an issue on my Win2k3 kit but not on my WinXP kit. I'll dig around a little more and try to find out what's going on there.
I forgot to thank you for making such a remarkable resource available to the community. This is an enchancement to TGE that I would happily pay for as it has visually rejuvenated TGE at a time when I was maintaining an increasingly messy codebase from multiple DRL/cg resources and unhappily contemplating migration to TGEA.
Seb.
#78
other than that, what are people using as drl values, i have a dark and spooky game, and all my missions look like a wonderful sunny day(being a bad thing)..
-Usul
03/14/2007 (7:56 am)
Hey every one, just a note on my earlier post's about my interiors, Alex has reveal to me that there is a vertice max at about 65000 on a interior, that being allot! he didn't think that any one would ever exceed it, but seeing as my interior zones are massive (95000+), that was definitely the problem, and they are being modified as we speak.. Just if any one ever has a problem like this, it might be your interiors being to detailed (65,536 vertices), and you should rethink them..other than that, what are people using as drl values, i have a dark and spooky game, and all my missions look like a wonderful sunny day(being a bad thing)..
-Usul
#79
03/14/2007 (8:52 am)
I see much the same thing trying to compile this with VC++ 2005 EE as Sebastian. There's a vc8 directory in the ZIP, but it doesn't include the rest of the project files. So if you copy that file into TGE 1.5's normal "vs2005" directory and load it up, there are still the problems Sebastian mentioned. I never did get it to compile correctly... some of the object files go to out.VC7.RELEASE and some to out.VC8.RELEASE, then the project can't find them at link time so rebuilds them all again, and then eventually fails with more linker errors. I'm not very fluent with VC++ 2005 EE yet, so I'm not exactly sure what's going on... in the meantime I hope someone else who is fluent will contribute updated files for the "vs2005" directory so this will just build. :-)
#80
I'm not sure exactly how to run this (newb trouble) so I run starter.fps and entered the commands into the console. I had to disable one of the calls "initCanvas" in the .cs files related to "common" and "starter.fps" - unless I do this, I get the assert at line 39 of gui/shiny/guiEffectCanvas.cc. Also, I had to change the initCanvas call to pass the new 2nd argument as "true", or there is no shader rendering at all (but that's probably expected since that's what the demo does).
I'm running on Mandrake 10.1 with ATI proprietary drivers 4.3.0-8.12.10 (which are pretty old actually).
Anyone else get this working on Linux?
03/14/2007 (9:02 am)
Btw, I got this to build on Linux, but the frame rate in starter.fps is terrible (3-5 fps) on my system when looking out over the water and at the big towers from the starting point (Radeon 9600XT 128MB, Athlon 3200+, 1GB RAM). Also, the water is not being rendered correctly (no texture to the water surface and the "reflections" are kinda there but screwed up), so I'm not sure what's wrong.I'm not sure exactly how to run this (newb trouble) so I run starter.fps and entered the commands into the console. I had to disable one of the calls "initCanvas" in the .cs files related to "common" and "starter.fps" - unless I do this, I get the assert at line 39 of gui/shiny/guiEffectCanvas.cc. Also, I had to change the initCanvas call to pass the new 2nd argument as "true", or there is no shader rendering at all (but that's probably expected since that's what the demo does).
I'm running on Mandrake 10.1 with ATI proprietary drivers 4.3.0-8.12.10 (which are pretty old actually).
Anyone else get this working on Linux?
Torque Owner Jeff Raab
[ghc]games
Yeah, you'll definetally need the Platform SDK if you dont have it already. If that still doesnt nail it, try dropping me an email and see if we cant get this nailed.