A problem during export.

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

A problem during export.

Postby Yoha » Sat Apr 22, 2017 4:06 pm

Hi Oleg,

I have a problem about export yft.

Quick descripition of my problem.
To save your time, I write my problem in a short word:

I use purchased version of zm3 to export my ship, put it into game, game crashed.
After I tried many ways, I used a cracked version of zm3 to export. and it worked. my ship can be spawned in the game.
But, saddly, because I also use some materials that only been supported by purchased version of zm3, so this result is not so good.




Details of my problem
To find more details of my problem, you can read this part:

I'm working on a ship, with 760,000 vertices and 480,000 polygons.
Usually, gta5 can only recognize a model with less than 500,000 vertices.
But, this carrier mod contains 790,000 vertices and polygons: https://www.gta5-mods.com/vehicles/ocean-motion-add-on.
he also made another carrier contains 1,770,000 vertices and polygons.

I contacted the author of this carrier, elcreador. He explains to me some technique skills to make his mod.
These skills are:
1. Each material includes less than 50,000 vertices.
I created 105 material balls, made each material include less than 10,000 vertices.

some of these materials are only support by purchased version of ZM3.
So, I replaced these materials with normal materials, when I test my ship in cracked version of ZM3.


2. Detach models.
I seperated models into small pieces, each model include less than 10,000 polygons.


3. Only one chassis.part [col] checked "deformation" in vertice propert, rest collision files leave it empty. then group all collision files as chassis [col].
And user define of all collision files are:
E:1e-006, 1e-006, 1e-006, 1e-006
Mass: 1e-006


---
After I finished these setting, I export the ship.
Both version of zm3 are show none fails or wrong message in the message window.
Everything looks ok.

But the ship from purchased version of zm3 will make game crash.

As I said at the begining, because I need set lights dummy and other materials in purchased version of zm3.
So, although cracked version of zm3 can exports successful, but it's still not a good result.



-----
And Elecreador he use purchased version of zm3, and he can export ship successful. the materials he used are normal,
He told me that I can try export a yft with less polygon, then add model parts one by one to test limit.


-----
Last
Although I write these details, but actually, I still can not figure out what's going on.
User avatar
Yoha
 
Posts: 45
Joined: Fri Jun 05, 2015 4:57 pm
Location: China

Re: A problem during export.

Postby Oleg » Sat Apr 22, 2017 11:28 pm

Have you properly identified the cause of the crash? I mean, if you export with "old" materials (the same as in cracked version), will new export work in game? There were no significant changes in model/geometry export since cracked 3.1.2 version, only collision and materials import/export were updated, less changes on collision, more changes on materials. So, my first guess is "new materials" might be wrong. Also, keep in mind, that some material might require heavier vertices information (tangents + more uv channels, as a result, the entire vertices buffer might become bigger and could probably crash the game by hitting some internal limits). For example, old material uses lightweight vertices and can easily fit 50K verts withing limits, but newer material overweight vertices with extra data and goes beyond these limits on 50K vertices.

So, first thing I would try is to export with old materials.
Second, per-object part IDs might got messed in your new version: take a ZModeler3_profile.xml from old version and put it into your new version (backup original XML in new version, so you can revert changes). then make an export in new version with "old materials" and "old profile settings". I expect this export to be identical to the one the old version generates (and as a result, it should work in game).

The final thing I could think of is a messed collision. ensure you haven't discard collision objects on the model you replace. vehicle's meta might refer to a missing part or a missing collision. I would suggest to try an export with original COLs with absolutely no changes on them.


Edit: hmm, now I remind some changes in geometry export caused by peds/ydd specific problems that caused me to make changes in geometry export too... I can't remind what they were exactly, but I did changed things there certainly. I've skimmed geometry packing code and it seems to be ok to respect geometry chopping: using any amount of vertices/polygons on the same material is absolutely ok for the exporter, it still cuts mesh to small fragments within limits. You can send me a link to a download of .yft files - the new and the old one, so I could compare and see what is different beside geometry packing.
User avatar
Oleg
Site Admin
 
Posts: 7640
Joined: Fri Feb 06, 2004 3:54 am

Re: A problem during export.

Postby Yoha » Sun Apr 23, 2017 3:50 pm

