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.
Mania-92
Posts: 16
Joined: Sat May 19, 2007 2:21 pm

Post by Mania-92 »

Thanx, but there are still some missing or the convertion gone wrong?

And my executable crashes, has this anything to do with the fact nog al textures can be loaded or something else?
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

exe should not crash, only error message if an archive is empty.

but you can also wait a few days, as i am already finished adding a loader for IMG files, and now only need to make a TXD loader which also decompresses DXT files.
Mania-92
Posts: 16
Joined: Sat May 19, 2007 2:21 pm

Post by Mania-92 »

loki1985 wrote:exe should not crash, only error message if an archive is empty.

but you can also wait a few days, as i am already finished adding a loader for IMG files, and now only need to make a TXD loader which also decompresses DXT files.
Thanx... :)
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

tiny preview screenshot for the new version. everything is currently loaded directly from the IMG files of GTA3, so no unpacking needed at all.
code works in 1.6SVN only, because this has been made possible only be the new filesystem changes in 1.6

there are still issues in correct image parameter recognition (bit depth, alpha, dxt compression), because of this the colors in the picture are wrong...

Image
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Its awesome! Keep it going! Im just waitin'til download it and gotta try it out!


btw will it work on Irrlicht 1,5?
Last edited by Malgodur on Thu Mar 19, 2009 11:01 am, edited 2 times in total.
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

Malgodur wrote: btw will it work on Irrlicht 1,5?
the previously released versions are for 1.4.2, the newest version (still unreleased) will only work under 1.6 (current SVN), since it uses the new filesystem API to be able to read models and textures directly from the games IMG archives.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Well it seems the files compiled succesfully with Irrlicht 1.5 ? but idk, now im looking for gta mesh to load.
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

Malgodur wrote:Well it seems the files compiled succesfully with Irrlicht 1.5 ? but idk, now im looking for gta mesh to load.
well, it is possible, since i never tested 1.5. but the newest version will definitely need 1.6-SVN or newer
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

I downlaoded irrlicht 1.4.2 and tried
open gta mesh downloaded from here:
http://grandtheftauto.filefront.com/fil ... t_W8;59772


but i get error "cannot open: data/gta3.dat".. How can i load mesh without this file? I have texture and .dff, is that all?


EDIT:
Now installed gta vice city, but i dont know how can i set path to data....i changed gameId...

EDIT: got it.... in .exe directroynm
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

the DFF file you linked there will not work, since no frames are supported. that means things like cars are not supported at the moment, only buildings, landscape and other simple models are supported.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

loki1985 wrote:also, here are 2 batch files to convert all these TGA files to JPG:

tgatojpg.bat:

Code: Select all

cd %1
echo %1
C:\Programme\IrfanView\i_view32.exe *.tga /silent /convert=*.jpg
del *.tga
cd..
Idk why but it dont work... i downloaded latest IrfanView...(and converted txd to tga first)
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

"Don't work" means what? Did you computer explode when you tried or was the image not converted?
Any error messages?
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

Window dispear after while..
loki1985
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Post by loki1985 »

for testing, you can use the original TGAs also, it is not needed to convert them to JPG. the only difference is that the files use less HD space.
Malgodur
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Post by Malgodur »

I know, its great...but i wonder why tga-jpg converter dont walk.. how can i change world scale? And lod?
Post Reply