GTA V character (Player, NPC) modding

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

I made a new badge but the game crashes on me.
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

get an update.
gta_cop_test.jpg
Trainer/Spawner does not work for me, but raising wanted level made cops to appear. There was a game crash on earlier version, export was refined, game runs fine now.

player character spikes is player model test; sphere above cop is NPC model test.
jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

Now I got this game bug with the ped. I changed S_m_y_swat or something like that. I changed the head model to the cop model and it bugged out.
Attachments
20160522173435_1.jpg
20160522173448_1.jpg
20160522173459_1.jpg
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

you can't "change head" model, as head model comes with skeleton in it. The skeleton can be different in models, but it the same within one .ydd file. When you change head model, you either change it with skeleton (head will be Ok for this skeleton, but the rest of models will not match skeleton assignment) or you change it without skeleton (all other components will be ok with old skeleton and new head will not match the old skeleton).

Parts replacement will need re-weighting in most of cases. once you load a .mesh object (or any other mesh object) for replacement/addon,
1. ensure it has Rigging and Max rig bones = 4 in mesh\vertices\format;
2. use Rigging\Influence\Copy tool to copy influence weight from original object onto replacement/addon object.

P.S. the said above applies to "change upper model", "change lower", "change accessory" or even "attach badge" model too - reweighting will be needed too.
P.P.S. On your image it looks like you've replaced head (and hands) mesh only and retained original skeleton (upper and lower parts are rigged properly).
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

...and a note on Rigging \ Influence \ Copy tool: it copies weight on each vertex of destination mesh by locating the nearest vertex on the source mesh. Thus, the object you copy weight onto should be moved/placed over the source (original, properly-weighted) object first.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Everything seems to be working wonderfully. Made some new LAPD Patrolmen.
http://puu.sh/p1MPx/7960b2f7ff.jpg

Only one problem, sometimes the meshes pop around. Like on my model, the patch on the black officer's arm would spike for a second. The uppr also seems to look a bit weird when you move. Like a bit of static going through the shirt. It's hard to explain.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Oh, also. I have edited belts for the police officers, the second belt with the gun in the holster works fine, but the first one without the gun, sways back and forth when the cop is moving. Any solution for that?
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

you can apply Rigging\Influence\Normalize onto meshes to prevent artifacts. Concerning the belt, you can pick a desired bone on skeleton (right-click, set as current) and use Rigging\influence\paint tool to paint influence of this bone onto vertices (hide unnecessary vertices to prevent incidental weight paint on other mesh).
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Can you be a little more in depth on the belt? What I'm getting is I select a bone that is on the skeleton http://puu.sh/p2i0L/1434596a2d.jpg the one in the middle of the belt, and then I enter vertex mode and paint the belt? It says ".mesh is not binded to a skeleton."
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

mark a skeleton (big round base object of skeleton) with Select\Mark tool ('M' is hotkey), then use Rigging\Bind Skeleton tool by clicking on a mesh object. It will bind mesh and skeleton.

https://www.youtube.com/watch?v=Gc6N6KPqgW8
fableman
Posts: 4
Joined: Sat Jan 09, 2016 1:15 am

Re: Ped models

Post by fableman »

Oleg wrote: I suspect NPC models import/export could work in first scenario (the one with ".global" ) too, but it will produce slightly bigger files on export.
Just tested it and yes it works as well.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

I am now having problems importing pedprops. Importing crashes Zmod.
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

file/location ?
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Disregard that. I forgot I had modified the model beforehand.
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

an app-crash is still a bad import scenario, I would like to have a file that causes app crash to fix the crash problem (with an importer, not a file).
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Ok, here are the broken import models.
Attachments
Files.zip
(89.29 KiB) Downloaded 194 times
User avatar
tall70
Amateur
Posts: 675
Joined: Tue Aug 11, 2015 3:13 pm

Re: Ped models

Post by tall70 »

Thanks for YDD support
jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

The odd thing is that I can not find the .ytf files for the multiplayer models. I can not find the .ytf file for accessories such as accs_002_u.ydd
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

as these models can't be used without skeleton, the associated skeleton should be available in the game. may be it is located in some different folder or in some common folder for all multiplayer models.. it's not a must for *.yft file to reside in the same folder as the .ydd file.

Also, in most of cases, skeleton is available in head_*** files. You can import a head model from the same folder and use skeleton from that import (rename imported node to .global in ZModeler, mark skeleton base with Select\Mark tool, bind accessory .mesh model to a skeleton with Rigging\Skeleton\Bind tool).
jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

Wait... so any .ytf file?
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

nope. the one that game actually use with .ydd file. I don't know the way game uses to bind multiplayer .ydd to a skeleton, as I haven't explored multiplayer ydd files. I suspect the file you are searching for should be located in original game rpf files, especially if you can find new addon dlc accessory .ydd (not a fix/replacement .ydd file) that comes with no .yft files. So, if a new addon .ydd model comes with no skeleton .yft, the game have to use some .yft file from original game files. not "any", the very specific one.

alternatively, explore a meta-data files coming with .ydd addons, it might have some valuable references.
jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

I have that. I found the .ytf file. Now I get 2 different sets of things in heredity. Do I just change the name of the .ytf file? .ytf is the full skelton while the .ydd is a part. I have no experience in ped models.
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

import .yft file. it will give you a ".skel" and ".mesh" object in some branch; rename this branch to ".global" and delete ".mesh" object. Then import your .ydd file for replacement; use mesh weighting (weight copy algorithm given in this topic), replace ".mesh" and export .ydd

"weight copy" is an automated assignment of skeleton bone(s) influence(s) onto mesh vertices. this means literally on each vertex "to move with this bone during animation" (when only one bone influence assigned) or "move like 40% of this bone and 60% of that bone" when two bone influences are assigned.

In case of rigid objects, only one bone influence is assigned in most of cases (you don't need rigid object to bend like rubber), so it is easy to assign such an influence.
jeffrey9090
Beginner
Posts: 137
Joined: Sat Oct 31, 2015 3:52 pm

Re: Ped models

Post by jeffrey9090 »

Now I got this. The belt seems to be working fine. On the other hand, the chest radio does seem to bug out.
Attachments
Capture.PNG
User avatar
Oleg
Site Admin
Posts: 11190
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

the influence assignment is probably incorrect. have you tried the "weight copy" tool? select vertices of bugged belt, pick weight copy tool and click on any of selected vertices; then use rigging\influence\normalize tool to ensure correct balance is assigned. for me it looks like the radio belt should have shoulder weight and breast bone weight to be assigned, while it has only shoulder bone weight assignment on it.
Post Reply