GTA IV: .WFT import filter in ZModeler v2.2.1

GTA San Andreas and GTA Vice City discussion.

Moderator: Oleg

User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

unfortunally, there are no strict rules for extras. one vehicle might use extra 4 OR extra 6 (e.g. luggage in a trunk of bobcat) while another uses extra 4 AND extra 6 (front and rear skirts).

It does looks like these combinations are coded outside of WFT file. For example, an exported schafter apears in standard packaging or it appears in extra packaging with all skirts and in black color. I haven't coded it in WFT, so the game probably has these combinations coded somewhere.

I wouldn't bother much on this issue, but the exported schafter model refuses to work ingame until I delete extra_7 part (side skirts) - something wrong with extra parts. That's the problem..
Last edited by Oleg on Tue Mar 31, 2009 8:16 am, edited 1 time in total.
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

Aside from the extras, there are other problems?...
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

yup. doors, vehicle parts mass and "energy".
switch designs

Post by switch designs »

Oleg wrote:yup. doors, vehicle parts mass and "energy".
Is it possible for ya to work on a more simple model format to start with?

.wdr files are weapon models and models like the jet model props for the airport and probably the most simple to get ingame seeing as they don't have moving parts to deal with! (i made a mod where my rockets for my rocket launcher were the lear jets from the airport but they were faceing me instead of away from me and i need to turn that model around.)

next is .wdd files they are ped/player files probably more complex but still easier than cars!

then you have .wft or as I like to call em WTF files which are car models and are the most complex..

If you could work on getting an export/import filter for .wdr files first it might be easier to move on from there and would open up the game for tons of wepon mods untill you can get the other 2 file types worked out!

Also you can replace alot of models with other models in game like changing cop cars to the infernus or you can even change a helicopter to the infernus (but when doing that it makes the spoiler the chopper blade lol) but don't try and replace the helis with a bike it crashes the game and if you replace a cop car with a bike the cops sit it in funny it loads random parts and the wheels don't work plus you can't get in.... I would love to figure out how to get a bike over those damn cop cars too and have it work like a bike. I tried to change every vehichle info file i could find to make them work but it has to do with the numbered parts the car uses which is probably hard coded!
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

I probably would go this way, if I wasn't so close to in progress with wft files. they are literally on the final step, I just miss something small, but crytical and this drives me mad. I've made a "data read and data write" comparison recently - and data quantity matched 100%. zmodeler "understands" wft files completely - it reads 100% of meaningfull data (only padding and other small blank fields are left untouch) and writes exacly the same quantity of data (with padding and such). nothing left or missing.. So, the problem is either in: "what is written" or: "order of writing". Just need to locate which small thing is crytical for the game and wft are done. :-)

Yup, this sounds nice, but i'm several weeks on this damn stage so far. :-(

Also, I've decided to test the "smallest" wft file. I've replaced the car with single cube model. and cube collision model. only 5Kb of data - I WILL find the problem! :-)
_aLeX
Posts: 20
Joined: Tue Feb 17, 2009 4:02 am

Post by _aLeX »

Great news, Oleg. I'll keep my fingers crossed concerning the last critical problem. Keep us up-to-date of your progress ;-)
[ion] C2

Post by [ion] C2 »

Sweet, can't wait. Image
?

Post by ? »

screenshot or it didnt happen :P
chiefwhosm
Posts: 6
Joined: Fri Jan 23, 2009 6:03 am

Post by chiefwhosm »

I see on import there are loads of LOD level components. Does that mean we have to make LOD models ourselves, or does the engine make them, and your code was able to export out the different LOD levels ?

Chief :)
??

Post by ?? »

big chance that we posted the same second dejavu
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

when certain LOD is missing, the game uses higher-detailed lod for it. For example, if you delete all _L1 components, game will use highest lod (*_L0 objects) until car reaches far distance and then it will switch to lowest detail (_L2).

If LOD for certain part misses, the game will not keep higher-detailed part visible. For example, if you delete bonnet_L1, then medium-detailed variant (_L1) of the whole vehicle will miss bonnet part.

