GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15)

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15)

Postby Oleg » Sun Aug 02, 2015 10:20 am

GTA V Import/Export filter is available in ZModeler 3.1.0


Pre-configuring ZModeler for proper import.

With regard to Scene hierarchy, compound objects and geometries guide you should set up proper compatibility and its options prior to importing. You should do it only once, then restart ZModeler so it saves your configuration.


Importing models

Current version of the filter allows you to import vehicle (car/bike/plane/boat) models into ZModeler. Model should be extracted from the game archive with OpenIV tool. Most of vehicle models you need are located either in DLC packages, or in x64e.rpf -> levels -> gta5 -> vehicles.rpf

Additionally, you should extract common textures pack which are:
vehshare.ytd, vehshare_worn.ytd, vehshare_army.ytd, vehshare_truck.ytd. Some vehicle models could reuse textures from different vehicles. For example, an interior of Buffalo2 model uses textures found in vehicle_schaf_interior.ytd and vehicle_poltax_interior.ytd.

When certain texture is missing, you will see the error message in a log window, but material and texture will be created. Texture will be replaced with a temporary placeholder, you can see them in textures browser in "Missing" group. You can locate missing textures manually and use Replace button to reload actual texture.

Materials could be created with environment reflection on ENVMAP slot which requires spherical reflection texture env.dds to be available. You can use any "spherical environment mapping" texture fond in google, it doesn't actually matter, just rename it to env.dds and ensure this texture is available for ZModeler (can be found in one of "texture serach paths" specified in Settings->Services->Textures page). I recommend to use dark environment texture, so your model will not look over-bright.

Also, with regard to Shaders and materials guide you should download and make available for ZModeler the compiled version of vehicle_genericmud_car.dds image, or use a repacked vehshare.ytd textures package.

The following image is a preferred settings I've used to import buffalo2 model. This is a bit specific to the vehicle itself, as mentioned above extra texture packages are specified to get all required textures loaded.

Note: you can specify as much texture packages to preload as you want. ZModeler will not load textures from these packages, the filter will be able to search for textures in these packages, so this is safe to use a lot of preloaded packs in terms of performance and memory usage.
gtasettings_prepare02.jpg
Import settings


LODs (Level of detail) components.

ZModeler3 scene setup and LODs usage is different to what you might have seen in ZModeler2. Objects are combined into compound components, so one object can hold several LODs at a time and, if desired, a collision too. This is a new fashion of designing the scene for mods, there will be no old-school scene setup available.

After you import a model, you should specify which scene state to show. Open Structure panel and press desired LOD button (L0, L1 ... L4) and/or toggle Collision COL state and/or toggle visual effects buttons Dirt, Dust, Burn.

Here's a draft explanation video I've created for you:



Exporting models

Your mod will require model.yft and model_hi.yft files to be created (preferable from the same scene) to replace original vehicle model (or to be installed as a DLC addon). If you have followed the Scene hierarchy and compound objects guide and watched the video above, you are expected to have a scene with compound geometry objects holding meshes for several LODs. It is allowed but strongly not recommended to use the same model for high-detailed version and for lower-detail version. Technically, you can have only one LOD and export your scene to model_hi.yft and export the same scene into model.yft file. This will work, but low performance will be a drawback of such a decision.

The game uses lower-detail model hardly. When your video settings are configured to use very high-detail models, you will see model_hi.yft geometry rendered, but the game will still use LODs from model.yft. At least, the scratches, blood and glass cracks reside on a lower-detail geometry. Additionally, a dynamic shadow is draw using a lower detail geometry than you currently see in game. In terms of L0, L1, L2 this will stand for: the game draws you a geometry of L0, scratches, blood effect and shadow under vehicle resides on L1. When you move away, the geometry will be drawn on L1 and effects on L2. The game will pin to L0 and L1 if you have no other LODs.

In order to export your scene into model_hi.yft and model.yft files, press Export button, pick a desired export format (or pick the file to overwrite). You will see the export options:

