Ped object(s) shakes in-game (ped component)

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

Ped object(s) shakes in-game (ped component)

Postby metroidguy » Sat Jul 16, 2016 9:56 am

When I export model with embedded textures and upon putting it in openiv it does not detect the texture file (p_head_diff_011_a.ytd) which is the texture dictionary containing the diffuse map (the bump and spec map were exported embedded to the model for memory optimization). In-game it does not display the diffuse map, it displays the original textures on top of the helmet for some odd reason (R* probably updated the texture for p_head_011 on to another location) but the bump and spec map do display (which are embedded on the model).

Additionally the helmet shakes back in forth and I have no idea why
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Sat Jul 16, 2016 10:56 am

it depends on how it "shakes back in forth". it the shaking is very low and increases when you ride a bike, the problem could be probably related to per-vertex specular color. See the post in a link:
viewtopic.php?f=31&t=8755&start=100#p48350
(specular color affects shaking on ped_* shaders, so this problem might not appear when you use other shaders on ped components)

if the shaking amplitude is higher and does not seem to be "random", the problem could be in mismatching skeleton or object axes.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 16, 2016 11:26 am

Oleg wrote:it depends on how it "shakes back in forth". it the shaking is very low and increases when you ride a bike, the problem could be probably related to per-vertex specular color. See the post in a link:
viewtopic.php?f=31&t=8755&start=100#p48350
(specular color affects shaking on ped_* shaders, so this problem might not appear when you use other shaders on ped components)

if the shaking amplitude is higher and does not seem to be "random", the problem could be in mismatching skeleton or object axes.

I moves moderately back and forth, the helmet has no skeleton as far as I'm concerned and I copied the node axis to the object axis to match them. This did not happen last time I exported Trevors original stalhelm to replace the mp helmet model. Also the texture problem has nothing to do with R* changing the texture location as I replaced another of Trevors item with a backpack and the model does not want to read the texture dictionary (OpenIV does display any texture and the "Using textures" section is empty. Also in-game the only texture that appears on this accessory is the bumpmap texture but not the effect itself but the bumpmap like diffuse (I did not mistake the diffuse, spec and bump in material editor) Also in the helmet the only texture appearing as diffuse but not effect itself is spec map
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 16, 2016 2:03 pm

I don't understand what's wrong with them. I've replaced accs_007_u.ydd (some police holster with radio to the shoulder) and the helmet.
police holster (trevor): x64v/models/cdimages/streamedpeds_players.rpfplayer_two
helmet(stalhelm trevor): x64v/models/cdimages/streamedpedprops.rpf/player_two_p

Upon export I get this result:


I don't understand what I'm doing wrong. Mind helping with some suggestions? I'm very new to this aspect of zmodeler3
Also is there anyway of making the backpack not sway from the hip? I want to make it move only when the player moves his back left and right when running (how it should be)
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Sat Jul 16, 2016 9:23 pm

this shaking looks certainly like wind simulation effect.

Ped meshes require "specular" per-vertex color to be available too. you should paint it to black color using scheme:
- Switch object to verts level; select all;
- Surface\Paint\Swap colors [click on any vertex]
- Surface\Paint\Color -> fill selected [with black color set on]
- Surface\Paint\Swap colors [click on any vertex again],

Specular (secondary) per-vertex color components has some in-game meaning for dynamic object properties, like response to wind and some other tasks. this is not a color natively. I guess it might have something to do with the wrong aqua color you see on your screenshots.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Mon Jul 18, 2016 9:24 am

..and again: enable "Specular color" in properties->mesh->vertices->format; paint specular color to black: switch to vertices level, select all; use paint\swap colors; use paint\color [black, fill selected]; use paint\swap colors again.

this is a wind-response effect. the game uses it to shape ped cloth when he/she rides a bike or when heavy wind is blowing.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Fri Jul 22, 2016 10:27 am

Oleg wrote:more precise, pink = influence of bone #0 which is the very first bone of skeleton (or the skeleton itself). when ped moves, skeleton base and it's first bone has some animation too. use smooth tool from "red zone to pink zone" to spread correct influence into the area of pink vertices; just like painting with short click&move, click&move... once you get low pink, use Rigging\Normalize tool.

