Report Import/Export bugs here

GTA:V Modding with ZModeler3 discussion.
Flappu
Posts: 1
Joined: Sun Sep 19, 2021 9:58 pm

YDD File Corrupt When Exporting

Post by Flappu »

I am not sure if this is a bug or if I am doing something wrong.

I am trying to update the bump map of a clothing item in EUP. I import the items ydd file into zmodler, go to texture library to export the bump map file. After editing the file I replace it in the texture library and proceed to export the ydd file. When I export it, it is corrupted. When I select the model on my character ingame it causes my game to crash and the ydd file itself is 0mb.

I apologize if this is hard to read, I have been trying to work this issue out for hours and I am exausted. Thanks for any help :)
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

the .ydd file of 0Kb is an interrupted export. There was an error in a scene and nothing was exported (even though file was created).
LewisMcilreavy
Posts: 1
Joined: Sat Nov 06, 2021 2:36 pm

Re: Report Import/Export bugs here

Post by LewisMcilreavy »

When exporting a car I get a series of errors and the YFT/hi_YFT are empty

below are the errors:
Missing requried texture in "SPECMAP" on material "Gloves".
Missing requried texture in "MASK" on material "RSGMaxiSystem emis".
Missing requried texture in "SPECMAP" on material "RSGMaxiSystem emis".
Missing requried texture in "MASK" on material "toughpademis".
Missing requried texture in "SPECMAP" on material "toughpademis".
Undefined adaptation on material "toughpad". Dropping to "default".
Can not obtain Shader material from "gum". file:rageexportmaterial.cpp line:129
Attachments
ZModeler3_oTLPpY2LRb.png
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