17_export_options.jpg


Most of *.yft files have to be exported in Skeletal mode meaning parts will be merged into single "object". When skeletal is Off, parts will be considered as sub-components or destruction stages of the very first hierarchy part. This mode is not used currently, so you should pin to "Skeletal". The second important option you should pay attention to is Export LODs.


Exporting LODs scenarios for your scene

The suggested scenario for an export is to use Autodetect mode for Export LODs option on export. When this mode is used, an exporter will:

Export only highest LOD if you export into a file containing _hi.yft in a tail. Exporter will take a scene root node named the same way as the destination file, or will try to locate the name with no "_hi" in a name. Literally, in attempt to export into my_model_hi.yft, an exporter will try to locate scene node named my_model_hi, or if not found a my_model scene node is the next candidate for export.

Export all nodes except the highest LOD when export file does not contain _hi.yft and your scene has a _hi node in hierarchy. Literally, an export into my_model.yft will export all LODs except the highest one (L0) if your scene contains my_mode_hi[i] node.

Export all LODs when export file does not contain _hi.yft and your scene has no [i]_hi
node in hierarchy. Literally, an export into my_model.yft will export all LODs as is (L0, L1...) if your scene contains [i]my_mode[i] node.

Or in short:
model -> model.yft (L0, L1, L2...)
model -> model_hi.yft (L0)
model_hi -> model.yft (L1, L2...)
model_hi -> model_hi.yft (L0)

As you see, it's preferable to have a root node named [i]model_hi[i], so you have proper LODs stored in files on export.
For your convenience, an exporter will write in a log window which export mode have taken place.

You can explicitly force export scenario ("Export highest lod only", "Export all but highest" or "Export all available") by picking a desired mode in drop-down list in options window. In such a case, a file name you are exporting into must explicitly match the name of the scene node the filter will take for exporting.

An error of Can not locate scene node named "model" for export means the filter can not locate scene object named the same as the file you are exporting into. Rename the node and retry exporting.

With respect to Glass crash data guide, put required *.cwgv files into the folder you will export into. You can use files created by importer in an import folder. You can take these files from a completely different model and can mix files from different models. The exporter will refine data contained in to ensure this will fit into an exported scene setup. When no glass crash data avail, your vehicle glass might suffer of inaccurate drawing of crashed glass with no glass fragments on boundaries. It is Ok for the game, but does not look good.

When everything is read, specify the file name to export into or pick the file to overwrite and press Export. Check the log window for errors or other important messages.

Exported model causing game crash.
Discussed and explained here.


Locking model to prevent re-importing.
As a result of discussion in this topic, a model locking feature is made available. Limitations discussed in a topic are still apply. The locking will prevent a model to be re-imported into ZModeler, it will not save your model from being imported into any other tool. Do not consider this to be a safe/protection/encryption method.

Put the attached XML file into "Install" folder of ZModeler to enable locking feature.
Attachments
AllowLocking.xml
File locking activation script.
(346 Bytes) Downloaded 936 times
gta_parts.xml
GTAV Parts names identification values. Put this file into "Install" folder to reset parts identification database.
(29.32 KiB) Downloaded 1172 times
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby thegreathah » Sun Aug 16, 2015 8:36 am

Will you be adding a lock tool on the modeler soon? Unfortunately people are unwilling to upload work because of this and the community is missing out on many awesome creations because of it.
thegreathah
 
Posts: 4
Joined: Thu Aug 13, 2015 4:07 pm

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Sun Aug 16, 2015 8:42 am

.yft files can be easily read by OpenIV and a tool that was used months ago to rip models. There is no point in trying to "lock" model, as this can be bypassed in minutes. Sorry on this, but I've made a consideration that I'll not confuse users about a magic ability to "lock" file, while this is technically impossible.
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby thegreathah » Sun Aug 16, 2015 9:06 am