screenshot is currently has no point. Game suffer dramatic graphical glitches on exported models. Certain parts or even LODs work perfectly, while some of them produces glitches. I'm not sure where the exact reason of this problem - looks like vertices data layout of exported model doesn't suit some internal "rules of layout". I've spent a whole day trying to attach my vertices data to original file and can surely say that my generated vertices layout doesn't suit the game. That's a partly good news, since I've been trying to spot the problem in completely different area. On the other hand I've almost no ideas how to produce "suitable" layout of vertices - there is no obviouse difference or anything that reveals "internal rules of layout". not yet.

concerning extras and other parts that I recently said "have to delete in order to see modded car ingame" - this is not a problem now.
Guest

Post by Guest »

I have a problem with the import filter, I select a GTA IV model for importing but there is nothing in my zmodeler window. Why is that so?
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

You have used Spark IV to extract wft files from img file?...
Guest

Post by Guest »

Yes I used Spark.
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

...then buy legal registration key.
DexX

Post by DexX »

I'm not sure where the exact reason of this problem - looks like vertices data layout of exported model doesn't suit some internal "rules of layout". I've spent a whole day trying to attach my vertices data to original file and can surely say that my generated vertices layout doesn't suit the game. That's a partly good news, since I've been trying to spot the problem in completely different area. On the other hand I've almost no ideas how to produce "suitable" layout of vertices - there is no obviouse difference or anything that reveals "internal rules of layout". not yet.
I'm not sure if this would help but in "Grand Theft Auto IV\common\shaders\dcl" there is a bunch of .dcl files that specify vertex flags for the corresponding material/shader type (defined elsewhere - shaders\db).

If you patched to 1.0.3.0 there isn't much useful info left in those files, since R* changed them in later patches. But in 1.0.0.0. the files would state the type and order of vertex information used. Example, gta_vehicle_generic.dcl

Code: Select all

16473 ; see grcore/fvfchannels.h for bit values
; position diffuse texcoord0 normal tangent0;
gta_default.dcl

Code: Select all

89 ; see grcore/fvfchannels.h for bit values
; position diffuse texcoord0 normal
Like i said, i don't know if you know that or not. But i've still got 1.0.0.0. installed, i can upload the files if you're interested.
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

I use 1.0.0.0 too. There was a memory segmentation mismatch in graphical data part, and now it's OK. My graphical part attached to original GTA file works fine now, but the problem with crash still presist. there are other problems with exported files too. Concerning vertices format values, I don't have "fvfchannels.h" but I have a guessed version of fvf components.
aLmo
Posts: 2
Joined: Fri Apr 03, 2009 4:29 am
Location: BIH

Post by aLmo »

i can entered i key :S.I cant see the windows for the key?Someone help me?
_RicH_
Posts: 40
Joined: Sat Feb 07, 2004 7:34 am
Location: UK

Post by _RicH_ »

details are in the email sent when you registered.. if you registered...
knightprowl

Post by knightprowl »

hi guys, i wanted to know oleg, how close you really are to getting this exported down and done, im just curious as to how will we all use it, as in, will it be more difficult and hectic more then other GTAs, if so, then idk what ill do, as i dont normally use zmodeler, but id love to just know how much longer you think till the filter for exporting is out, anyways, im just curious, thanks and peace guys

KP
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

The filter is kinda ready. it exports everything, but something is still not working properly. One time I see a vehicle which is the same as original on high-detail, but lower-detail gets messed when I move away... sometimes, certain objects are get comepletely messed to random triangles flying around... and the most obviouse problem is a game crash when I load any saved game. So, I can't say when the problem will be located - I mess with this stuff for a pretty long time already and one fine day all things will get sorted out. :)

Just to take a small breath of fresh air, I switched to LifeForSpeed temporary.
ö

Post by ö »

very nice.. so all "collision working and" the "crash-map" ? are there car textures/finish/bumpmap on export or is it just the model and the game does that automaticly/randomly? 8)
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

I import original model and export it. so, all materials and textures are the same. Something is probably wrong with either collision or animation setup, don't know yet.
aLmo
Posts: 2
Joined: Fri Apr 03, 2009 4:29 am
Location: BIH

Post by aLmo »

_RicH_ wrote:details are in the email sent when you registered.. if you registered...

if im registered where?
Guest

Post by Guest »

if you paid $60 for using ZModeler 2 - this is called registration.
Post Reply