GTA IV: .WFT import filter in ZModeler v2.2.1
Moderator: 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..
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.
Is it possible for ya to work on a more simple model format to start with?Oleg wrote:yup. doors, vehicle parts mass and "energy".
.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!
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!
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!
-
- Posts: 6
- Joined: Fri Jan 23, 2009 6:03 am
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.
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.
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).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.
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;
Code: Select all
89 ; see grcore/fvfchannels.h for bit values
; position diffuse texcoord0 normal
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.
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
KP
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.
Just to take a small breath of fresh air, I switched to LifeForSpeed temporary.