ok thanks for quick reply.
thegreathah
 
Posts: 4
Joined: Thu Aug 13, 2015 4:07 pm

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby victorexpert_ » Tue Aug 18, 2015 9:08 am

here is download of plugin????
victorexpert_
 
Posts: 1
Joined: Tue Aug 18, 2015 9:03 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Tue Aug 18, 2015 9:36 am

it's included in ZModeler3 download package.
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Chasez » Thu Aug 20, 2015 12:11 am

Oleg wrote:.yft files can be easily read by OpenIV and a tool that was used months ago to rip models. There is no point in trying to "lock" model, as this can be bypassed in minutes. Sorry on this, but I've made a consideration that I'll not confuse users about a magic ability to "lock" file, while this is technically impossible.


OpenIV can read V files but doesn't allow ripper to rip them only older version of OpenIV in which GTAV file reader is not available.
User avatar
Chasez
Beginner
 
Posts: 248
Joined: Thu Jun 18, 2009 12:34 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Thu Aug 20, 2015 12:20 am

they will make .yft import/export soon and any bit of locking will vanish in a moment. with just "export open format", "import open format". 10 seconds at most.
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Chasez » Thu Aug 20, 2015 1:43 am

Oleg wrote:they will make .yft import/export soon and any bit of locking will vanish in a moment. with just "export open format", "import open format". 10 seconds at most.


there's no import/export open format for custom .wft files that are locked. Like I said the only way for thieves to get GTA4 models is old OpenIV before security support was implemented. Best part is that if you lock .wft files in OpenIV you can't open them in 3DS Max and zmodeler can't even read them even if they are not locked.
User avatar
Chasez
Beginner
 
Posts: 248
Joined: Thu Jun 18, 2009 12:34 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Thu Aug 20, 2015 11:46 am

Chasez wrote:there's no import/export open format for custom .wft files that are locked.

..that are locked by OpenIV, not by ZModeler. I guess they just ignore locking of ZModeler as I can't remember that I've specified anywhere how "locked" .wft file differs from "not locked". Or may be I have specified this somewhere...
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Chasez » Fri Aug 21, 2015 4:12 pm

Oleg wrote:
Chasez wrote:there's no import/export open format for custom .wft files that are locked.

..that are locked by OpenIV, not by ZModeler. I guess they just ignore locking of ZModeler as I can't remember that I've specified anywhere how "locked" .wft file differs from "not locked". Or may be I have specified this somewhere...