Alright I'll try that and report back to you. Also I ended up uv mapping the helmet straps with the helmet I wanted to replace so I can fit both the helmet textures and the original gta v helmet textures... Am I gonna have to uv map models I want to replace everytime they have more than 3 textures?
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Fri Jul 22, 2016 10:37 am

I doubt this is related to amount of textures on material. I think you should replace texture inside .ytd pack(s) with your own. it could be essential to match texture name too. I suppose the problem you face is that you have several materials in your model and game forces the same diffuse texture on all of them, correct?
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Fri Jul 22, 2016 11:14 am

Oleg wrote:I doubt this is related to amount of textures on material. I think you should replace texture inside .ytd pack(s) with your own. it could be essential to match texture name too. I suppose the problem you face is that you have several materials in your model and game forces the same diffuse texture on all of them, correct?

Yes, that is exactly my problem
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Fri Jul 22, 2016 11:29 am

Oleg wrote:more precise, pink = influence of bone #0 which is the very first bone of skeleton (or the skeleton itself). when ped moves, skeleton base and it's first bone has some animation too. use smooth tool from "red zone to pink zone" to spread correct influence into the area of pink vertices; just like painting with short click&move, click&move... once you get low pink, use Rigging\Normalize tool.

Just tried this but when I apply the smoothing to the pink area nothing happens?
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Fri Jul 22, 2016 12:05 pm

1. load original skeleton (.yft file); rename to ".global"
2. load original upper model for this ped/player;
3. copy weights from upper to your backpack model. it will get correct smooth bones weighting for straps and everything else. but this is not what you actually need;
4. hide/delete upper model (not needed anymore), bind your backpack model and original skeleton.
5. switch "current bones" on skeleton one after another to locate the one with highest influence for the lowest cylinder on backpack (will give more red/orange color on it).
6. on vertices level paint this bone's influence onto lower cylinder fully (in left view or in perspective view with "Solid" turned off in viewport). entire lower cylinder will turn red;
7. repeat 5-6 for other backpack items to paint ONE bone on each of them, so they don't bend like rubber parts and stay rigid.

make sure not to paint affection onto straps (you can select/hide these vertices), so original (copied from "upper" model) accurate weighting of multiple bones will retain on them for smooth stretch/bend animations.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Fri Jul 22, 2016 1:05 pm

Oleg wrote:1. load original skeleton (.yft file); rename to ".global"
2. load original upper model for this ped/player;
3. copy weights from upper to your backpack model. it will get correct smooth bones weighting for straps and everything else. but this is not what you actually need;
4. hide/delete upper model (not needed anymore), bind your backpack model and original skeleton.
5. switch "current bones" on skeleton one after another to locate the one with highest influence for the lowest cylinder on backpack (will give more red/orange color on it).
6. on vertices level paint this bone's influence onto lower cylinder fully (in left view or in perspective view with "Solid" turned off in viewport). entire lower cylinder will turn red;
7. repeat 5-6 for other backpack items to paint ONE bone on each of them, so they don't bend like rubber parts and stay rigid.

make sure not to paint affection onto straps (you can select/hide these vertices), so original (copied from "upper" model) accurate weighting of multiple bones will retain on them for smooth stretch/bend animations.

Copied upper_000 weights to my backpack model, after that deleted upper_000 then binded the skeleton to my backpack, after switching through 268 bones I haven't found even a single shade of color. My backpack remains grey (In materials editor I ticked off ignore vertex colors and disabled textures in world view) what am I doing wrong? (I also configured the vertices with rigging, max rig bones 4, etc, etc)
Also the upper doesn't come with an orange color either. The only orange color I've seen has been on the police belt I'm going to replace (accs_007.ydd)
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Fri Jul 22, 2016 6:36 pm

