Game Development Community

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.

farm1.static.flickr.com/123/370544870_646796e1aa.jpg

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!
#41
03/04/2007 (4:01 pm)
Having a little problems with big complex interior, wanted to post here before i sent a bug report, as it does not happened with my simple interiors, also the bugged interior makes use of the null texture, the simple does not..

Any one else try this?

img291.imageshack.us/img291/3735/mkbug03cl7.th.jpg

My drivers are fully updated(after first encounter with the problem) and its a clean 1.5 only with MK

/*::Spec's::*/
OS: Windows XP Professional (5.1, build 2600)
Chipset: NVIDIA
BIOS: Phoenix - AwardBIOS v6.00PG
Processor: AMD Athlon XP 2200+, MMX, 3DNow, ~1.8Ghz
Grafix: GeForce FX 5600 Ultra (256 MB)
Memory: 1024 MB RAM
Misc: Max Texture Units: 4

Console.log
#42
03/05/2007 (3:21 am)
I wish I understood all this more.
I have some notes and questions.
I've barely slept (trying to deploy my latest beta) so I hope this stuff makes sense.
Time is really short for me, I haven't gotten to focus on this with the patience of a blogger drinking morning coffee like I should have.
Thanks for the above posts, I was wondering about skipping the normals generation.
The normals autogeneration drastically increased my load times (I have square size 16 zones that are fairly complex).
I scripted up the materials after the normals were made and all is well again with load times.
However, I had to hand script the materials because the autogenerated scripts (autogenMatList.cs) were missing tons of entries, had lines that were incomplete and full of syntax errors.
They look something like this:
addMaterialMapping("METFLR02", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/METFLR02_height_auto");
addMaterialMapping("RTBROCKBEAM", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/RTBROCKBEAM_height_auto");
addMaterialMapping("ROOFTOP2", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/ROOFTOP2_height_auto");
addMaterialMapping("RTBRICB_DKPIE", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/RTBRICB_DKPIE_height_auto");
addMaterialMapping("ROTTEN_02", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/ROTTEN_02_height_auto");
t_auto");
o");
addMaterialMapping("G_RTBRICB_DK", "normal: main/client/data/interiors/Ruins/Buildings/RuinsJ/G_RTBRICB_DK_height_auto");
Being able to exec the autogenMatList.cs files would be great, and I assume that's the plan?
Since I didn't know how to turn off the normals and the script generation wasn't working for me I made 4 levels of normals details.
Off, low, medium, and high.
Off being a 2K PNG containing a flat baby blue normal (hey, it performs great and maybe even helps the lighting).
In my options GUI I setup a pref and a listbox for it and exec a normals_low.cs (or normals_high.cs, etc) depending on the pref.
Works great.
I have a couple of huge city zones (chalk full of giant interiors) and no problems with the normals on them at all.
Do the normals keep the hight data in the alpha layer of the PNG?
I had very little luck with JPGs.
Bloom, I understand this is pretty fresh and it says experimental.
As the player, when I look up, the world lighting dims, when I look down (or sometimes even a flat 90 deg angle) it gets super bright and washes out.
So for the time being I can't use it (maybe I just need some time to play with settings more, but I'm running it pretty stock so far).
Is this a known/WIP bug, am I doing something wrong, or does it have something to do with a sun/sky setting (I was told to ask that last one)?
Now that I have the optimization kit, low rez normals, alphaLOD and some other optimizations in my project the frames per sec are through the roof.
When I'm in a major town or city (hundreds of large DIFFS) I get about 25-33 frames per second (and it just "looks" faster even at lower rates).
When I'm hunting out in the wastes I get nearly 64 frames a second solid.
I had a person who was having issues using an older 5XXX series nVidia card with the CG water mod.
They are up to 24-30 fps now since using this resource. =D
I understand this is new but I have to ask, any chance of applying materials to TSShapes or any type of DTS models easily?
I'm a TSE owner (since it first came out), I realize it's for advanced coders and bit beyond me at the time.
I have (and maybe unwisely) chosen not to touch it because of the choice in HLSL, Microsoft Windows, Direct3D and a non-current (TGE 1.5?) Torque engine.
I've been waiting for TGE + GLSL for some time now.
It's not poor man's TSE (TGEA) but over time it could be (minus Atlas?) I think.
I'm willing to help however I can (still need an SVN repository? or a small team of newbs willing to spend 10+ hours a shift?).

Thanks again, epic resource.
#43
03/05/2007 (1:29 pm)
@Paul: We had a similar problem in early testing of the Win32 version, but fixed it. Is there any chance you could send me the specific interior that's causing the trouble?

@BrokeAss Games:
Quote:However, I had to hand script the materials because the autogenerated scripts (autogenMatList.cs) were missing tons of entries, had lines that were incomplete and full of syntax errors.
The autogenerated scripts should work perfectly. I've even subjected them to the horror that is Tim Aste's massive interiors and they worked fine. You may want to try doing a clean build, just in case something got fouled up in there.

Quote:Do the normals keep the hight data in the alpha layer of the PNG?
Yes, the normal maps store height data in the alpha channel for parallax (and maybe relief) mapping.

Quote:Bloom, I understand this is pretty fresh and it says experimental.
As the player, when I look up, the world lighting dims, when I look down (or sometimes even a flat 90 deg angle) it gets super bright and washes out.
DRL will generally require some modification, there should be a document in the 0007 build which goes over DRL. If not, there is one in build 0008 (along with a whole lot of other goodies which should make everyone's life easier).

Quote:I had a person who was having issues using an older 5XXX series nVidia card with the CG water mod.
They are up to 24-30 fps now since using this resource. =D
Nice to know that things are reasonably stable and your users are seeing improvements in framerate (and visual quality I hope!)

Quote:I understand this is new but I have to ask, any chance of applying materials to TSShapes or any type of DTS models easily?
I did a bit of research, and I am about 85% certain applying materials to DTS models would take about three lines of code. We'll call that an exercise left to the reader. The material system is remarkably flexible when you get into it.

Quote:I'm willing to help however I can (still need an SVN repository? or a small team of newbs willing to spend 10+ hours a shift?).
I'll send you an email later today about things the MK could use. It's in pretty good shape as is, but I'm not particularly thrilled with the distribution mechanism.
#44
03/05/2007 (9:35 pm)
Build 0008 is up, and includes the handy MK_AUTOGEN_NMAP define to disable interior normal map generation. It also includes five new water shaders for varying levels of water quality, and some brand new documentation in a neatly formatted pdf.

The Modernization Kit also has a web presence now where you can grab the latest version, subscribe to the mailing list, submit a bug report, or just give general feedback.

Username: torqueUser
Password: tMK60152

Check it out! For the time being this is the official "home page" for the Modernization Kit.

Build 0008 was mostly about improving overall user experience, and while there's still a lot to be desired I think the web center goes a long ways towards fixing some issues, especially bug reporting. Builds 0009 and 0010 will include a mixture of feature additions, bug fixes, and documentation/web improvements.

Oh, here, I guess you might like a couple of screenshots of the new water shader. I guess...
farm1.static.flickr.com/133/412317868_33e7d9e33b.jpg
farm1.static.flickr.com/131/412317870_62fe821662.jpg

The following DRL settings were used for the above screenshots:
DRL::setBiasLimits(-0.05, 0); 
DRL::setGoalIntensity(0.35); 
DRL::setBloomColorOffset(0.15);

That's all for now folks!
#45
03/07/2007 (8:33 am)
I seem to be having a problem with this and really want to get it working - looks like an awesome resource! I have now downloaded 0008 and have built it successfully (0007 wouldn't build at all on my system for some reason, although did build on my laptop.. strange).

However, Once into the rolling demo, or starter.fps it doesn't seem to do anything other than darken the scene when I enable DRL and my framerate takes a slight hit. I'm not seeing any of the nice water effects or the bloom effects that I saw when I implemented the bloom resource separately.

It was built in vs2005 and running on a fresh download of TGE 1.5.

Any thoughts? Please let me know if you want any more information. It looks amazing and can't wait to see it working!
#46
03/07/2007 (11:51 am)
Ops!... Can't compile it... I'm using Visual C++2005 EE, I get an 23 output errors saying that 'windows.h' not found.

This looks great!
#47
03/07/2007 (1:12 pm)
@Mike: Hmm, I must've take out that bit of the getting started. Did you make the following console commands
MaterialManager::setShaderQuality(500);
mkFluid::setReflectionSize(1024);
mkFluid::enableRefraction(1);
DRL::enable(1);
DRL::setBloomQuality(3);
That'll get everything going as shiny as it gets.

@coxosclassic: Well, that's not good. I'll bounce that question off of Jeff (he provided the VC2k5 project file).
#48
03/07/2007 (1:48 pm)
Hey again!

I hope Jeff can help me on this one. Im definitly not a pro on coding C++ but I managed to add some other code (AI related) to my tge1.5 with no prb.

What I did so far was just copy all the files from the RELEASE.zip (v0008) to my torque SDK directory. Opened the Torque Demo.vcproj in the vc8 folder and tryed to compile it in vc2005EE. Then I got those 23 errors (windows.h related) in the output console.

Am I missing something here?

Cant wait to throw some shaders in the engine!!
#49
03/08/2007 (12:16 am)
Ya, you are missing all the other projects, torque demo is dependent on, next time open the Torque SDK solution and build the torque demo from there, it then compiles every thing you need..

5 cent, hf gl
#50
03/08/2007 (12:44 am)
@Alex: No, it is there in the Getting Started doc (except setBloomQuality). However, I just don't see anything! I'm pulling my hair out trying to figure it out (and at this stage in life, my hair doesn't need any encouragement in coming out tbh!).
#51
03/08/2007 (1:24 am)
Cox, yeah I think Paul's got it.
The thing about opening just the Torque Demo.vcproj is the other libraries and dependancies that Torque requires won't be included that way.
What you'll need to do is go into the vc8 folder, and find the Torque SDK.sln, and open that up.
Once you do, you should be in good shape when you compile the Torque Demo project in there.

Hope that helps.

Also, Mike, if you hadn't already, I'd suggest getting Alex your machine specs and whatnot.
I havent run across a bug like that on my end, and neither has he to my knowledge, so it might be some conflict with your machine.
#52
03/08/2007 (2:29 am)
@Jeff: Yeah I think that's a good idea. I've got a new Dell XPS M1710 laptop turning up later today (yay!) so I'll try a build on that when it arrives and post an update.

Edit: Sent information to Alex via the bug report page.
#53
03/08/2007 (8:21 am)
I am getting these three errors:

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

Using XP service pack 2 - VC++2005 EE
#54
03/08/2007 (8:44 am)
I had that problem to, but went away with one of the updates, think it was 080008, but i assume that you are trying to build 080008, correct?
#55
03/08/2007 (9:00 am)
Fixed it...just had to exclude some things.
#56
03/08/2007 (9:28 am)
All working now. After sending the console.log, Alex pointed out that my materials.cs wasn't being exec'd so the shaders weren't loading. My fault for not reading the documentation properly :p

Anyway, it's all working and looks beautiful! Thanks Alex - awesome resource...
#57
03/08/2007 (2:37 pm)
Has no one had any problems with interiors messing up, i have nothing but problems with mine and the game constantly crashes.. nothing?

Can i disable every thing and slowly reimplement things, to se where my problems start ocuring, so far drl is gone and autogen normal maps
#58
03/08/2007 (3:02 pm)
Paul, what do you mean by 'interiors messing up'?
Do you have a picture of what you mean?

Also, if you havent already, do a clean build of it, since it adds a lot of headers and stuff, Torque might be tripping over some stuff and a clean build may resolve it.
#59
03/08/2007 (5:07 pm)
Yo!

No luck again... I must be doing something wrong here, so before I smash my head against the wall trying to fix this I will write a 'step-by-step' of what I'm doing:

First of all, my specs:
Windows Porfessional XP SP2
TGE1.5
VS2005EE
NVidia CG-toolKit 1.5

Toshiba Satellite m30x
ATI MOBILITY RADEON 9600/9700 series - latest drivers

------------------------------------------------------------------------

1 - Reinstaled a clean version of TGE1.5.
2 - made a build in VS2005EE just for doublecheck. No errors or warnings in the output console. (duh?!)
3 - installed the NVidia cg-toolkit 1.5.
4 - Loaded NVIDIA Corporation\Cg\include\Cg\ cgGL.h in VS2005EE.
5 - Found #include and replaced it with #include .
6 - saved and closed the file.
7 - opened torque SDK.sln in VS2005EE, went to Tools>Options>Projects and solutions>VC++ and included my NVidia cg SDK include folder. Did the same for the lib folder.
8 - Build it again, no errors or warnings in the output.
9 - copied the MK folders into my torque directory (replaced everything existing)
10 - loaded up torque SDK.sln again in VS2005EE and build it again, got 14 errors and 0 warnings.

---------------------------------------------------------------------------------


I sent the buildlog to MK bug report page along with this post.
TKX!
#60
03/09/2007 (12:00 am)
@Cox: I had the same problem yesterday when I moved from Visual Studio 2005 to Visual C++ Express. windows.h is part of the Microsoft platform SDK. I downloaded it from here and then added its include and lib folders to the appropriate parts in my global settings.

After that it built straight away with no problems.