No, if the file is locked in Zmodeler2 OpenFormats cannot open them in 3DS Max. At least I tried to test this and it did not work with my locked mods. except the old OpenIV that can open wft and also allow ripping tools to access it(newer version of OpenIV under ripping tool either crashes or shows a blank screen and doesn't give a ripping option) there is no other way to get locked files.
User avatar
Chasez
Beginner
 
Posts: 248
Joined: Thu Jun 18, 2009 12:34 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby _cp_ » Sat Oct 03, 2015 1:18 am

@Oleg
You should attach lights ID to Shader materials & Textures. And solution for windows tint.
Code: Select all
headlight_l ID = 1
headlight_r ID = 2
taillight_l ID = 3
taillight_r ID = 4
indicator_lf = 5
indicator_rf = 6
indicator_lr ID = 7
indicator_rr ID = 8
brakelight_l = 9
brakelight_r = 10
brakelight_m = 11
reverselight_l = 12
reverselight_r = 13
_cp_
Beginner
 
Posts: 205
Joined: Tue Aug 11, 2015 11:19 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby RPUCorne » Tue Oct 06, 2015 7:59 am

@Oleg Hello

I have an problem with exporting to GTA rage model yft,ydr:
This is the error i get: an not locate scene node named policeb for export. fileGTARageExport.cpp line106

How can i fix that?

Greets
RPUCorne
 
Posts: 5
Joined: Mon Oct 05, 2015 8:19 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby _cp_ » Tue Oct 06, 2015 8:07 am

@RPUCorne
Your exported file and dummy name have to be the same.
Image
_cp_
Beginner
 
Posts: 205
Joined: Tue Aug 11, 2015 11:19 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Mon Oct 12, 2015 11:41 am

any material used by geometry must be gta-compatible. materials are converted/prepared with a script that you can find in materials browser under a top-right button with "gears" drawn. there you can pick GTA5-> vehicle-> and the shader that suit your needs.

Default material should not be converted and it should not be used on a geometry you export. Literally, you should create (copy/new) materials, assign them onto your geometry and convert these materials before exporting.
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby Oleg » Wed Mar 09, 2016 1:27 am

As a response to posts indicating "car spawns duplicates" or when vehicle collisions or other parts get misplaced in game, that looks like a hierarchy bug, a quick fix should be tested first: you should supply a good parts identification database to the filter, so it writes correct part IDs on export. The filter will not report any error or warning when it writes bad IDs into file, as it has no idea whether it writes good or bad IDs. Bad IDs could come from a loading of invalid or buggy file. In order to fix IDs known by ZModeler, you should load several original game vehicles first.

Alternatively, you can use a script with some (most of known/used) predefined IDs. The script is attached to the guide topic here:
viewtopic.php?f=31&t=7343
The XML should be put into "Install" folder of ZModeler, then you start ZM and close it. From that moment on, ZM will use correct IDs on export unless you mess them by loading a bad/corrupt model file again.

Note, the script will clear all known IDs collected in your ZModeler's database, so you might get "Unknown part name..." warnings on export. If you do, locate any original vehicle that uses the parts you get a warning on, then load these original models and restart ZM, so it knows necessary parts too.
User avatar
Oleg
Site Admin
 
Posts: 7398
Joined: Fri Feb 06, 2004 3:54 am

Re: GTA V: Import/Export filter in ZModeler 3.1.0 (10.Aug.15

Postby jsjosh225 » Sun Mar 20, 2016 5:28 am

hey oleg

so I edited the oracle xs a put a lightbar on it and it looks great! but I don't want to keep the same name "oracle" I want to change it to "oraclec" "c" for "cop" and I've been testing it and I changed the texture file, and the .yft file to "oraclec" but when I load it the game crashes.

I've been trying to figure it out. the block of code down below is what I used to add the vehicle in the "vehicle.meta" file

<modelName>oraclec</modelName>
<txdName>oraclec</txdName>
<handlingId>police</handlingId>
<gameName>Oraclec</gameName>
<vehicleMakeName>POLICE</vehicleMakeName>


And I also renamed the files "oraclec.yft" and "oraclec_hi.yft" and "oraclec.ytd" both texuture and lo and hi model files

My game still crashes though. I got one of my older mods to work sum what but it wasn't dedicated to the police, I would be driving around and AI divers would be driving it. basically the mod that I'm making is a car with a light bar and I want it to be its own vehicle without is taking the main "oracle" vehicle place.

the link below is the extra car slots, instructions on hot to do it, and a YouTube tutorial on it - the only issue and me trying to figure it out and how to rename the vehicle or me putting stuff in the wrong slots. I've watched a tutorial on it and followed the instructions on it.

"Extra Vehicle Slots" - Link: https://www.gta5-mods.com/vehicles/more ... o-add-v1-2
"Adding new vehicles to the game" - Link: http://www.lcpdfr.com/forums/topic/5090 ... ow/?page=1
YouTube tutorial for extra vehicle slots - Link: https://www.youtube.com/watch?v=cU71inGhyBE

I've look at all of these and still can't figure it out.

Oleg - if you know anything please PM me or reply to this post -
it would be greatly appreciated!
jsjosh225
 
Posts: 1
Joined: Fri Oct 16, 2015 2:40 pm


Return to Grand Theft Auto V

Who is online

Users browsing this forum: V.T. and 4 guests