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.

Postby Mania-92 » Mon Mar 09, 2009 3:28 pm

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

Postby loki1985 » Mon Mar 09, 2009 3:35 pm

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.
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Mania-92 » Thu Mar 12, 2009 3:02 pm

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

Postby loki1985 » Thu Mar 12, 2009 3:19 pm

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
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Malgodur » Thu Mar 19, 2009 10:23 am

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.
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Postby loki1985 » Thu Mar 19, 2009 10:47 am

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.
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Malgodur » Thu Mar 19, 2009 11:02 am

Well it seems the files compiled succesfully with Irrlicht 1.5 ? but idk, now im looking for gta mesh to load.
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Postby loki1985 » Thu Mar 19, 2009 11:38 am

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
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Malgodur » Thu Mar 19, 2009 12:11 pm

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
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Postby loki1985 » Thu Mar 19, 2009 1:38 pm

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.
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Malgodur » Thu Mar 19, 2009 2:51 pm

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)
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Postby Sylence » Thu Mar 19, 2009 2:58 pm

"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.
User avatar
Sylence
 
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany

Postby Malgodur » Thu Mar 19, 2009 3:03 pm

Window dispear after while..
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

Postby loki1985 » Thu Mar 19, 2009 5:00 pm

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.
loki1985
 
Posts: 214
Joined: Thu Mar 31, 2005 2:36 pm

Postby Malgodur » Thu Mar 19, 2009 5:18 pm

I know, its great...but i wonder why tga-jpg converter dont walk.. how can i change world scale? And lod?
Malgodur
 
Posts: 195
Joined: Sun Mar 15, 2009 8:22 pm

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest