ModernizationKit Beta (Mac)
by Alex Scarborough · in Torque Game Engine · 01/29/2007 (11:15 pm) · 54 replies
THIS THREAD IS NO LONGER IN USE, THANK YOU FOR YOUR COMMENTS. The official Modernization Kit thread can be found here
Let's stir things up a bit. (Please don't hurt me GG)
So, as some of you know, I've been working on adding crossplatform shaders to TGE for the past, oh, nine months or so. And about six months ago I scrapped all of my work and started over from scratch, making it easy to use, easy to integrate, and flexible.
Well, earlier today I hit my feature list for 0.8, cleaned up some dead code and thought that it would be really awesome if someone could go through, make sure it installs correctly, and try it out on their computer. And, as a mac dev, I only have a mac version. And oddly, 0.8 is listed as the first scheduled public release.
Anyone want to test it?
If you do, you can download the full source code, including all modified TGE files, all modified script files, and all shaders (there are quite a few) HERE!
[b]Current version is: v0006 released 2-25-07
This is for TGE 1.5 ONLY!
username = torqueUser
password = tMK60152
Thanks to the fabulous Jeff "Reno" Raab for letting me host this on the server he runs!
I can't guarantee this code will work, or even compile, on anything other than my personal computer!(eMac 1.42 GHz G4, Radeon 9600, 2GB RAM, Mac OS 10.4.8 for those of you who were interested.) 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!
A word on system requirements: You MUST have the latest version of Mac OS 10.4. You also MUST have a Radeon 7200 or better. Any attempt to compile or use this code on other configurations will quite probably result in a crash. Not that it won't crash anyways.
Also, you need to have the latest XCode developer tools installed, but I kinda assume everyone here has done that.
Now then, this isn't quite everything you need to get started. First of all, you should go here to download and install the Cg toolkit. You'll also need to copy the Cg.framework ( you'll find it in /Library/Frameworks/) bundle and place it in/lib/cg/macosx, which is where the bundled project file tries to find it.
If you don't want to deal with that, you'll have to get a little cozy with the project file to remove the references to the Cg.framework. You should also comment out #define SHADER_MANAGER_USE_CG at the beginning of mkShaderManager.h.
continued next post, silly character limit...
Let's stir things up a bit. (Please don't hurt me GG)
So, as some of you know, I've been working on adding crossplatform shaders to TGE for the past, oh, nine months or so. And about six months ago I scrapped all of my work and started over from scratch, making it easy to use, easy to integrate, and flexible.
Well, earlier today I hit my feature list for 0.8, cleaned up some dead code and thought that it would be really awesome if someone could go through, make sure it installs correctly, and try it out on their computer. And, as a mac dev, I only have a mac version. And oddly, 0.8 is listed as the first scheduled public release.
Anyone want to test it?
If you do, you can download the full source code, including all modified TGE files, all modified script files, and all shaders (there are quite a few) HERE!
[b]Current version is: v0006 released 2-25-07
This is for TGE 1.5 ONLY!
username = torqueUser
password = tMK60152
Thanks to the fabulous Jeff "Reno" Raab for letting me host this on the server he runs!
I can't guarantee this code will work, or even compile, on anything other than my personal computer!(eMac 1.42 GHz G4, Radeon 9600, 2GB RAM, Mac OS 10.4.8 for those of you who were interested.) 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!
A word on system requirements: You MUST have the latest version of Mac OS 10.4. You also MUST have a Radeon 7200 or better. Any attempt to compile or use this code on other configurations will quite probably result in a crash. Not that it won't crash anyways.
Also, you need to have the latest XCode developer tools installed, but I kinda assume everyone here has done that.
Now then, this isn't quite everything you need to get started. First of all, you should go here to download and install the Cg toolkit. You'll also need to copy the Cg.framework ( you'll find it in /Library/Frameworks/) bundle and place it in
If you don't want to deal with that, you'll have to get a little cozy with the project file to remove the references to the Cg.framework. You should also comment out #define SHADER_MANAGER_USE_CG at the beginning of mkShaderManager.h.
continued next post, silly character limit...
About the author
#42
02/05/2007 (5:45 pm)
Wow! Amazing stuff!
#43
Anyhow, I haven't received any bug reports in a while (come on, I know the code isn't that stable, surely someone has encountered a bug), so work has begun on 0.9.
I should probably explain what the goal for the 0.9 release of the MK is, shouldn't I?
I've dubbed 0.9 the fallback release. The MK is all fine and dandy if you have a Radeon 9500/GeForce FX 5200 or better, but breaks down once you go below that, and outright crashes if you drop below a Radeon 7200/GeForce 2. The goal is quite simply to make it work on everything. This means 1.4 and 1.1 versions of every shader in the MK (there are quite a few, if you've looked), 1.1 and 1.4 rendering paths for DRL and water, emulated VBO support for cards that don't support hardware VBOs, and fallback to pbuffers for render to texture.
The first area of focus for my work on 0.9 has been render to texture fallback support. In the event that framebuffer objects (the crossplatform spiffy nice way of doing render to texture in OpenGL) aren't supported, it can now fallback to pbuffers (the annoying platform specific way of doing render to texture in OpenGL). The Mac implementation goes a step further, and in the event that pbuffers aren't supported, or we can't create a pbuffer with the features that we'd like (like, say, 6x multisampling), it will actually create a new window, hide it, and use the window as a texture. In terms of support, the MK can now scale render to texture to, well, everything. So long as you have Mac OS 10.2+ and can use Torque, you can do render to texture with the MK.
Now then, there's no reason we can't mix new features with fallbacks. Because the MK can create a window and use it as a texture, we can do anything with textures we can do with windows. Like antialiasing.
So this is something you might see with 0.8. It's got jaggies.
This is what 0.9 can do. The main scene uses 2x MSAA while the reflection uses 6x MSAA. Note how much smoother both the main scene and the reflection are.
Also, just because it's cool, check out this image. The window type thing in the upper left corner is the water reflection.
Due to my impending internship, I have no rough estimate for when 0.9 will be available. The original plan was early March, but I don't see that happening now.
Welp, there's a status update. I'll post again when the next version of 0.8 (maybe a Win32 port) goes up.
02/10/2007 (3:29 pm)
Just to keep you all updated, OneST8 has some impending deadlines, so very little progress has been made on the Win32 port. Furthermore, I will begin interning at GG starting early next week, which is going to impact how much time I can spend working on the MK. The MK isn't going to be abandoned or anything, but it's not going to be moving forward by leaps and bounds anytime soon either.Anyhow, I haven't received any bug reports in a while (come on, I know the code isn't that stable, surely someone has encountered a bug), so work has begun on 0.9.
I should probably explain what the goal for the 0.9 release of the MK is, shouldn't I?
I've dubbed 0.9 the fallback release. The MK is all fine and dandy if you have a Radeon 9500/GeForce FX 5200 or better, but breaks down once you go below that, and outright crashes if you drop below a Radeon 7200/GeForce 2. The goal is quite simply to make it work on everything. This means 1.4 and 1.1 versions of every shader in the MK (there are quite a few, if you've looked), 1.1 and 1.4 rendering paths for DRL and water, emulated VBO support for cards that don't support hardware VBOs, and fallback to pbuffers for render to texture.
The first area of focus for my work on 0.9 has been render to texture fallback support. In the event that framebuffer objects (the crossplatform spiffy nice way of doing render to texture in OpenGL) aren't supported, it can now fallback to pbuffers (the annoying platform specific way of doing render to texture in OpenGL). The Mac implementation goes a step further, and in the event that pbuffers aren't supported, or we can't create a pbuffer with the features that we'd like (like, say, 6x multisampling), it will actually create a new window, hide it, and use the window as a texture. In terms of support, the MK can now scale render to texture to, well, everything. So long as you have Mac OS 10.2+ and can use Torque, you can do render to texture with the MK.
Now then, there's no reason we can't mix new features with fallbacks. Because the MK can create a window and use it as a texture, we can do anything with textures we can do with windows. Like antialiasing.
So this is something you might see with 0.8. It's got jaggies.
This is what 0.9 can do. The main scene uses 2x MSAA while the reflection uses 6x MSAA. Note how much smoother both the main scene and the reflection are.
Also, just because it's cool, check out this image. The window type thing in the upper left corner is the water reflection.
Due to my impending internship, I have no rough estimate for when 0.9 will be available. The original plan was early March, but I don't see that happening now.
Welp, there's a status update. I'll post again when the next version of 0.8 (maybe a Win32 port) goes up.
#44
02/10/2007 (9:25 pm)
Awesome stuff, Alex! And it's great to hear that you're interning with GG. Are you going to work on Mac stuff?
#45
02/10/2007 (9:30 pm)
Nice Alex. so i guess you will have to buy a windows machine :P. seeing that they might need help with TGEA. or maybe you can help them make an OpenGL port of it.
#46
Tried to get it done on Win32, but I'll have to change some stuff and look which stuff is wired where in a way I need to change. First step was done by copying the nv cg sdk libs into the sdks own lib folder/cg.
Would be really interested in this, as it has what I am mainly missing in TGE.
Nice water + AA + Aniso (and S3TC support at some point. Either through DDS or compression after load)
DRL and the like is just stuff that makes it look even nicer, but nothing that makes and breaks my idea.
02/10/2007 (9:34 pm)
Looks very interesting.Tried to get it done on Win32, but I'll have to change some stuff and look which stuff is wired where in a way I need to change. First step was done by copying the nv cg sdk libs into the sdks own lib folder/cg.
Would be really interested in this, as it has what I am mainly missing in TGE.
Nice water + AA + Aniso (and S3TC support at some point. Either through DDS or compression after load)
DRL and the like is just stuff that makes it look even nicer, but nothing that makes and breaks my idea.
#47
The demo you provided did not worked on my Macs... nor the builts I performed.
02/10/2007 (11:26 pm)
@Alex: didn't you got my reports?The demo you provided did not worked on my Macs... nor the builts I performed.
#48
Serious, not idea what most of the tech stuff there means, but Congrats on the internship, I have no doubt great things will come of it.
02/10/2007 (11:56 pm)
Well, I tried to follow all of that Alex, but it made my head hurt, then I started drooling on my keyboard and went cross eyed. :PSerious, not idea what most of the tech stuff there means, but Congrats on the internship, I have no doubt great things will come of it.
#49
@Marc: TGE supports anisotropic filtering and generic compressed textures (compressed by the gl driver as part of loading the texture). The Mac platform code also contains hooks for multisampling, and it's literally changing a number to get multisampling going, but it isn't perfect.
@Stephan: I did get your reports, but given my utter inability to reproduce them, or for anyone else thus far to reproduce them, all I can say is the the MK is either incompatible with France or the exact computers you are using.
@Todd: Tech stuff translated: Modernization Kit 0.9, now with Jaggies-B-Gone technology and the ability to not suck even if your computer does.
I think that's going to be the official documentation for 0.9 now.
02/11/2007 (12:54 am)
@Rubes: I doubt I'll be working on Mac stuff. I actually requested to use a Windows PC on the grounds that, in my experience, if you're writing crossplatform code from the get go it's easier to move from Windows to Macs than Macs to Windows. Of course, this may have something to do with the fact that I can actually participate in porting code from Windows to Mac, and can only advise on porting from Mac to Windows. Now I get to find out first hand, whee....@Marc: TGE supports anisotropic filtering and generic compressed textures (compressed by the gl driver as part of loading the texture). The Mac platform code also contains hooks for multisampling, and it's literally changing a number to get multisampling going, but it isn't perfect.
@Stephan: I did get your reports, but given my utter inability to reproduce them, or for anyone else thus far to reproduce them, all I can say is the the MK is either incompatible with France or the exact computers you are using.
@Todd: Tech stuff translated: Modernization Kit 0.9, now with Jaggies-B-Gone technology and the ability to not suck even if your computer does.
I think that's going to be the official documentation for 0.9 now.
#50
02/11/2007 (9:32 am)
Kick @$$
#51
Thanks Alex and OneST8 for your work and comitment
02/27/2007 (12:16 pm)
Lovely with the new version, jumping into it asap =)Thanks Alex and OneST8 for your work and comitment
#53
02/28/2007 (9:46 pm)
Is this specific to an OpenGL revision? Or is this the OpenGL spec for shaders? What kind of hardware can I expect this to run on?
#54
1) This does not require any specific OpenGL version. It does not check for any specific OpenGL version. It checks for more extensions than I care to remember.
2) This does implement GLSL, which is the official OpenGL Shading Language.
3) It'll crash if you have anything lower than a Radeon 7200. New features won't kick in until you reach a Radeon 9500. Technically new features could start showing up with a Radeon 8500, but I haven't written the shaders.
Again, this thread is dead, please refer to this thread for further information on the Modernization Kit. I decided it would be best to start a new thread in a more crossplatform area for the crossplatform release.
02/28/2007 (10:04 pm)
First, this thread is dead, please refer to this thread for further information on the Modernization Kit. I decided it would be best to start a new thread in a more crossplatform area for the crossplatform release.1) This does not require any specific OpenGL version. It does not check for any specific OpenGL version. It checks for more extensions than I care to remember.
2) This does implement GLSL, which is the official OpenGL Shading Language.
3) It'll crash if you have anything lower than a Radeon 7200. New features won't kick in until you reach a Radeon 9500. Technically new features could start showing up with a Radeon 8500, but I haven't written the shaders.
Again, this thread is dead, please refer to this thread for further information on the Modernization Kit. I decided it would be best to start a new thread in a more crossplatform area for the crossplatform release.
Associate Fyodor "bank" Osokin
Dedicated Logic
edit: with new links i see "some difficulties" too now :)