Oleg wrote:1. load original skeleton (.yft file); rename to ".global"
2. load original upper model for this ped/player;
3. copy weights from upper to your backpack model. it will get correct smooth bones weighting for straps and everything else. but this is not what you actually need;
4. hide/delete upper model (not needed anymore), bind your backpack model and original skeleton.
5. switch "current bones" on skeleton one after another to locate the one with highest influence for the lowest cylinder on backpack (will give more red/orange color on it).
6. on vertices level paint this bone's influence onto lower cylinder fully (in left view or in perspective view with "Solid" turned off in viewport). entire lower cylinder will turn red;
7. repeat 5-6 for other backpack items to paint ONE bone on each of them, so they don't bend like rubber parts and stay rigid.

make sure not to paint affection onto straps (you can select/hide these vertices), so original (copied from "upper" model) accurate weighting of multiple bones will retain on them for smooth stretch/bend animations.

Ok I actually got it to work. Looked through the bones and found a couple, got them to vertices and painted influence red. After doing some painting for 4 or 5 separate bones I export and I get this?:
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Fri Jul 22, 2016 10:59 pm

wrong bones painted. I've suggested to copy weights from original "upper"/torso model. the model that is set up properly on a skeleton. it will send initial "best matching" bones onto your accessory model using the properly-weighted "upper"/torso model. and your task was to locate those bones (by locating the most influencing bone : red/orange colors) and spreading this bone to full strength on each component of accessory (excluding straps).

make sure to have original skeleton loaded from .yft file first.

1. import .yft;
2. rename player_two to .global
3. import uppr_000_u.ydd (or something like that)
4. load your model into the same scene too;
5. copy weighs from upper;
6. make an export and test to ensure everything is correct. accessory model should perfectly align to player body and move smoothly while walking/running. some bending/stretching is allowed and OK for current step;
6. check bones influence and paint them manually to full red for those that have almost full affect after copying; you will get rid of "bending and stretching" in this step.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 23, 2016 9:25 am

Oleg wrote:wrong bones painted. I've suggested to copy weights from original "upper"/torso model. the model that is set up properly on a skeleton. it will send initial "best matching" bones onto your accessory model using the properly-weighted "upper"/torso model. and your task was to locate those bones (by locating the most influencing bone : red/orange colors) and spreading this bone to full strength on each component of accessory (excluding straps).

make sure to have original skeleton loaded from .yft file first.

1. import .yft;
2. rename player_two to .global
3. import uppr_000_u.ydd (or something like that)
4. load your model into the same scene too;
5. copy weighs from upper;
6. make an export and test to ensure everything is correct. accessory model should perfectly align to player body and move smoothly while walking/running. some bending/stretching is allowed and OK for current step;
6. check bones influence and paint them manually to full red for those that have almost full affect after copying; you will get rid of "bending and stretching" in this step.

Well I tried it again and still no luck, they keep moving and stretching abruptly

Still continued regardless of weird stretching and proceeded to paint influences, well no more stretching (solid) but they still move awkwardly. Any ideas?
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Sat Jul 23, 2016 11:55 am

things generally looks fine to my observation.
I can suggest to
1. do not rename .global to "accs_****", instead create a dummy for your accs_** model and put .mesh in it. It is ok to export model when it has no .skel inside;
2. make sure to bind your .mesh with .global's .skel entry. This is essential, as attaching object(s) might make object to be unbind from skeleton.

if still goes wrong in game:
1. rename .global to player_two and export as player_two.yft in "Skeleton only" LODs mode.
2. put generated .yft file into a mod in correct location.

It could be possible for all other parts to start behaving wrong, but your accs model to behave properly. This is a test scenario, just looking for the cause of the problem.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 23, 2016 2:27 pm

Oleg wrote:things generally looks fine to my observation.
I can suggest to
1. do not rename .global to "accs_****", instead create a dummy for your accs_** model and put .mesh in it. It is ok to export model when it has no .skel inside;
2. make sure to bind your .mesh with .global's .skel entry. This is essential, as attaching object(s) might make object to be unbind from skeleton.

if still goes wrong in game:
1. rename .global to player_two and export as player_two.yft in "Skeleton only" LODs mode.
2. put generated .yft file into a mod in correct location.

It could be possible for all other parts to start behaving wrong, but your accs model to behave properly. This is a test scenario, just looking for the cause of the problem.
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 23, 2016 2:27 pm