Oleg wrote:Have you properly identified the cause of the crash? I mean, if you export with "old" materials (the same as in cracked version), will new export work in game? There were no significant changes in model/geometry export since cracked 3.1.2 version, only collision and materials import/export were updated, less changes on collision, more changes on materials. So, my first guess is "new materials" might be wrong. Also, keep in mind, that some material might require heavier vertices information (tangents + more uv channels, as a result, the entire vertices buffer might become bigger and could probably crash the game by hitting some internal limits). For example, old material uses lightweight vertices and can easily fit 50K verts withing limits, but newer material overweight vertices with extra data and goes beyond these limits on 50K vertices.

So, first thing I would try is to export with old materials.
Second, per-object part IDs might got messed in your new version: take a ZModeler3_profile.xml from old version and put it into your new version (backup original XML in new version, so you can revert changes). then make an export in new version with "old materials" and "old profile settings". I expect this export to be identical to the one the old version generates (and as a result, it should work in game).

The final thing I could think of is a messed collision. ensure you haven't discard collision objects on the model you replace. vehicle's meta might refer to a missing part or a missing collision. I would suggest to try an export with original COLs with absolutely no changes on them.


Edit: hmm, now I remind some changes in geometry export caused by peds/ydd specific problems that caused me to make changes in geometry export too... I can't remind what they were exactly, but I did changed things there certainly. I've skimmed geometry packing code and it seems to be ok to respect geometry chopping: using any amount of vertices/polygons on the same material is absolutely ok for the exporter, it still cuts mesh to small fragments within limits. You can send me a link to a download of .yft files - the new and the old one, so I could compare and see what is different beside geometry packing.


Thank you for your reply, Oleg. :)

I will read it carefully and test it.
User avatar
Yoha
 
Posts: 45
Joined: Fri Jun 05, 2015 4:57 pm
Location: China

Re: A problem during export.

Postby Yoha » Tue May 02, 2017 7:48 am

Oleg wrote:Have you properly identified the cause of the crash? I mean, if you export with "old" materials (the same as in cracked version), will new export work in game? There were no significant changes in model/geometry export since cracked 3.1.2 version, only collision and materials import/export were updated, less changes on collision, more changes on materials. So, my first guess is "new materials" might be wrong. Also, keep in mind, that some material might require heavier vertices information (tangents + more uv channels, as a result, the entire vertices buffer might become bigger and could probably crash the game by hitting some internal limits). For example, old material uses lightweight vertices and can easily fit 50K verts withing limits, but newer material overweight vertices with extra data and goes beyond these limits on 50K vertices.

So, first thing I would try is to export with old materials.
Second, per-object part IDs might got messed in your new version: take a ZModeler3_profile.xml from old version and put it into your new version (backup original XML in new version, so you can revert changes). then make an export in new version with "old materials" and "old profile settings". I expect this export to be identical to the one the old version generates (and as a result, it should work in game).

The final thing I could think of is a messed collision. ensure you haven't discard collision objects on the model you replace. vehicle's meta might refer to a missing part or a missing collision. I would suggest to try an export with original COLs with absolutely no changes on them.


Edit: hmm, now I remind some changes in geometry export caused by peds/ydd specific problems that caused me to make changes in geometry export too... I can't remind what they were exactly, but I did changed things there certainly. I've skimmed geometry packing code and it seems to be ok to respect geometry chopping: using any amount of vertices/polygons on the same material is absolutely ok for the exporter, it still cuts mesh to small fragments within limits. You can send me a link to a download of .yft files - the new and the old one, so I could compare and see what is different beside geometry packing.


Hi Oleg,

At the end, I gave up.
Tried set normal materials in cracked version, game still crashed.

Now, I use a trick way to spwan whole ship.
I seperated ship in two parts, and then make them as vehicle.
In game, I use Menyoo to spawn 1st one, then spawn 2nd one and attach it to 1st one.


Because, I really need use some materials that only been supported by purchased version of ZM3.
And I also need set lights, like spot lights and so on.


Anyway, the progress of my mod can move on right now.
This problem stucked me a lot of time, many days.
User avatar
Yoha
 
Posts: 45
Joined: Fri Jun 05, 2015 4:57 pm
Location: China


Return to Grand Theft Auto V

Who is online

Users browsing this forum: rdm0000 and 5 guests