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: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

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

Post by Oleg »

GTA IV: WFT files import filter release notes

Filter is available in ZModeler v2.2.1 and supports import of .wft files. The following features are available:
- Import of scene with objects separation to hierarchy.
- Import of materials and loading of textures.
- Import of collision model
- Import of skeleton model.

The entire mesh geometry is natively stored as a single object in WFT file. This gives a performance boost ingame, but not suitable for editing. The filter provides a Slice Model feature when geometry is sliced to objects which are laid in a hierarchy structure. When this option is toggled On, filter will create a hierarhcy based on dummy nodes and will lay all objects in this hierarchy. This includes geometry, dummy and collision volume nodes. When this option is Off, a single solid geometry is created and additionally a skeleton model is created. When dealing with vehicle models, it's recommended to use sliced model feature.

GTA4 does not provide full varity of materials settings. Evenmore, there are several shaders (see Data\Shaders folder) which can be used as materials. Each shader has dozen of adjustable options and requires predefined set of textures. In current implementation filter loads reffered textures onto material texture slots and drops adjustable options onto Extensions\User Defined Options page. Since no export is available, most of these options have no well-defined meaning and proper range of values; they are also a subject to change later.

Material name is composed from shader name with a cropped default shader prefix[/b]. You can change this prefix in Options\Settings\Profile\Editor\Preference\Filters\GTAIV\Default shader prefix. By default, filter uses gta_vehicle_ prefix and removes this part from shader name. Thus, materials apper as vehglass, paint2 etc. which is actually a gta_vehicle_vehglass, gta_vehicle_paint2 shaders respectively. This is also a subject to change, so don't expect it to be a follow up rule.

Additionally, material name might contain [CLR:num] tail part. This is GTA paint-color reference. Value of num could be 1,2 or 3 and it seems like you can use this feature on almost all shaders/materials. Remark: paint1, paint2, paint3 shaders should not be considered as one- two- and three- color paintcheme. These are different shaders for glossy, metalling and other types of car painting.

You should extract all textures from pc\models\cdimages\vehicles.img\vehshare.wtd archive and make a folder with extracted textures a search-path for zmodeler's textures service.
Additionally, you should extract textures from pc\textures\vehicle.wtd to that folder too. These are old textures (from GTA3/VC/SA) but they might be used too.
Bump-mapping textures are loaded as disabled texture slots. Dirt/mud texture is loaded, since it requires explicit UV-mapping; damage texture looks like dynamically created and not loaded into materials editor. Environment/reflection textures are rarely specified by shaders, but I recommed to have vehicleenvmap128.png texture be available in search-paths for environment-reflective materials.

Collision volumes are either laid in their own hierarchy tree (when Slice model is off) or added to general hierarchy tree (when Slice model is on) with [COL] signature in object tail. These objects, their names and settings are a subject to change.

Skeleton model is temporary available and should not be used. Consider using Sliced Model option.
Gen0cide_

Post by Gen0cide_ »

Whilst this is great news, as it has not been done before whilst including hierarchy and other stuff intact, is there any plans for an export filter. I would buy Zmodeler just for one!
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

I'll take a deeeeeeep breath and start working on export code soon. may be this week, may be on next week. Don't expect something too soon, *.wft files are a really complex thing.
blitziii

Post by blitziii »

It's just nice to hear that you'll work on an export filter, Oleg. Thank you very much for your efforts.
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

GTA IV is very similar to the TDU.
This means that even mod will be done within the reach of few.
Guest

Post by Guest »

Thank you soooooo much :D will be buying as soon as I can borrow the family credit card. (As a household we have very strict rules on the usage of credit cards)
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

Conversion for GTA-SA: All right! ;)
Image
_aLeX

Post by _aLeX »

Coult you upload it to http://www.gtainside.com , when you're finished? :)

Cheers,
Alex
gtainside.com
_aLeX
Posts: 20
Joined: Tue Feb 17, 2009 4:02 am

Post by _aLeX »

Automan wrote:This means that even mod will be done within the reach of few.
Sorry for double posting. I haven't understand this. What does it mean?
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

GTA IV is very similar to Test Drive Unlimited.
Is much more complex than SA, and much longer to do.
Will be few, in my opinion, to make mod for GTA-IV.
(Infernus uploded ;) )
_aLeX
Posts: 20
Joined: Tue Feb 17, 2009 4:02 am

Post by _aLeX »

Ah ok, now I understand what you mean. But I hope that many people will be able to make mods for GTA IV. We will see :)

