GTA V character (Player, NPC) modding

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

Post Reply
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

GTA V character (Player, NPC) modding

Post 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)].
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Ped models

Post 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?
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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).
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post 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.
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

any example file (location in .rpf) that crashes zmod? and what import options do you use?
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post 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''
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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.
Attachments
cop_gta5_ydd.jpg
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post 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.
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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?
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post by Netman »

Ok i got it to work i only have one more question. How do one export a model after editing some mesh?
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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?
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post 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.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post 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?
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post 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
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post by Oleg »

:) will ship an update shortly. the skeleton got messed, I see the similar problem on my current exported files too.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post by Lundy »

Good to hear. I can't wait to whip up some improved LE officers. :D
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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.
User avatar
Lundy
Posts: 32
Joined: Tue Sep 15, 2015 4:22 pm
Location: Los Angeles, CA

Re: Ped models

Post 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
BufordT
Posts: 2
Joined: Sat May 21, 2016 9:05 pm

Re: Ped models

Post 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.
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post by Netman »

i get the exact same results as the two above me just described
User avatar
Oleg
Site Admin
Posts: 11139
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Ped models

Post 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" ?
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post 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.
BufordT
Posts: 2
Joined: Sat May 21, 2016 9:05 pm

Re: Ped models

Post 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.
User avatar
Netman
Posts: 19
Joined: Wed Jun 24, 2015 6:30 am

Re: Ped models

Post by Netman »

yeah just tested it aswell with same results.
Post Reply