Oleg wrote:things generally looks fine to my observation.
I can suggest to
1. do not rename .global to "accs_****", instead create a dummy for your accs_** model and put .mesh in it. It is ok to export model when it has no .skel inside;
2. make sure to bind your .mesh with .global's .skel entry. This is essential, as attaching object(s) might make object to be unbind from skeleton.
if still goes wrong in game:
1. rename .global to player_two and export as player_two.yft in "Skeleton only" LODs mode.
2. put generated .yft file into a mod in correct location.

Success! Step 1 worked perfectly. BUT the gas mask can is moving with the pelvis instead of the torso, the bag and shovel are moving with pelvis but that was the intention, also the bag above the gas mask can is moving up and down, I assume this happens because I put some influence on the straps above the bag right? I shall only influence the bag? Correct? So anyways what can I do to make the gas mask can move with the torso instead of pelvis? Also thanks for the help.
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sat Jul 23, 2016 3:04 pm

metroidguy wrote:
Oleg wrote:things generally looks fine to my observation.
I can suggest to
1. do not rename .global to "accs_****", instead create a dummy for your accs_** model and put .mesh in it. It is ok to export model when it has no .skel inside;
2. make sure to bind your .mesh with .global's .skel entry. This is essential, as attaching object(s) might make object to be unbind from skeleton.
if still goes wrong in game:
1. rename .global to player_two and export as player_two.yft in "Skeleton only" LODs mode.
2. put generated .yft file into a mod in correct location.

Success! Step 1 worked perfectly. BUT the gas mask can is moving with the pelvis instead of the torso, the bag and shovel are moving with pelvis but that was the intention, also the bag above the gas mask can is moving up and down, I assume this happens because I put some influence on the straps above the bag right? I shall only influence the bag? Correct? So anyways what can I do to make the gas mask can move with the torso instead of pelvis? Also thanks for the help.

Disregard the above, played with the bones and got a good result overall. So my last problem was the textures, remember? How can I assign more than 3 textures on a single mesh? When I embed them to the model in openiv they seem fine but in-game it is assigned the original shaders diffuse texture. So the game doesn't read more than 1 shader apparently? I got the helmet to work because I desperately uv mapped both the original helmet straps and the new helmet I was replacing in 3ds max, then re-imported to zmod 3 and worked in-game with the textures re-named to the originals.
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Sat Jul 23, 2016 9:36 pm

the game reads all shaders but forces diffuse texture to be changed to one specific. It is possible that each component of YDD should use only one material, as I remember, most of ped models I've loaded seems to be assigned onto just one material.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sun Jul 24, 2016 9:14 am

Oleg wrote:the game reads all shaders but forces diffuse texture to be changed to one specific. It is possible that each component of YDD should use only one material, as I remember, most of ped models I've loaded seems to be assigned onto just one material.

Ok then, I guess if my model requires 2 shaders to be fully textured I must uv map them to make both those textures (diffuse) fit in one shader, correct?
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am

Re: Helmet shakes in-game (ped component)

Postby Oleg » Sun Jul 24, 2016 11:22 am

I guess, yes, it should be done this way.
User avatar
Oleg
Site Admin
 
Posts: 7151
Joined: Fri Feb 06, 2004 3:54 am

Re: Helmet shakes in-game (ped component)

Postby metroidguy » Sun Jul 24, 2016 1:19 pm

metroidguy wrote:
Oleg wrote:I guess, yes, it should be done this way.

Damn that sucks, by the way now I'm replacing an upper model with a german uniform and I applied the original upper models shader onto mine and when I move it around it progressively turns black? It is definitely related to the displacement maps it comes with but since my model doesn't use displacement maps what can I do? I tried putting two empty normal map textures (128. 255. 255) color and it turns even darker? Take a look (I haven't applied the empty normal maps here):

Nevermind, I copied axis nodes from .global bone to mesh and now it's okay
User avatar
metroidguy
Beginner
 
Posts: 120
Joined: Fri Sep 25, 2015 7:02 am


Return to Grand Theft Auto V

Who is online

Users browsing this forum: carloxfranco and 3 guests