Page 1 of 19

GTA V character (Player, NPC) modding

PostPosted: Tue May 17, 2016 3:10 am
by Oleg
get an update.
The model should be loaded with "slice to parts" toggled off.
The scene should be exported with "Skeletal" toggled off.

=======================================
Blood settings for modified ped: discussed here [quick fix: create unwrapped UV#2 in square 1 right of texture and 2...9 above the texture depending on part type: left/right leg, torso, etc.)

Visible seams on mesh in game: discussed here [quick fix: paint vertices color to (255, 128, 0)]

Mesh shaking (wind effect simulation): discussed here [quick fix: paint secondary vertices color to (0,0,0)].

Ped models

PostPosted: Fri May 20, 2016 6:45 am
by Netman
I know full models are not supported at this time but what about say the police AI's duty belt? Is there any way if inporting assets from ped models at this time?

Re: Ped models

PostPosted: Fri May 20, 2016 10:03 am
by Oleg
what do you mean by "full models are not supported"? you can import and export Ped models including player, NPC and accessory models for them. Get Zmodeler 3.1.3 for that.

P.S. player model and NPC models are made of "components". Head, upper (torso), hands, lower, feet, head. You can import components you need and edit/replace them, then export them as components too. All together these components are "full model" I guess.

P.P.S. I've tested changes on player_one (Franklin) only using original materials/textures. Ped shaders are quite complex and have a set of displacement bump-map textures for cloth wrinkles simulation (that is why I used original materials for simplicity).

Re: Ped models

PostPosted: Fri May 20, 2016 10:19 am
by Netman
i just got the 3.1.3 update last night but as sooon as i try to inport any .ydd fine the NPC uses my Zmod crashes. So far i have only got it to work with the player files.

Re: Ped models

PostPosted: Fri May 20, 2016 10:34 am
by Oleg
any example file (location in .rpf) that crashes zmod? and what import options do you use?

Re: Ped models

PostPosted: Fri May 20, 2016 10:47 am
by Netman
well at this point i've tried all inport settings just for the hell of it. And the model i'm trying to inport is called ''S_M_Y_COP_01'' in the ''64e.rpf''

Re: Ped models

PostPosted: Fri May 20, 2016 11:30 am
by Oleg
have you tried to import .yft file and then the .ydd into the same scene?
Do you see "Loading materials" progress bar blinking for a moment or it crashes immediately after pressing Import button?
Have you tried to remove .ytd files (from preload packs and from the import folder) to prevent textures being loaded (may be some texture is bugged)?

The attached image is the .yft loaded and then .ydd loaded. The version from the website with updates installed was used.

Re: Ped models

PostPosted: Fri May 20, 2016 12:24 pm
by Netman
i see the ''Loading materials'' bar right before it crashes, and i have just tried to inport them at the same time aswell but with no luck. I also tried to remove the .ytd file but that didn't do anything.

Re: Ped models

PostPosted: Fri May 20, 2016 1:33 pm
by Oleg
may you try some other .ydd files like simple "minimap" files? just to find out whether this is .ydd loader failure or somewhat skeleton/materials related... and/or try some non-skeleton .ydd files like scenery objects?

Re: Ped models

PostPosted: Fri May 20, 2016 3:50 pm
by Netman
Ok i got it to work i only have one more question. How do one export a model after editing some mesh?

Re: Ped models

PostPosted: Fri May 20, 2016 10:48 pm
by Oleg
if you edited existing mesh, just export a .ydd file named the same way as the topmost dummy node; If you loaded custom mesh [for replacement] it have to be weighted properly. take a look at weighting video (this one is an example: https://www.youtube.com/watch?v=BGj0szxzeWM). The quickest weighting method is:
- properties->mesh->vertices->format: rigging + boens=4;
- rigging\influence\copy [from original to yours]
- modify\attach [to original]
- modify\delete [original if needed]

P.S. How have you got it to work? what was the problem?

Re: Ped models

PostPosted: Sat May 21, 2016 12:21 am
by Netman
the s_m_y_cop_01 i tried to inport was apparently already modified. So i just found a clean version.
now talking of exporting. I've tried to export it with ''skelal'' checked and that will crash as soon as it starts. I have also tired with it unchecked but that only game me this:

Missing shader configuration for adaptation "ped_default_cutout". Model can't be exported. file:RageExportMaterial.cpp line:141

i am sorry for the inconvenience.

Re: Ped models

PostPosted: Sat May 21, 2016 7:29 am
by Lundy
I'm having the same problems. I can import peds, edit them and what not, but exporting does not work. The program just crashes. I've tried this both with a modified model, and with exporting an unedited model. Is there a specific way we must export them? I have both the .ydd and .yft imported, do I need to delete one?

Re: Ped models

PostPosted: Sat May 21, 2016 8:18 am
by Oleg
ped components should be exported with "skeletal" toggled on. ped accessory (helmets etc.) can be exported with skeletal turned off.

save and attach here a .z3d file that causes appcrash on export, I'll check what is wrong.

the correct scenario would be:
1. import .yft file with "slice to parts" turned off; delete ".mesh" in scene;
2. import .ydd file with "combine models" turned on; it should add extra branches to existing hierarchy (like uppr_000_r, head_001_u and like this)
3. export with Skeletal turned on.

"ped_default_cutout" is currently unavailable, I'll add it shortly. you can rename adaptation to ped_default or ped_alpha.

Edit: crash on export confirmed on cop model. will inspect it shortly.

Re: Ped models

PostPosted: Sat May 21, 2016 9:50 am
by Lundy
Followed that exactly. I'm not sure this is how it's supposed to look...
http://puu.sh/p0aAU/ffcb54113b.jpg

http://puu.sh/p0bCl/f5d207827d.jpg

Re: Ped models

PostPosted: Sat May 21, 2016 10:04 am
by Oleg
:) will ship an update shortly. the skeleton got messed, I see the similar problem on my current exported files too.

Re: Ped models

PostPosted: Sat May 21, 2016 10:15 am
by Lundy
Good to hear. I can't wait to whip up some improved LE officers. :D

Re: Ped models

PostPosted: Sat May 21, 2016 2:13 pm
by Oleg
It was significantly harder than I expect it to be. I haven't checked NPC export at all earlier (now I tested import/export only, no in-game tests). Get an update.

The correct workflow should be as follows:
Player models:
1. import player_***.yft file (with "Slice to parts" off and "Combine models" on).
2. rename top hierarchy node to .global
3. Import desired player's .ydd file
4. edit
5. export into desired .ydd file (with "Skeletal" mode on)

NPC models
1. import associated .yft file ("Slice to parts" off, "combine models" on).
2. Delete ".mesh" object in hierarchy;
3. Import assocated .ydd file ("Slice to parts" off, "combine models" on).
4. edit
5. export into desired .ydd file (with "Skeletal" mode on)

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.

Technical background: Skeletal models with more than 128 bones should be imported/edited/exported with the first scenario (utilizing .global branch with .skel in it. This might be the proper scenario for NPC model if it uses that much bones in skeleton.

P.S. skeleton bones names have been refined slightly, so if you've got your .z3d scene saved with old import of NPC model, you should re-import correct skeleton with updated filter. Or, preferable, start over again with the updated filter to prevent hierarchy problems.

Re: Ped models

PostPosted: Sat May 21, 2016 8:43 pm
by Lundy
Ok, it's all working now.
http://puu.sh/p0K0L/7f6ed7edd8.jpg
http://puu.sh/p0K1s/3df7994c5e.jpg

There's just one problem. When I spawn my model in the trainer, the trainer crashes. Forcing the game to freeze until I click away the crash window. The game then continues to play, but my trainer crashes every time. It seems to not like the new model. I am using Simple Native Trainer.
https://www.gta5-mods.com/scripts/simpl ... r-for-gtav

Re: Ped models

PostPosted: Sat May 21, 2016 9:14 pm
by BufordT
Getting similar results to Lundy. Once I spawn the edited model, my trainer crashes, I have to close the trainer error window, then the game crashes within a few seconds but does give me time to move the character around.

Also, found that the game crashes if I get a wanted level when the model is spawned into the game world by the game itself.

Tests were done with s_m_y_sheriff_01 by importing/exporting using the instructions above but no mesh changes were made. Just a simple import of the stock game ped and export of said import.

Re: Ped models

PostPosted: Sat May 21, 2016 11:41 pm
by Netman
i get the exact same results as the two above me just described

Re: Ped models

PostPosted: Sun May 22, 2016 12:33 am
by Oleg
which spawn command should I use to spawn "s_m_y_cop_01.ydd" ? and how should I put a modded file in game to test (what rpf file to put into Mod folder and what should I replace there? - just to be sure I replace/test correctly and dont waste hours messing with incorrect replacement location).

P.S. Have anyone tried to export NPC models with method #1 - using ".global" branch for ".skel" ?

Re: Ped models

PostPosted: Sun May 22, 2016 12:45 am
by Netman
Oleg wrote:which spawn command should I use to spawn "s_m_y_cop_01.ydd" ? and how should I put a modded file in game to test (what rpf file to put into Mod folder and what should I replace there? - just to be sure I replace/test correctly and dont waste hours messing with incorrect replacement location).

P.S. Have anyone tried to export NPC models with method #1 - using ".global" branch for ".skel" ?


You can just get a wanted level in los santos to make the s_m_y_cop_01 spawn. But that will just crash the game
And i'll try to use the first method right now.

Re: Ped models

PostPosted: Sun May 22, 2016 12:48 am
by BufordT
I believe the location of s_m_y_cop_01 is now in update\x64\dlcpacks\patchday9ng\dlc.rpf\x64\models\cdimages\patchday9ng.rpf\. Use OpenIV to replace the files if you're not familiar (I'm sure you are).

To spawn the ped use Simple Native Trainer V (link is below). After the game loads press F3, navigate to "Model Spawning" by using the numpad controls (see trainer docs), select "Spawn By Model Name", type in desired model name "s_m_y_cop_01" without extensions.
https://www.gta5-mods.com/scripts/simpl ... r-for-gtav

You'll also need ScriptHook V for the trainer to work, which can be found here.
http://www.dev-c.com/gtav/scripthookv/

Or, as Netman said, just get a wanted level in the city.

And yes, I've tried using both methods. Seems to make the game crash either way.

Re: Ped models

PostPosted: Sun May 22, 2016 1:01 am
by Netman
yeah just tested it aswell with same results.