Scaled like a lizard!
by Matt Fairfax · 04/26/2004 (8:50 am) · 18 comments
Couple of smaller updates:
I tied the Quake 3 stuff into the Resource Manager properly this week so that I can now load the levels correctly from .pk3 files (the Quake 3 rename of .zip)
This led me to downloading a whole slew of test levels to pound against. I ran into a problem though...Quake 3 isn't limited to power of 2 texture sizes. Before I had hand resized (actually used a photoshop script someone kindly made for me) all of the textures but given the sheer volume of levels I downloaded I decided that wasn't an option.
So, I implemented bilinear scaling that will take any texture up to the next highest power of 2 (when needed - i.e. mipmapped textures). I looked at a variety of sampling methods but ultimately they were much slower and bilinear does well enough for scaling up that I am satisfied with the results.
I am going to wrap this up into a resource soon and hopefully it will make its way into HEAD eventually. In the long run it is faster and better to make sure that your production textures are power of 2 sized but this at least removes that limitation (I am fairly certain TGE is the *only* modern game engine with that limitation anymore).
So what is the current state of the Quake 3 code?
Things to left do before release:
- Simplistic shader parser
- Speed up player shadow casting
- Remove vehicle collisions for initial release (just too buggy and slows down load time badly)
- Cleanup memory leaks
I will release code for vehicle collisions and for terrain lightmap casting a little later but they keep pushing the release out further and further so I will cut them for the moment. The shader parser is the last big thing left and I don't foresee it taking too long. Unfortunately, I have some other projects taking much higher priority so I won't be able to work on this as much.
Now for some pictures:

First pass at scaling textures up to the nearest power of 2...little bit buggy

Fixed the scaling issue but had the colors oversaturated and the green and blue components were backwards

Correct texture scaling (bilinear) for the Mario level

Correct texture scaling (bilinear) for the game shop level. Consider yourself "old skool" if you remember the release of this level =)

A nice shot I got of a city level...very dramatic and very moody
I tied the Quake 3 stuff into the Resource Manager properly this week so that I can now load the levels correctly from .pk3 files (the Quake 3 rename of .zip)
This led me to downloading a whole slew of test levels to pound against. I ran into a problem though...Quake 3 isn't limited to power of 2 texture sizes. Before I had hand resized (actually used a photoshop script someone kindly made for me) all of the textures but given the sheer volume of levels I downloaded I decided that wasn't an option.
So, I implemented bilinear scaling that will take any texture up to the next highest power of 2 (when needed - i.e. mipmapped textures). I looked at a variety of sampling methods but ultimately they were much slower and bilinear does well enough for scaling up that I am satisfied with the results.
I am going to wrap this up into a resource soon and hopefully it will make its way into HEAD eventually. In the long run it is faster and better to make sure that your production textures are power of 2 sized but this at least removes that limitation (I am fairly certain TGE is the *only* modern game engine with that limitation anymore).
So what is the current state of the Quake 3 code?
Things to left do before release:
- Simplistic shader parser
- Speed up player shadow casting
- Remove vehicle collisions for initial release (just too buggy and slows down load time badly)
- Cleanup memory leaks
I will release code for vehicle collisions and for terrain lightmap casting a little later but they keep pushing the release out further and further so I will cut them for the moment. The shader parser is the last big thing left and I don't foresee it taking too long. Unfortunately, I have some other projects taking much higher priority so I won't be able to work on this as much.
Now for some pictures:

First pass at scaling textures up to the nearest power of 2...little bit buggy

Fixed the scaling issue but had the colors oversaturated and the green and blue components were backwards

Correct texture scaling (bilinear) for the Mario level

Correct texture scaling (bilinear) for the game shop level. Consider yourself "old skool" if you remember the release of this level =)