Thank you very much for uploading your Infernus. I've activated it :)
Geo

Post by Geo »

Oleg, I'd just like to thank you for your hard work. And thank you in advance for working on an exporter tool. Are there any updates or progress on said tool?
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

don't expect any major progress within a month.
Geo_uk

Post by Geo_uk »

Hi Oleg, don't suppose there are any updates? I've been looking into it with no luck at all so far. :(
Murrchachosa
Posts: 35
Joined: Sun Feb 03, 2008 5:24 am

Post by Murrchachosa »

Geo_uk wrote:Hi Oleg, don't suppose there are any updates? I've been looking into it with no luck at all so far. :(
He said its takes much times.
What you thinking?
He's a magic or any magician from the middle ages who change your braincells
into bytes or something?
Its takes too much.
You should be happy there is a GTA4 filter.
User avatar
switchdesigns
Posts: 4
Joined: Mon Aug 01, 2005 2:56 am
Location: cali
Contact:

Post by switchdesigns »

GTA_XP wrote:
Geo_uk wrote:Hi Oleg, don't suppose there are any updates? I've been looking into it with no luck at all so far. :(
He said its takes much times.
What you thinking?
He's a magic or any magician from the middle ages who change your braincells
into bytes or something?
Its takes too much.
You should be happy there is a GTA4 filter.
Are you sure he is not magical? I mean look at what he has done so far.... My braincells are forever changed. Without him WWW.GTAFORLIFE.COM would not exist!
Gen0cide_

Post by Gen0cide_ »

Just so you know, I'm still here and rooting for ya Oleg! :D
Switch Designs

Post by Switch Designs »

Gen0cide_ wrote:Just so you know, I'm still here and rooting for ya Oleg! :D
Me too. Also today i found something strange in the gtaiv img fiiles it was a .wdr model of a severed head :shock: that was textured when i viewed it in sparkiv but there was no wft file for the model in the img file i was in. So i replaced the head wdr model file with the grenade wdr model file in the weapons img file and in game the head was still textured O.o Does this mean that the .wdr files can look for textures in other img directorys that the creator sets or is the texture in the wdr file with the model? :shock: You can see a picture of my head grenades at my site www.gtaforlife.com.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

collision became better and "nearly works fine". The wft file itself is still not working fine. The most annoying thing is when I load a saved game for the second time, the mesh is completely messed, while it's ok when first-time loaded.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

concerning wdr files, I don't know - I'm working with wft files currently.
C2

Post by C2 »

*roots for export capability, can't wait!*
UncleCrank

Post by UncleCrank »

Oleg wrote:collision became better and "nearly works fine". The wft file itself is still not working fine. The most annoying thing is when I load a saved game for the second time, the mesh is completely messed, while it's ok when first-time loaded.
Can you show a picture of the messed Mesh?
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

it's completely messed. triangles from zero point to infinity all over around.
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Post by Oleg »

I might be a bit lazy, but is there any configuration file where vehicle's extra parts are configured? WFT models contain several extra parts (extra_1, extra_4, extra_6 and so on), but these extra parts can appear in certain combinations only. For example, bobcat has "extra_4" - roof foglamps, which are mounted on "extra_1" boot/roof tubes; obviousely, extra_4 can't appear without extra_1. I can't locate currently whether WFT file contains these possible configurations. So, is vehicle extra parts configurations stored somewhere outside of WFT file?
User avatar
Automan
Beginner
Posts: 126
Joined: Tue Mar 06, 2007 1:27 pm
Location: Italy
Contact:

Post by Automan »

The GTA-IV extra are activated by exclusion - for example, 2 types of exhaust, -extra1 or extra2-.
Or all together on different parts, for bumper front, bonnet, wing, chassis etc.., to have a 2nd version of the vehicle.
For example the Sentinel, which becomes, with the extra actived, the Sentinel XS.
The extras are not in sequence. Could be extra1, extra3 e extra4, but not be a extra2.
At most I have seen -for now, while I converted the vehicles GTA-SA- up to extra7.
There are no extras outside the WFT.
I think that it is established by the program behavior for each extras vehicle.
If they are in relation OR (extra1 OR extra2) or AND (extra1 AND extra4 AND extra6 AND extra5 AND extra7).
Because is not there a hierarchical relationship in how they are positioned in the WTF to allow the choice of their behavior.
I do not think they have introduced a code of the program in WTF...
If we are lucky, maybe it's in a file carmods type GTA-SA...
Post Reply