SR4 Character Mesh Viewer

Holy crap, the uv maps are broken did I miss something? I'm fine with rigging it from scratch, but the uv maps. lol. Trying to do old shaundi's face.
 
Holy crap, the uv maps are broken did I miss something? I'm fine with rigging it from scratch, but the uv maps. lol. Trying to do old shaundi's face.

Sounds like it is attempting to load the wrong texture onto the head mesh, which shaundi model are you trying to load?

In version 1.6 their was a minor bug that prevented the correct head texture from being loaded on some models. This bug can be seen in the third post with the Shaundisim and Kinziestrix screenshots. If you are compiling from source you can change MeshHandler.cs line 276 from:

Code:
if(texName.Contains("_d"))
{
      if(texName.Contains("_head_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
}

to:
Code:
if(texName.Contains("_d"))
{
      if(texName.Contains("_head_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
      else if (texName.Contains("_head_sm_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
}

The other thing you can try is to add the model to the TextureMap.yaml if it isn't in there already. For example, here is an entry I did for Shaundisr2:

Code:
---
model:  shaundisr2
materials:
  - [id: 0, name: Skin, tex_d: shaundisr2_skin_sm_d.tga]
  - [id: 1, name: Clothes, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 2, name: ArmBangle, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 3, name: Hair, tex_d: shaundisr2_dreads_sm_d.tga]
  - [id: 4, name: Bangs, tex_d: shaundisr2_dreads_sm_d.tga]
  - [id: 5, name: Belt, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 6, name: Neckband, tex_d: shaundisr2_clothing_sm_d.tga]
 
Last edited:
Sounds like it is attempting to load the wrong texture onto the head mesh, which shaundi model are you trying to load?

In version 1.6 their was a minor bug that prevented the correct head texture from being loaded on some models. This bug can be seen in the third post with the Shaundisim and Kinziestrix screenshots. If you are compiling from source you can change MeshHandler.cs line 276 from:

Code:
if(texName.Contains("_d"))
{
      if(texName.Contains("_head_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
}

to:
Code:
if(texName.Contains("_d"))
{
      if(texName.Contains("_head_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
      else if (texName.Contains("_head_sm_d")) tInfo.TextureLocation = eVTextureLocations.HEAD_D;
}

The other thing you can try is to add the model to the TextureMap.yaml if it isn't in there already. For example, here is an entry I did for Shaundisr2:

Code:
---
model:  shaundisr2
materials:
  - [id: 0, name: Skin, tex_d: shaundisr2_skin_sm_d.tga]
  - [id: 1, name: Clothes, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 2, name: ArmBangle, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 3, name: Hair, tex_d: shaundisr2_dreads_sm_d.tga]
  - [id: 4, name: Bangs, tex_d: shaundisr2_dreads_sm_d.tga]
  - [id: 5, name: Belt, tex_d: shaundisr2_clothing_sm_d.tga]
  - [id: 6, name: Neckband, tex_d: shaundisr2_clothing_sm_d.tga]


I have 0 knowledge of coding and I wouldn't even know where to put that stuff.

I'm just a modeler and just like the pc character models sr3 thread a while ago, the uv's were broken on many models. The uv map normally is supposed to look like its vertices in the uv map window, but for some reason, shaundi's head in sr3 and sr4 is messed up on the uv map and has all the uv vertices all at one point so technically it's a broken uv map. And it is impossible for there to be a uv map that is one pixel and still make the model look like "shaundi". I'm not sure if it's because I used the wrong shaundi str2_pc file or if the current extractors do not properly extract the cmesh/cpeg/c etc stuff. I'm just loading this one: npc_Shaundi.str2_pc the first one. thanks for replying :D

Also, when i import the obj into blender, i have to delete a bunch of lines sticking out and flip the faces so they are actually visible which i'm fine with, just weirded out by how the uv's are broken on all of them o_o
 
Last edited:
can you please help me ? i wanted to look at the models in the game i finally got kenzie extracted but when i opened her in the viewer it didnt have a texture
...
thats ment to be white house kenzie >.< but for some reason the textures wont load

Someone asked me this question and I am posting the answer publicly in case anyone else runs into this problem. The example is for kinzieprez but the process is the same for any model.


--------------------------------------------------------------------------------
You extracted saints_female_kinzieprez.str2_pc to a folder and opened it with
MeshViewer. The model is one of those where "you take your chances" and it doesn't
pay off. Looking at the image, you can see the texture on her legs. Which means
that MeshViewer found the textures but didn't know how to map them to the model. So
the only thing you can do to get the model to display correctly is to add an entry
for it into the TextureMap.yaml file.

Step01.png

Step 1:
Open the file kinzieprez.ccmesh_pc or kinzieprex.cpeg_pc. You can use a hex editor
or even Notepad++. Once the file is open make note of the texture names. For this
example we are interested in the following:
kinzieprez_clothing_sm_d.tga
kinzieprez_skinhair_sm_d.tga

Step 2:
Open the file TextureMap.yaml with a text editor such as Notepad++. Be careful when
editing this file. YAML doesn't like tabs so only use spaces for indentation. YAML
uses three hyphens as a separator. So at the top type the following:
Code:
  ---
  model:  kinzieprez
Save the file changes. MeshViewer only loads the YAML file at startup, so if MeshViewer
is open you will have to close it and start it up again. Notice that the legs are no longer
textured. This is because we told MeshViewer to use the entry in the YAML file but we haven't
put any textures in it yet (the head is a separate mesh, and a separate method of mapping).
Step02.png
Step 3:
Go back to the YAML file. Under the model name enter the following:
Code:
  materials:
    - [id: 0, tex_d: kinzieprez_clothing_sm_d.tga]
Start by adding one entry at a time so it will be easier to see the changes and identify what
part of the model the texture was added to. You can omit the "name" since we don't know it yet.
The MeshViewer doesn't use the name field that is just a convenience for any humans reading the
YAML file. Pick a random texture from Step 1 for now (you have a 50% chance of getting it right).
Save the file changes. Close MeshViewer if you left it open then start it up again.
At first glance it looks like nothing happened. Be patient, spin the model around and look for
anything (like earrings, necklaces, etc...) Notice on the back. It looks like the first entry
for this example textures her ponytail. The color is off because the game also applies a shader
to the texture but MeshViewer doesn't know anything about shaders at this point in time.
Step03a.png Step03b.png

Step 4:
Go back to the YAML file. Change the texture for our previous entry. You should add the name field
since we now know what it is. Add a another entry for the next part and pick a texture. I'm going
with kinzieprez_clothing_sm_d.tga again. Save the file changes. Close MeshViewer if you left it
open then start it up again. Looks like the second entry is for the lenses of her glasses.
Step04.png

Step 5:
Go back to the YAML file. Change the texture for our previous entry if needed. You should add the
name field since we now know what it is. Add a another entry for the next part and pick a texture.
Save the file changes. Close MeshViewer if you left it open then start it up again. Just keep
repeating this step until the model looks complete.
StepFinal.png

So at the end I ended up with the following entry in the YAML file:
Code:
---
model: kinzieprez
materials:
  - [id: 0, name: Ponytail, tex_d: kinzieprez_skinhair_sm_d.tga]
  - [id: 1, name: GlassLenses, tex_d: kinzieprez_clothing_sm_d.tga]
  - [id: 2, name: Blouse, tex_d: kinzieprez_clothing_sm_d.tga]
  - [id: 3, name: HandsAndNeck, tex_d: kinzieprez_skinhair_sm_d.tga]
  - [id: 4, name: Legs, tex_d: kinzieprez_clothing_sm_d.tga]
  - [id: 5, name: Shoes, tex_d: kinzieprez_clothing_sm_d.tga]
  - [id: 6, name: JacketAndSkirt, tex_d: kinzieprez_clothing_sm_d.tga]
 
Question does this mean we can morph or have I totally misread the whole thread?

"morph" - ??? - I think you misread the thread. This tool only views the models, it doesn't allow you to change anything. You could use this tool to get a model into Blender for editing. But at this time there is no way of getting that model back into the game.
 
"morph" - ??? - I think you misread the thread. This tool only views the models, it doesn't allow you to change anything. You could use this tool to get a model into Blender for editing. But at this time there is no way of getting that model back into the game.

Is the exported OBJ supposed to have completely broken UV maps in 3DS Max? Have you not programmed for the UV to be exported?

(or am I completely missing something in the tutorial?)
 
Is the exported OBJ supposed to have completely broken UV maps in 3DS Max? Have you not programmed for the UV to be exported?

(or am I completely missing something in the tutorial?)

The OBJ file does contain texture coordinates. But at the time I wrote the export code the MeshViewer wasn't properly loading textures, so the exported texture coordinates have never been checked for accuracy. And I only have access to Blender so I have no idea if 3DS Max likes this implementation of the OBJ file formatting .
 
Uhm . with this tool , you can export haircuts and cloth to 3ds max?

- hair is stored in a CMORPH file so it can't be opened with this tool.
- if by 'cloth' you mean the clothes that the player can wear then yes, it is possible to open most pieces of player clothing with this tool. Once open you can then export it to an OBJ file which should be importable into 3DS Max.
 
Back
Top