GTA V character (Player, NPC) modding

GTA:V Modding with ZModeler3 discussion.
eeldad_ob
Posts: 15
Joined: Mon Jan 31, 2022 6:31 am

Re: GTA V character (Player, NPC) modding

Post by eeldad_ob »

hey how i import high poly obj cuz its slice it to 4 or more patrs
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

avoid using high poly models, they are not that good for the game.
ZModeler does not allow one geometry object to have more than 64K vertices. It allows to group several objects into one if you need to bypass this limitation.

You can optimize model before you import it into ZModeler.

Also, you can slice model to components (like "upper torso", "lower torso", "hands+head"), so one component fits within 64K vertices limit.
eeldad_ob
Posts: 15
Joined: Mon Jan 31, 2022 6:31 am

Re: GTA V character (Player, NPC) modding

Post by eeldad_ob »

wehn iimport 18 k its still split
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

post a set of screenshots for better explanation. I afraid we are talking about different things.
eeldad_ob
Posts: 15
Joined: Mon Jan 31, 2022 6:31 am

Re: GTA V character (Player, NPC) modding

Post by eeldad_ob »

hi oleg how im splitting a ped ? like evry part as his wone ydd and ytd
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

not getting your question perfectly..
You can split geometry object to multiple objects by selecting polygons and using Modify\Submesh\Detach tool. Mind to toggle off "Drag" option there, as you could a detached set of polygons unintendedly.
User avatar
Mentossini
Posts: 26
Joined: Mon Jan 13, 2020 1:34 pm

Re: GTA V character (Player, NPC) modding

Post by Mentossini »

Привет. Спустя 2 недели мучений осознал, что "красить" вес костей вручную мне удаётся с большим трудом. Собственно ситуация: Пытаюсь сконвертировать педа из гта4 в гта5, гайдов к сожалению не нашёл. С помощью GIMS для 3dsmax у меня получилось экспортировать скелет и модель в формате .FBX для Zmodeler3. Но вот дальше я не могу придумать, как максимально грамотно это всё заставить работать с гта5.
Пробовал несколько раз просто копировать веса костей со стандартных моделей гта5, растягивая их геометрию под нужную модель из гта4, но получается ужасно. Так же пытался менять названия костей гта4 с CHAR на SKEL, но некоторые кости не совпадают.
Исходя из всеговышеперечисленного у меня появились 2 вопроса.
Первый - существует ли какой-либо гайд по конвертации педов из гта4 в гта5 (если не учитывать стандартные гайды по конвертации любой модели)?
Второй - можно ли как-либо скопировать вес одной кости с одного скелета на другую кость другого скелета?. Если это возможно, то как это сделать? Буду премного благодарен, а так же спасибо за функционал работы с анимациями - очень помогает в работе с педами.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

скорее всего надо задачу ставить так - получить модель педа со скелеом из GTA4 в ZModeler3. Если эта задача будет решена (например, через FBX), то сконвертировать это в GTA5 станет возможным.

Копирование развесовки костей скорее всего не лучший способ, ведь изначально модель в GTA4 уже имеет хорошую развесовку по костям.

Если удастся загрузить модель в ZModeler3 вместе со скелетом, то можно применить трюк с переназначеним скелета на модель - при таком действии, влияние костей старого скелета проецируется на влияние костей нового скелета (совпадение по именам костей). Так что (я думаю в GTA4 в скелете меньше костей) достаточно будет переименовать кости старого скелета (GTA4) в кости нового скелета (GTA5) и выполнить переназначение скелета.

Переназначение скелета "с переносом костей" делается инструментом Rigging\Skeleton\Bind, только перед ним не надо отвязывать старый скелет через Unbind.

По импорту модели со скелетом через FBX тоже могут быть сложности. в приватных сообщениях сейчас мне пишут что есть сложности через Blender -> FBX.
User avatar
Mentossini
Posts: 26
Joined: Mon Jan 13, 2020 1:34 pm

