FreeImage and Quake WAL image loaders

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

FreeImage and Quake WAL image loaders

Post by Murphy »

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. :D

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.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

my favorites are: Texmex and Wally. Let me know if you got them or else to uplaod them for you.

:D

edited:
I just noticed this was my post # 1000 !!!!!!!!!!!!!!!!!!!
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

afecelis wrote:my favorites are: Texmex and Wally. Let me know if you got them or else to uplaod them for you.

:D
Yup, I've got Wally. :) It's a pretty good tool and I used it while testing the WAL loader. :)

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.
nitroman

Post by nitroman »

It was something I pretty much had to write while working on my Quake 2 BSP loader.
You are working on a Q2 bsp loader? Sweat! :D

Does it work?
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

nitroman wrote:
It was something I pretty much had to write while working on my Quake 2 BSP loader.
You are working on a Q2 bsp loader? Sweat! :D
Does it work?
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. :)
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

If anyone downloaded the original version, you should go back to my site and grab the new release.

There was a really dumb bug in the FreeImage wrapper which caused it to fail when loading JPEGs and possibly other formats too.
hl2lover

Post by hl2lover »

Is it true that half-life1 maps are the same as q2 ones?
(I would like to use hl maps in irrlicht using your loader...)

:wink:
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Half-Life is based on the Quake 1 engine, so I expect they're more similar to the Quake 1 BSP format. There are some differences, though... I think HL has 24 bit lightmaps (like Q2) and something along the lines of a randomizing thing for textures at least.
badguy

Post by badguy »

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.
How the work going? Where can I find this q2 bsp loader?
Guest

Post by Guest »

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.
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

That was me. I was logged on in a different window, durrr.
Post Reply