DFF mesh format loader
Great stuff!loki1985 wrote:today i revisited the moomapper source code searching for the bug which caused GTAVC and GTASA DFF meshes to not display properly. i found that most of these newer DFFs use triangle strips instead of triangle lists. now i added support for that, and voilá, VC and SA are displayed correctly.
I'm hoping to get some time to actually look at this myself over the holidays...
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
i don't know, did not try yet (only tried environment models).Carama wrote:Today, i thought about a gta dff loader and wanted start to code ... but there is allready one .
Can i load the car models?
if it works, currently no frames are implemented, and i think the damaged models are frames inside the DFF. maybe, if i find some time in the future, i will add support for frames.
well, i don't have much time for it at the moment. i was thinking about adding frames support, but then abandoned that idea because of the efforts involved.
some days ago i ported my code to irrlicht 1.6-svn, which will allow me to write an IMG loader, so loading files directly from the games archives should be possible.
then maybe, just maybe, i will write a model-streaming (or rather model manager) class proof of concept, to see if that can improve render speed and quality.
when that works, i plan to release the complete viewer application to the community, because i think then i will not invest much more time into this project. my main intention always was to have a nice GTA world renderer in irrlicht, and while it would be technically possible to have support for cars (frames) and NPCs (skeletal animations), the effort required is pretty high...
some days ago i ported my code to irrlicht 1.6-svn, which will allow me to write an IMG loader, so loading files directly from the games archives should be possible.
then maybe, just maybe, i will write a model-streaming (or rather model manager) class proof of concept, to see if that can improve render speed and quality.
when that works, i plan to release the complete viewer application to the community, because i think then i will not invest much more time into this project. my main intention always was to have a nice GTA world renderer in irrlicht, and while it would be technically possible to have support for cars (frames) and NPCs (skeletal animations), the effort required is pretty high...
Ah ok, thanx..loki1985 wrote:well, i don't have much time for it at the moment. i was thinking about adding frames support, but then abandoned that idea because of the efforts involved.
some days ago i ported my code to irrlicht 1.6-svn, which will allow me to write an IMG loader, so loading files directly from the games archives should be possible.
then maybe, just maybe, i will write a model-streaming (or rather model manager) class proof of concept, to see if that can improve render speed and quality.
when that works, i plan to release the complete viewer application to the community, because i think then i will not invest much more time into this project. my main intention always was to have a nice GTA world renderer in irrlicht, and while it would be technically possible to have support for cars (frames) and NPCs (skeletal animations), the effort required is pretty high...
But anyway does have anyone got all the textures in the PNG format? Converting them TXD's to PNG will take me all day..
convert TXDs to TGAs:
- copy code to BAT/CMD file.
- run BAT/CMD in directory with TXD files.
- requires TXDWorkshop 3.1 or later
- change path to txdworkshop.exe to your needs
- problem: creates directories in the root of the drive where the .TXD resides. that means if your TXDs are somewhere on drive C you will get hundreds of new folders in there. undesirable. i think this is a bug in TXDWorkshop as a workaround, create a big enough ramdrive or other means of writable drive emulation (i successfully used a truecrypt volume, as i am a lazy bastard).
Code: Select all
@echo off
for %%a in (*.txd) do C:\txdworkshop\txdworkshop.exe /extract %%a
- run BAT/CMD in directory with TXD files.
- requires TXDWorkshop 3.1 or later
- change path to txdworkshop.exe to your needs
- problem: creates directories in the root of the drive where the .TXD resides. that means if your TXDs are somewhere on drive C you will get hundreds of new folders in there. undesirable. i think this is a bug in TXDWorkshop as a workaround, create a big enough ramdrive or other means of writable drive emulation (i successfully used a truecrypt volume, as i am a lazy bastard).
also, here are 2 batch files to convert all these TGA files to JPG:
tgatojpg.bat:
tgatojpgrecursive.bat
- requires Irfanview
- change path to i_view32.exe to your needs
- create the 2 batch files above, copy first one to somewhere in your path (e.g. C:\Windows, dirty but it works)
- copy second batch file to folder containing texture subdirectories (the several hundred folders named like the original TXD files) and run it.
- be patient
- be aware that JPG supports no transparency etc...
tgatojpg.bat:
Code: Select all
cd %1
echo %1
C:\Programme\IrfanView\i_view32.exe *.tga /silent /convert=*.jpg
del *.tga
cd..
Code: Select all
@echo off
for /d %%a in (*) do call tgatojpg.bat %%a
- change path to i_view32.exe to your needs
- create the 2 batch files above, copy first one to somewhere in your path (e.g. C:\Windows, dirty but it works)
- copy second batch file to folder containing texture subdirectories (the several hundred folders named like the original TXD files) and run it.
- be patient
- be aware that JPG supports no transparency etc...