Re: GTA V character (Player, NPC) modding

Post by Mentossini »

Oleg wrote: Sat Jul 16, 2022 1:20 pm скорее всего надо задачу ставить так - получить модель педа со скелеом из GTA4 в ZModeler3. Если эта задача будет решена (например, через FBX), то сконвертировать это в GTA5 станет возможным.

Копирование развесовки костей скорее всего не лучший способ, ведь изначально модель в GTA4 уже имеет хорошую развесовку по костям.

Если удастся загрузить модель в ZModeler3 вместе со скелетом, то можно применить трюк с переназначеним скелета на модель - при таком действии, влияние костей старого скелета проецируется на влияние костей нового скелета (совпадение по именам костей). Так что (я думаю в GTA4 в скелете меньше костей) достаточно будет переименовать кости старого скелета (GTA4) в кости нового скелета (GTA5) и выполнить переназначение скелета.

Переназначение скелета "с переносом костей" делается инструментом Rigging\Skeleton\Bind, только перед ним не надо отвязывать старый скелет через Unbind.

По импорту модели со скелетом через FBX тоже могут быть сложности. в приватных сообщениях сейчас мне пишут что есть сложности через Blender -> FBX.
Да, я так и пробовал сделать. Упёрся в проблему с тем, что при конвертации из 3dsmax через FBX в Zmodeler3 почему-то угол костей меняется. Но даже если учесть тот факт, что я могу вручную методом тыка поменять все углы костей - есть ещё более существенная проблема. Около половины костей из GTA4 имеют лишь различие в названии, относительно GTA5. Названия этих костей так же не является проблемой заменить, НО - к сожалению, многие кости в любом случае теряются. В GTA4 их меньше.
Так вот, меш у меня практически везде корректно деформируется при движении костей. Кроме рук. Руки самое больное место, но кости в них практически все совпадают со скелетом GTA5. Поэтому да, было бы отлично просто скопировать вес конкретной кости из меша со скелетом GTA4 на уже имеющийся меш GTA5, чтобы уже имеющийся вес других костей не терялся. Если конечно была бы такая возможность, было бы отлично.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

Я бы "отрезал руки")))). если проблема только с руками, то можно подогнать оригиниальную модель рук, а в импортированной модели отделить геометрию рук и только для нее скопировать развесовку. может, таким путём что-то удастся сделать..
lld123
Posts: 17
Joined: Tue May 30, 2017 6:20 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by lld123 »

Hi Oleg ! Is there any way to edit the skeleton to work as the Spider animation like in the video below. I searched on google and youtube but didn't see any video talking about this. Hope you can help me ! Thank you so much !
https://www.youtube.com/watch?v=pTi_Pgq95pE
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

Unfortunately, I don't know much on how the game deals with model skeleton and assigned animations in game. The most recent addition to edit YCD files allow you to create completely new animations, but it's a pretty tricky and a long task. Also, I had no chance to test ZModeler-generated YCD animation files for peds as there is too much similar animations for ped model and I don't know which of animations/files the game actually plays in certain conditions. I've tested only vehicle animations (roof) as these are easy to match (vehicle -> vehicle animation YCD file).
Sefiro
Posts: 8
Joined: Thu Nov 03, 2022 1:39 pm

Re: GTA V character (Player, NPC) modding

Post by Sefiro »

Hi guys, first let me thank you for all the info and explanations that are inside this forum
started to use zmodeler few days ago, with a lot of effort managed to get a piece of clothe, ( a shirt) ported inside gta5 (fivem)
atm used a single material, just picked ped, and ped inside the gta5 material library box
My question is, if i would make a part of that shirt trasparent, i have to create a second material and use ped alpha as shader?
if yes could i ask how to assign a second material just to few polygons of my mesh?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

mind the ped component (e.g. upper torso) can use just one texture. This allows the game to swap textures and make variations of outfit. If some torso component should use different texture, it should be done as accessory (accs_001_u component or something like that).

