DFF mesh format loader

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

i would recommend not to use the old versions anymore, since in a few days (maybe this weekend) i will release newest version, which also includes object streaming. many changes since last version....
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

so, took me a bit longer, a lot of stuff happened lately.

since i am pretty tired of the project, and got more than enough other projects, i hereby release the latest version of the project. it is not just (a) loader(s) anymore, it is now consists of IMG archive loader, TXD archive loader, TXD texture format loader, IDE/IPL/DAT file parser, and some more stuff. this is why the components are now released bundled only.

don't expect me to improve it much in the future, but feel free to ask any questions via forum/PM/email. would be really cool to see someone improving on the code and/or doing something cool with it.

Source plus windows binary:

http://b66883.com/projects/gtalight/gta ... _23-10.zip

Known problems:

- the most visible being some rotation (or maybe even position) problem (only visible when drawing hi-detail models instead of low LOD meshes)

- real LOD mode not working (loading models in a crude type of streaming when getting near them, and unloading when they get out of sight). there exists a class, but disabled, since it often draws LOD and non-LOD meshes over each other, and it seems it gets the camera position somehow wrong. enable to see what i mean.

- DFF loader still does not support frames, means e.g. no cars can be loaded.

Requirements:

- works with latest 1.6-SVN or newer only, since it requires the new file system functions (again kudos for the new FS 2.0, it rocks!). not really a problem in my eyes, SVN is pretty stable, just be aware of the fact.

- requires the libsquish library for decoding DXT1/3/5 compressed textures.

- PC versions of GTA3/VC/SA. Uncrypted datafiles only, so no Steam versions or anything funky.

Usage:

- unzip
- copy main_hi.exe or main_lo.exe to main.exe, depending on what type of models you want to see, high detail or low detail LOD models (warning, high-detail mode shows me about 0.5 FPS on my Radeon 3870. plus it needs about 700 MB RAM for GTA3, and will probably crash on GTASA, since will probably not fit into RAM. try low-detail version in that case).
- supply the game path (path of original game EXE) to main.exe as a parameter, as seen in the batch files in bin directory, or simply use the supplied batch files, changing paths if necessary.
- alternatively, just copy EXE file and DLL to gamedir.
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

just for info: i found the rotation problem is located in the quaternion->euler angles conversion. tho i don't know how to fix this. so if anyone uses this code, that needs to be fixed.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Cool... but why latest svn? Whats change in filesystem? I could get my litle stuff to work with svn

and whats format444? Whats special with it?
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

with filesystem 2.0 in 1.6SVN, external archive loaders can be plugged to the engine. this was not possible before.

format 444 is simple RGB, but with 4 bit per pixel instead of 8. should be supported pretty easily, just pad it back to 8 bit. format LUM8 is even easier, just use the one byte (grayscale) for each RGB byte. but both formats are used virtually nowhere.
xDarKyx
Posts: 1
Joined: Tue Jul 12, 2016 8:39 am

Re: DFF mesh format loader

Post by xDarKyx »

It's been some time since this topic has been created , and I don't see any recent activity.
But I was wondering if someone still has some of the files that have been posted here.
(all links are dead)

Thank you.
SLC
Posts: 21
Joined: Mon Jan 06, 2014 9:41 pm

Re: DFF mesh format loader

Post by SLC »

xDarKyx wrote:It's been some time since this topic has been created , and I don't see any recent activity.
But I was wondering if someone still has some of the files that have been posted here.
(all links are dead)

Thank you.
I don't think so. But if you're looking into loading GTA DFF files with C++ then you may look at this and try to make it work with Irrlicht.
Post Reply