FreeImage and Quake WAL image loaders
FreeImage and Quake WAL image loaders
A couple of image loaders. One loads Quake WAL textures (Quake 1, Quake 2, and I think Half-Life at least use them). The other loads any format that the FreeImage library can load, which includes PNG, DSS, and TIFF. You can also disable Irrlicht's TGA loader and use the one in here if you're having problems with Irrlicht's loader vertically flipping yours.
The former I haven't used for a while and the latter I just wrote and hasn't been tested extensively. Good luck.
You can grab them from my site here.
The former I haven't used for a while and the latter I just wrote and hasn't been tested extensively. Good luck.
You can grab them from my site here.
Last edited by Murphy on Mon Feb 21, 2005 1:00 pm, edited 1 time in total.
Yup, I've got Wally. It's a pretty good tool and I used it while testing the WAL loader.afecelis wrote:my favorites are: Texmex and Wally. Let me know if you got them or else to uplaod them for you.
The WAL loader class can also create an animated scene node to do the animation for animated WALs, though I haven't tested that yet.
It was something I pretty much had to write while working on my Quake 2 BSP loader.
Yeah. It didn't take too much to modify the Q3 loader to load Q2 geometry. Getting the texture mapping right took a bit more work but wasn't awful either. But I got really stuck on the lightmaps.nitroman wrote:You are working on a Q2 bsp loader? Sweat!It was something I pretty much had to write while working on my Quake 2 BSP loader.
Does it work?
Most things (including Q3) produce reasonably sized textures with a bunch of lightmaps packed onto it. Q2 BSPs actually have a whole lot of little tiny lightmaps which must get packed into a big texture when Q2 loads it. I've gotten close to getting this to look right, but no cigar yet. So close I actually thought I had it working until I started noticing little tiny errors here and there which started to just drive me up the wall. After getting nowhere with this for a while, I started persuing other things at least for the time being.
That's where it stands now. Got the WAL texture loader/animator, got the PAK file added to the filesystem (much like the zip/pk3 filesystem in there now, but works with the Q2 pak format, obviously), and got the BSP loader complete except for lightmap errors... so close, and yet... so far.
How the work going? Where can I find this q2 bsp loader?Yeah. It didn't take too much to modify the Q3 loader to load Q2 geometry. Getting the texture mapping right took a bit more work but wasn't awful either. But I got really stuck on the lightmaps.
Most things (including Q3) produce reasonably sized textures with a bunch of lightmaps packed onto it. Q2 BSPs actually have a whole lot of little tiny lightmaps which must get packed into a big texture when Q2 loads it. I've gotten close to getting this to look right, but no cigar yet. So close I actually thought I had it working until I started noticing little tiny errors here and there which started to just drive me up the wall. After getting nowhere with this for a while, I started persuing other things at least for the time being.
That's where it stands now. Got the WAL texture loader/animator, got the PAK file added to the filesystem (much like the zip/pk3 filesystem in there now, but works with the Q2 pak format, obviously), and got the BSP loader complete except for lightmap errors... so close, and yet... so far.
No progress at all. What time I've been putting into Irrlicht related stuff has been focused on MIM, OCT, and some physics stuff.
My next step on the Q2 BSP loader was going to be trying out some Q2 level viewers and see if they got the lightmaps right (I'm hoping at least some of them have it wrong! Among other things, some of the documentation I've found on the Q2 BSP format I believe to be outright wrong.). If I can find an open source one that gets it right, take it apart and figure it out. I could do this with the Q2 source, but I don't want to use any Id code in any way.
As for where you can find it -- nowhere at the moment. I've gone through so much tweaking and trying different things that the source is a pretty big mess. I'd consider just ripping out the lightmap stuff and releasing that, but I'd still rather it worked right.
It's possible, though, that if I ever figure it out, I'll scrap my implementation and implement it as a BSP to MIM converter instead.
Incidentally, there are other options for getting a Q2 BSP into Irrlicht. I believe there are at least two tools capable of reasonable Q2 to Q3 BSP conversions.
My next step on the Q2 BSP loader was going to be trying out some Q2 level viewers and see if they got the lightmaps right (I'm hoping at least some of them have it wrong! Among other things, some of the documentation I've found on the Q2 BSP format I believe to be outright wrong.). If I can find an open source one that gets it right, take it apart and figure it out. I could do this with the Q2 source, but I don't want to use any Id code in any way.
As for where you can find it -- nowhere at the moment. I've gone through so much tweaking and trying different things that the source is a pretty big mess. I'd consider just ripping out the lightmap stuff and releasing that, but I'd still rather it worked right.
It's possible, though, that if I ever figure it out, I'll scrap my implementation and implement it as a BSP to MIM converter instead.
Incidentally, there are other options for getting a Q2 BSP into Irrlicht. I believe there are at least two tools capable of reasonable Q2 to Q3 BSP conversions.