If using one texture is not the constrain to you, then this texture is allowed to be used on different materials, no problem here.

To assign a material onto polygons, you should select these polygons first. Then either use Properties window above hierarchy window (Mesh->Polygons->Material...), or open Materials browser, pick desired material, then drag&drop it onto left area of materials browser where it says "Scene selection".
Sefiro
Posts: 8
Joined: Thu Nov 03, 2022 1:39 pm

Re: GTA V character (Player, NPC) modding

Post by Sefiro »

The accessory thing is very interesting, i guess that going for that, the accessory will not override my torso texture i guess
hat1324
Posts: 37
Joined: Thu Nov 24, 2016 2:45 am

Re: GTA V character (Player, NPC) modding

Post by hat1324 »

Hey, maybe someone here can help me out (probably Oleg). I noticed that when modifying and exporting ped skeletons at all (like for shrinking them or moving bones) the in game character will ragdoll funny. What I notice specifically is that when a character's corpse enters ragdoll, the skeleton's upper body shrinks a little bit, and when it exits the ragdoll, the skeleton grows back to normal. This causes the body to shift suddenly once it stops moving.

Any way around this issue?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

I afraid this is in-game specific issue. I doubt this is something to fix in a model file.
hat1324
Posts: 37
Joined: Thu Nov 24, 2016 2:45 am

Re: GTA V character (Player, NPC) modding

Post by hat1324 »

Yeah... Also when the character smokes cigarettes you can tell that the hands and face are not perfectly aligned. I don't think the game likes changing the shape of yfts, but I wonder how the game itself deals with skeletons of various sizes
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

the main issue is the animation - it is recorded for original skeleton setup. ped animations mostly rely on rotation-only tracks, as human bones are not moving/stretching, they are generally rotation joints. However, when you alter skeleton size or scales with only, animation playback can become unmatching and inaccurate (the case of hands / face "smoking" animation not matching perfectly), as rotations recorded on animation files don't count the changes you've made to the skeleton. For example, for the hand to reach the lips properly in "smoking" animation that is being played on an alternated skeleton (that you made wider in shoulders for example), you need to change the angles of rotation on forearm and elbows too.

yet some walking and running animations might look OK, but they have some mismatching angles there too that are barely seen.
hat1324
Posts: 37
Joined: Thu Nov 24, 2016 2:45 am

Re: GTA V character (Player, NPC) modding

Post by hat1324 »

Interesting, so Im guessing if I edit the a-pose to precisely match an existing skeleton, I could feasibly solve this issue just by swapping animation sets?

On that note, would it be possible to add a feature to ZM3 called "Clone Setup Pose" or something? Basically, from one skel to another, traverse the source skel tree and try to match nodes by label to target skel tree. If match, transform source node to target
Last edited by hat1324 on Sun Nov 20, 2022 2:09 pm, edited 1 time in total.
hat1324
Posts: 37
Joined: Thu Nov 24, 2016 2:45 am

Re: GTA V character (Player, NPC) modding

Post by hat1324 »

Just confirming that manually matching node positions (not rotations) to an existing skeleton indeed fixes this issue
Sefiro
Posts: 8
Joined: Thu Nov 03, 2022 1:39 pm

Re: GTA V character (Player, NPC) modding

Post by Sefiro »

Hello guys, could i ask if you have managed to resize an animal ped? tested the method with the vanilla husky, skeleton and ydd are fine, but once in game i can't move the ped
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

animal .yft files are not editable with ZModeler. They have a different skeleton structure with build-in collisions on bones.
Sefiro
Posts: 8
Joined: Thu Nov 03, 2022 1:39 pm

Re: GTA V character (Player, NPC) modding

Post by Sefiro »

thanks, so i guess there isn't hope to find another way
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: GTA V character (Player, NPC) modding

Post by Oleg »

i afraid not with ZModeler. may be a mix of tools like codewalker (xml), 3dsmax or blender. absolutely not sure what can be done to accomplish this task.
Post Reply