invisible lines on upper and lower model [Ped clothes]

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Fri Jul 29, 2016 9:00 am

I'll focus on the pants model since the fix should be the same for the upper model (jacket)
This is how the pants look in zmod, It's apparently a solid object, the black lines are the lines that get displayed as invisible in-game.
https://gyazo.com/2d24e48caba32109af2ee30079f3eb7c
These are the invisible lines I was talking about, notice the pants
20160729134032_1.jpg

I've tried taking the vertices that take this invisible effect using the snap tool to move them apart a little bit and snap them just in case the clipping isn't noticeable but no effects whatsoever. They still get displayed invisible in-game. Also when I uv map it it, the blood effects take place only in one part (ex: shoot the torso, now only the torso gets blood splats and the arms or legs don't.
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Fri Jul 29, 2016 9:56 am

if you snap vertices and still have this issue, I guess this could be related to the texture used, and especially the uv-mapping. try a quick test with "generate new" uv-mapping from viewport XY. Then use "edit UV #2 -> copy from -> #1".

Alternatively, try to assign a different texture (e.g. any of original game textures) on DETAIL, SPECMAP and BUMPMAP slots; just to find out whether this is related to your texture.

The game uses a blood texture overlay that renders with respect to UV#2, so availability of UV#2 is essential.

can you show a uV-map layout on UV#1 and UV#2 for pants model?
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Fri Jul 29, 2016 10:44 am

Oleg wrote:if you snap vertices and still have this issue, I guess this could be related to the texture used, and especially the uv-mapping. try a quick test with "generate new" uv-mapping from viewport XY. Then use "edit UV #2 -> copy from -> #1".

Alternatively, try to assign a different texture (e.g. any of original game textures) on DETAIL, SPECMAP and BUMPMAP slots; just to find out whether this is related to your texture.

The game uses a blood texture overlay that renders with respect to UV#2, so availability of UV#2 is essential.

can you show a uV-map layout on UV#1 and UV#2 for pants model?

Ok this is what I did (still no results):

In-game:
20160729152210_1.jpg

20160729152207_1.jpg
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Fri Jul 29, 2016 11:15 am

have you re-applied weight copy after snapping vertices? also, have you tried to move skeleton bones in non-"Setup mode" like in my video? just to see how they affect the mesh (to ensure this problem is missing in ZModeler). and if you see this problem in ZModeler too, then it definitively is related to bones weighting.

Also, try Rigging\Influence\Normalize tool on an object before export (if i'm not mistaken, I've build-in normalization into export code, but just to be sure its actually normalized).
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Fri Jul 29, 2016 12:05 pm

Oleg wrote:have you re-applied weight copy after snapping vertices? also, have you tried to move skeleton bones in non-"Setup mode" like in my video? just to see how they affect the mesh (to ensure this problem is missing in ZModeler). and if you see this problem in ZModeler too, then it definitively is related to bones weighting.

Also, try Rigging\Influence\Normalize tool on an object before export (if i'm not mistaken, I've build-in normalization into export code, but just to be sure its actually normalized).

I'm doing a fresh file to see if I did something wrong with so many troubleshooting before. Meanwhile I suggest looking into ped_wrinkle and ped_wrinkle variants, as the invisible lines only appear when I apply these types of shader.
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Fri Jul 29, 2016 10:01 pm

these shaders require additional set of bump textures that are not loaded explicitly in BUMPMAP slot. These textures are assigned in user-defined options. Import an original material to see correct settings.

DETAIL3 with texture and transition texture are a pair of displacement maps, and mask textures for them are in WrinkleMaskSampler_1, WrinkleMaskSampler_2, WrinkleMaskSampler_3. the game mixes displacement maps with bump-map according to mask samplers and current walking/running animation phase.

failing to equip your material with the necessary set of textures might lead to unexpected behavior of in-game render of your material.

I suggest to assign original game material onto your model to see whether problem relates to material or not.
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Sat Jul 30, 2016 3:27 am

..after several tests I was able to reproduce your problem.

The game has some code related to ped model normals. these lines have disjoint vertices and their normals are not matching, causing this "game code" shift vertices to a different positions. I don't know what for the game moves vertices along normals (or along tangents), but lets assume the game needs this.

to fix the problem, select vertices along problematic lines (or select all of them) and use Surface\normals\smooth tool; might require to be applied two times for better smoothing.

Additional tests has brought the underlying game-specific switch on vertices shifting: below is my test model with a palette of objects attached to the upper body having zero on R,G,B,A in columns (right to left actually on screen) and having zero on R,G,B,A of secondary color in rows (top to bottom on screen):

YDD_rigged_model_no_seams.jpg


As you can see, the second column has no seams on attached meshes, the column with zero/black on blue channel of primary color. Paint your model's primary color to (255,128,0) or at least drop blue channel to zero on all vertices.
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Sat Jul 30, 2016 6:54 am

Oleg wrote:..after several tests I was able to reproduce your problem.

The game has some code related to ped model normals. these lines have disjoint vertices and their normals are not matching, causing this "game code" shift vertices to a different positions. I don't know what for the game moves vertices along normals (or along tangents), but lets assume the game needs this.

to fix the problem, select vertices along problematic lines (or select all of them) and use Surface\normals\smooth tool; might require to be applied two times for better smoothing.

I changed the pants material to ped_enveff since I don't have the aditional textures the original material has to make the shader work properly (my model only has normal, spec and diffuse map) but I got the same result in-game, should I only try smoothing the conflicting vertices?
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Sat Jul 30, 2016 8:16 am

sure. I got it fixed by smoothing normals.
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Sat Jul 30, 2016 8:38 am

Oleg wrote:sure. I got it fixed by smoothing normals.

Smoothed twice and some got fixed but others still persist, should I keep smoothing or is there something else to it?
Also do you understand the cloth specular maps? If not could you look into them? I truly do not understand it, I will always get a glossy upper and lower cloth
Attachments
20160730133928_1.jpg
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Sat Jul 30, 2016 8:41 am

ensure they are perfectly snapped; you can change smoothing options "Angle" to something like 70-120, to force smoothing wide-spread of normals angle. when done smoothing, select one "pair" of snapped vertices using Select\Quadr and ensure you see only one normal pointing out of the vertices dot. if you see two normals, smoothing has failed.
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby metroidguy » Sat Jul 30, 2016 10:45 am

Oleg wrote:ensure they are perfectly snapped; you can change smoothing options "Angle" to something like 70-120, to force smoothing wide-spread of normals angle. when done smoothing, select one "pair" of snapped vertices using Select\Quadr and ensure you see only one normal pointing out of the vertices dot. if you see two normals, smoothing has failed.

Ok used 120 and it worked, now for the spec maps. Do you know how they possibly work? I don't understand them, I get glossy textures all the time.
User avatar
metroidguy
Beginner
 
Posts: 121
Joined: Fri Sep 25, 2015 7:02 am

Re: invisible lines on upper and lower model [Ped clothes]

Postby Oleg » Sat Jul 30, 2016 11:02 am

I guess specmap texture is multy-channel. check original textures on R,G and B channels in photoshop and make your considerations. I guess one channel is for specularity, another could be for wetness mask, third for some other in-game task.
User avatar
Oleg
Site Admin
 
Posts: 7342
Joined: Fri Feb 06, 2004 3:54 am


Return to Grand Theft Auto V

Who is online

Users browsing this forum: No registered users and 1 guest