A nice shot I got of a city level...very dramatic and very moody
About the author
I am a Game Designer at PopCap who has worked on PvZ Adventures, PvZ2, Peggle Blast, and Bejeweled Skies. I am an ex-GarageGames employee who helped ship TGE, TGEA, Torque 3D, and Constructor.
#2
You should add an inventory station so he can get some crack or something... ;)
04/26/2004 (9:30 am)
Very amusing to see the Torque guy running around in a gritty urban setting. :PYou should add an inventory station so he can get some crack or something... ;)
#3
I don't want to take anything away from Matthews work here, I am envious of his skill, but I'm just wondering.
This sounds like lots of fun, one thing that I'm not clear about tough:
What is the exact advantage in using q3 maps instead of DIFs ??
Another thing, isn't *radiant the best way of editing a q3 map and the *radiant related software seems to be protected by some heavy licence-issues...
Once again, this is really great stuff. Matt, you're the man !!
04/26/2004 (10:01 am)
First of all: Great work there Matt, I know you have lots more coming our way(me=waiting for updated 3ds loader).I don't want to take anything away from Matthews work here, I am envious of his skill, but I'm just wondering.
This sounds like lots of fun, one thing that I'm not clear about tough:
What is the exact advantage in using q3 maps instead of DIFs ??
Another thing, isn't *radiant the best way of editing a q3 map and the *radiant related software seems to be protected by some heavy licence-issues...
Once again, this is really great stuff. Matt, you're the man !!
#4
Only four real advantages to Quake 3 maps over dif:
1) Curved surface support
2) Dramatically better lighting
3) *Large* base of art assets (thousands of maps made for Quake 3)
4) Completely enclosed interiors
With the rewrite of map2dif in the works hopefully #2 and #4 will be addressed and maybe #1 in a fashion which only leaves #3 which can still be a compelling reason to make use of this code (for prototyping while licensing is still an issue).
The commercial licenses with the Quake 3 stuff are rather ugly ($5000) though if you are releasing something for free you are in great shape and have a large number of Quake 3 level designers to draw upon.
Personally, doing the Quake 3 stuff has taught me an enourmous amount of things about TGE and collision and interior rendering. At this point I am looking to release it more b/c I already have the code than b/c it would be a benefit to the community. I also kinda like the idea of being able to show that the Torque Engine is a very capable interior engine =)
04/26/2004 (10:20 am)
Jorgen,Only four real advantages to Quake 3 maps over dif:
1) Curved surface support
2) Dramatically better lighting
3) *Large* base of art assets (thousands of maps made for Quake 3)
4) Completely enclosed interiors
With the rewrite of map2dif in the works hopefully #2 and #4 will be addressed and maybe #1 in a fashion which only leaves #3 which can still be a compelling reason to make use of this code (for prototyping while licensing is still an issue).
The commercial licenses with the Quake 3 stuff are rather ugly ($5000) though if you are releasing something for free you are in great shape and have a large number of Quake 3 level designers to draw upon.
Personally, doing the Quake 3 stuff has taught me an enourmous amount of things about TGE and collision and interior rendering. At this point I am looking to release it more b/c I already have the code than b/c it would be a benefit to the community. I also kinda like the idea of being able to show that the Torque Engine is a very capable interior engine =)
#5
04/26/2004 (10:42 am)
Hmm.. rewrite map2dif, in terms of making it NOT map2dif, i.e. not .map based? or something else? :)
#6
And once again, thank you for all your support to the community, your a god-send !!
04/26/2004 (12:07 pm)
Well Matthew, for-free is just the route I am taking... I'd better have a sit-down with qeRadiant then !!And once again, thank you for all your support to the community, your a god-send !!
#7
Nice work BTW. I agree that interior only levels could be a handy option at times.
04/26/2004 (12:41 pm)
Pardon my ignorance but is the id license for qeradiant or the Q3 map format? Someone building a Q3 map in Quark wouldn't have to fork over the dough would they?Nice work BTW. I agree that interior only levels could be a handy option at times.
#8
However, they can forbid you to use their tools to create the files.
Which means 3rd party needs to create the tools from scratch.
04/26/2004 (12:58 pm)
You cannot license a file format as far as I know.However, they can forbid you to use their tools to create the files.
Which means 3rd party needs to create the tools from scratch.
#9
Quark is definitely an option:
Map3bspc
04/26/2004 (1:11 pm)
id software themselves have taken the stance that you can't (and they won't) license a file format.Quark is definitely an option:
Map3bspc
Quote:
MAP3BSPC is a replacement tool for the Quake 3 bsp compiler by Id Software used to produce Quake 3-like .bsp files from .map files generated by a Quake 3 modelling tools, such as QuARK. This tool is intended for those who would like to use the modelling tools available for Quake in their own projects, but can't because of the license on the Id Software Quake tools.
#10
04/26/2004 (2:49 pm)
Nice Mario Castle, and all the other cool shots
#11
04/26/2004 (6:31 pm)
Looking good Matthew, as always!
#12
[EDIT]
Darn it, if I could only take the time to actaully read the "features" pages sometimes:
Anyone have any experince with this ??
[/EDIT]
Tought I just might stick this incase people started to wonder:
04/26/2004 (10:01 pm)
Quark is an option (as always), my question, does it support pathes/curved surfaces ??[EDIT]
Darn it, if I could only take the time to actaully read the "features" pages sometimes:
Quote:Taken from the Quark features page.
Bezier/patch editing, with helper functions to ease creation.
Anyone have any experince with this ??
[/EDIT]
Tought I just might stick this incase people started to wonder:
Quote:This is a cut-and-paste from the EULA found in Q3Radiant, I haven't located one in QERadiant but dought it would be any different.
ID grants to you the non-exclusive and limited right to use the Software to create your own modifications for operation only with the full version of the software game QUAKE III ARENA
#13
04/26/2004 (10:55 pm)
Excellent as always. The first piture reminded me of a candy world for some reason :D
#14
1: Will this support any of the entities found in q3 ?
2: Do you see any problems in using this with the forthcoming Light Pack from Synapse ?
04/26/2004 (11:56 pm)
Matthew, while I am at it :-)1: Will this support any of the entities found in q3 ?
2: Do you see any problems in using this with the forthcoming Light Pack from Synapse ?
#15
2) I don't know how/where the Light Pack comes into play though I suspect some of it is in map2dif. I don't think there will be problems but it is hard to know.
04/27/2004 (5:14 am)
1) Not currently...though adding them could be done relatively easily (depending on which entity)2) I don't know how/where the Light Pack comes into play though I suspect some of it is in map2dif. I don't think there will be problems but it is hard to know.
#16
Matthew;
1# Would it be fair to say that you'll need a Torque counterpart for the entities to work?
2# Seems like the lightpack will enable both difs and dts to catch light in an uniform way making the lights in Torque more predictible, does this help you in any way?
04/28/2004 (9:41 pm)
Strange, I am almost certain I posted a reply yesterday, ah well.Matthew;
1# Would it be fair to say that you'll need a Torque counterpart for the entities to work?
2# Seems like the lightpack will enable both difs and dts to catch light in an uniform way making the lights in Torque more predictible, does this help you in any way?
#17
2) From the little info about the light pack that has been made available it sounds like he is mostly editing the pre-procesing of the lights...both in map2dif and in the lighting pass that burns the lightmaps for the terrain. If I hook my stuff in correctly then *some* of the lighting improvements will effect the Quake 3 bsp's (like terrain lighting).
04/29/2004 (7:52 am)
1) Definitely...the Quake 3 entity references are stored inside the bsp (like lights, spawn points, and jumpads) but you would need to translate those into the equivalent Torque entity...for example, a jumpad could be translated into a trigger that applies an impulse to anthing that enters it (something that has been on my todo list for a while).2) From the little info about the light pack that has been made available it sounds like he is mostly editing the pre-procesing of the lights...both in map2dif and in the lighting pass that burns the lightmaps for the terrain. If I hook my stuff in correctly then *some* of the lighting improvements will effect the Quake 3 bsp's (like terrain lighting).
#18
08/03/2006 (11:06 pm)
wow, this sounds pretty cool, whatever happened with .pk3's for torque? 
Torque Owner Josh Williams
Default Studio Name