Page 2 of 45

Re: Ped models

Posted: Sun May 22, 2016 6:10 am
by jeffrey9090
I made a new badge but the game crashes on me.

Re: Ped models

Posted: Sun May 22, 2016 9:22 am
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.

Re: Ped models

Posted: Sun May 22, 2016 12:36 pm
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.

Re: Ped models

Posted: Sun May 22, 2016 12:44 pm
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).

Re: Ped models

Posted: Sun May 22, 2016 12:50 pm
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.

Re: Ped models

Posted: Sun May 22, 2016 5:40 pm
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.

Re: Ped models

Posted: Sun May 22, 2016 7:17 pm
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?

Re: Ped models

Posted: Mon May 23, 2016 4:02 am
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).

Re: Ped models

Posted: Mon May 23, 2016 4:58 am
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."

Re: Ped models

Posted: Mon May 23, 2016 5:19 am
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

Re: Ped models

Posted: Mon May 23, 2016 11:46 pm
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.

Re: Ped models

Posted: Tue May 24, 2016 3:42 pm
by Lundy
I am now having problems importing pedprops. Importing crashes Zmod.

Re: Ped models

Posted: Wed May 25, 2016 8:11 am
by Oleg
file/location ?

Re: Ped models

Posted: Wed May 25, 2016 12:15 pm
by Lundy
Disregard that. I forgot I had modified the model beforehand.

Re: Ped models

Posted: Wed May 25, 2016 12:19 pm
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).

Re: Ped models

Posted: Thu May 26, 2016 4:08 am
by Lundy
Ok, here are the broken import models.

Re: Ped models

Posted: Sun May 29, 2016 9:00 am
by tall70
Thanks for YDD support

Re: Ped models

Posted: Tue May 31, 2016 12:38 pm
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

Re: Ped models

Posted: Tue May 31, 2016 12:49 pm
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).

Re: Ped models

Posted: Tue May 31, 2016 1:04 pm
by jeffrey9090
Wait... so any .ytf file?

Re: Ped models

Posted: Tue May 31, 2016 1:22 pm
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.

Re: Ped models

Posted: Tue May 31, 2016 5:25 pm
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.

Re: Ped models

Posted: Tue May 31, 2016 10:09 pm
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.

Re: Ped models

Posted: Thu Jun 02, 2016 3:00 pm
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.

Re: Ped models

Posted: Thu Jun 02, 2016 11:45 pm
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.