Your materials are not prepared for export.
1. missing required textures on some materials. in case of "SPECMAP" you can use "vehiclegenericspecmap" (white) texture; for MASK texture slot usually standard vehicle's dirt-scratch texture is used
2. undefined adaptation ("Adapt" value on texture's tile) specified on one material.
3. material "gum" is not a Shader material. Each GTA material have to be shader material with a proper "Adapt" value set. Depending on desired "Adapt" (adaptation), exporter will configure material for export and will check for required texture slots to read texture name from every required slot.

There is a material configuration script that can apply most of the settings onto material. Pick desired material, then press a big button with "gears" in top-right corner of materials editor; then pick desired material for configuration. If i'm not mistaken, it can be applied to a set of selected materials at a time.
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

Hi everyone
I am facing a big problem when exporting a vehicle.
The vehicle was fully modeled by myself by using Blender, then imported it to ZM in .fbx ( obj provide a bad management of vertices).
Fully converted the vehicle is taking about 365k vertices and 440k poly. The vehicle was correctly triangulated with Blender.
I export the vehicle correctly, but once exported the vehicle displays a size of 15.6 mb and when I import the .yft I realize that many vertices are splited, I tried to weld them and then re-export but the problem is still there.
I thank in advance all people who could give me a help, I have a good experience with zmodeler but I'm stuck.
Thanks
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

On import of FBX, DAE or OBJ, you should toggle "optimize vertices" option.
Also, your exported vehicle can still be overweighted for GTA and could cause game crash.
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

But what I don't understand is why my vertices count is higher on my .yft than on my zmodeler
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

vertices count should be the same in ZModeler and in exported model. In some cases, vertices could be split, so you get some of them duplicated. for example, when an object uses different materials, geometry fragment with material #1 will not use vertices from geometry fragment #2 (that material #2 uses). But this duplicates vertices on adjacent edges only, so it should not be a dramatic increase of vertices.

If you are talking about vertices count in Blender and ZModeler - this can increase dramatically, since any model exported from Blender (via DAE, FBX or OBJ) will get three vertices per each triangle. Literally, "vertices count = 3x times triangles count". The "optimize vertices" option on import will try to merge duplicate vertices to reduce the effect. Yet you still can get duplicated vertices in some ares where they are not supposed to be, but it's still much better than 3x duplication.
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

I do not have any problem from zmodeler ton blender, i know this issues and it is for this reason that now i only use .fbx
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

The issue
Attachments
before export
before export
after export
after export
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

hmm... I can see the mesh get split vertices upon export on some of parts (you can see them too - those with solid wirefame lines). I suggest to delete everything and leave just one problematic part only for tests (so you can make some quick export/import tests on problematic part only).

the very first thing to find out, whether the export will do the same vertices split when you export just one part. If it does, then something is wrong with the part itself.

I would suggest to
1. apply Surface\Normals\Calculate tool. (export, test)
2. apply "Edit UV" tool for UV#1 to generate new uv-mapping ("Generate new" mode). Do not edit mapping in UV mapper, just generate new mapping with this tool. (export, test)
3. same as #2, but use Copy UV tool to copy UV#1 into channel #2 and #3.

Note, the geometry on your screenshot is a group of objects, you will need to ungroup it to access objects directly.
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

OK so I have tried your suggestion but it doesn't work.
I would just like to know why vertices splide when importing a .obj exported from blender? (i do not use .obj but i have tried to exporte my model to obj and vertice are duplicated in Zmod)
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

it's a technical issue with export from 3dsMax and Blender. Using "optimize vertices" option on import in ZModeler is designed to solve the issue.

However, your screenshots show completely different issue - the upper image in ZModeler shows correct (non-duplicated) geometries that I consider as good import. The second image (after export) confuses me, as you get a lot of duplicated vertices on export that I can't find a reason for.
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

Ok so i finally find the solution.
I always triangulate my 3d model before exporting from blender.
So I have tried without triangulation, and the vertice split issue is now solve.
User avatar
nnano
Posts: 18
Joined: Sat Jan 02, 2021 1:00 am

Re: Report Import/Export bugs here

Post by nnano »

Hello, so recently i noticed a problem where most of the vehicles after exporting, not editing anything just exporting some strange thing happens with the collision of the car, you can go in the center of it, and front and the back are ok, only recently i noticed this problem, not only for me but for my friend as well. Is there like a fix for it? Or this thing happends when you do something wrong? I actually fixed it on 1 model by deleting boot collision and redoing it, redid boot for the middle of the car collision to work. Anyway is there like a fix?

[There’s a photo how people can go through in game]
Attachments
360440FB-ABA1-43CE-9728-A077602A1804.jpeg
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

yup, this is a known collision issue when vehicle's collision stop working when game considers just one collision element to be bad or inaccurate. In some cases, chassis collision is the problematic one.
first thing to inspect is to toggle "Damage" button on/off and see collision volumes change - in both states ("Damage" on and off) there should be no polygons volumes flipping inside out. while you toggle this mode, vertices will move and some tiny polygons could happen to flip inner side out. Refine movement of vertices, so this does not happen.

if the fix above does not work, try "double collisions" fix. This is about creating a duplicate of collision object (geometry) and toggling option "Deformable" in Properties->mesh->vertices->format on/off. you need one object with this option off and another with this option on. Then group these copies together and convert this group to COL compound. The fix is very important for models you can "walk into" (like boats, planes etc). but sometimes can be used for vehicles too.
User avatar
nnano
Posts: 18
Joined: Sat Jan 02, 2021 1:00 am

Re: Report Import/Export bugs here

Post by nnano »

Damn thanks! I found out how to fix it. Feel a little dumb that didn’t think of that erlier. That’s like 10 sec fix lol. Thanks again!
nukapop92
Posts: 1
Joined: Mon Nov 01, 2021 11:11 pm

Re: Report Import/Export bugs here

Post by nukapop92 »

I think this is the key for finding out what causes crashes with the excessive use of other materials.
get-vidmateapp.com
get-mobdroapk.com
Last edited by nukapop92 on Tue Dec 21, 2021 12:15 am, edited 1 time in total.
User avatar
nnano
Posts: 18
Joined: Sat Jan 02, 2021 1:00 am

Re: Report Import/Export bugs here

Post by nnano »

Hello, once again im here with a problem, so I just imported a car and exported it. In zmodeler the back bumper it's like fliped (Photo attached) and of course in game you can see through it. i tried flipping it, but it's like in chrome color (Photo attached) What could be the problem?
Attachments
Снимок.JPG
Снимок2.JPG
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

Use Modify\Flip on an object.
User avatar
nnano
Posts: 18
Joined: Sat Jan 02, 2021 1:00 am

Re: Report Import/Export bugs here

Post by nnano »

Oleg wrote: Wed Nov 24, 2021 7:48 am Use Modify\Flip on an object.
Already did, results are it's in chrome color (First photo with last message) (assigned materials are correct)
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

it's hard to say something other than you should test all the possible variations.
shading could be affected by
1. object local axes (reset orientation to world-space)
2. surface direction (modify\flip on object or on polygons)
3. surface normals (modify\flip on vertices to change direction, surfacce\normals\calculate to recalculate them)
4. surface tangents (calculated by "surface\normals\calculate" tool and require correct UV mapping on UV channel #1). A lack of UV#1 can cause incorrect surface tangents -> incorrect bumpmapping calculation by shader -> incorrect shading of surface
5. surface material assignment.

So, first, reset local axes orientation to world-space.
Second, select left-side of polygons explicitly and assign the same material as on bodyshell. even if you see the same material assigned, you might have a mess of various materials, so assigning the explicit one is a good step to do. you can rename it to "body material" or something like that so you 100% know that the same material is used.
Then try Surface\Normals\Calculate tool on an object.
Then try modify\flip on some of polygons (left side for example) and check how this will look in game.
User avatar
nnano
Posts: 18
Joined: Sat Jan 02, 2021 1:00 am

Re: Report Import/Export bugs here

Post by nnano »

Oleg wrote: Wed Nov 24, 2021 9:14 am it's hard to say something other than you should test all the possible variations.
shading could be affected by
1. object local axes (reset orientation to world-space)
2. surface direction (modify\flip on object or on polygons)
3. surface normals (modify\flip on vertices to change direction, surfacce\normals\calculate to recalculate them)
4. surface tangents (calculated by "surface\normals\calculate" tool and require correct UV mapping on UV channel #1). A lack of UV#1 can cause incorrect surface tangents -> incorrect bumpmapping calculation by shader -> incorrect shading of surface
5. surface material assignment.

So, first, reset local axes orientation to world-space.
Second, select left-side of polygons explicitly and assign the same material as on bodyshell. even if you see the same material assigned, you might have a mess of various materials, so assigning the explicit one is a good step to do. you can rename it to "body material" or something like that so you 100% know that the same material is used.
Then try Surface\Normals\Calculate tool on an object.
Then try modify\flip on some of polygons (left side for example) and check how this will look in game.
Hey, it did help, but another problem occured, when i shoot the Bumper it rotates 180 degrees, i even redid the collision from zero and... It's the same (Photo Left is a car when i shooted the bumper, right car is before shooting it)
Attachments
bmw.JPG
User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Report Import/Export bugs here

Post by Oleg »

it feels like you've messed object axes somewhere... it's not a must to be a bumper's axes messed, it could be collision object axes messed, or parent object (chassis) axes messed.

Axes orientation (direction of axes) on most of objects have to match world-space (the tripod in bottom-left corner). so resetting axes to world on most of objects is a good idea. Yet some objects require axes to be rotated, especially objects that do rotate in game too..
Dromsis
Posts: 10
Joined: Thu Nov 11, 2021 7:18 am

Re: Report Import/Export bugs here

Post by Dromsis »

Not a bug but a simple question

Why zmodeler triangulate face when exporting .yft, there is a way to disable this feature ? does it necessary for gta or .yft file ?
Post Reply