Insimenator.org
August 11, 2020, 08:13:03 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Insim's annual Donation Drive is on! Click here for info and to toss some money our way.
 
  Home   Forum   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Diminishing shading issues with poser exported obj files  (Read 1575 times)
0 Members and 1 Guest are viewing this topic.
Bakajin
Member

Posts: 22


View Profile
« on: August 31, 2007, 11:49:09 am »

About the import and export options in Poser when working with sims meshes: I was having the same shadowing problems everyone else seemed to be having. It is is a pain trying to correct the normals changes that seem to be happening with the program when there are shared seams (or edges). I decided to try turning on the commands that reference welding on import and export. When I import back into milkshape, I don't have visible seams, but the shading problems remain in some spots.

Before, I would apply demon's align normals tool, however, with a couple of meshes, that just made things worse overall, as shadows would pop up everywhere. Now that I'm turning on the welding options on import, the shading problems are fewer, and much easier to correct (A pain nonetheless, but easier).:smt120

Anyone see any problems with turning on weld identical verts? I'm going to use the unimesh importer to create the new mesh rather than meshtool.
Logged
BlooM
Member

Gender: Male
Posts: 2980


View Profile
« Reply #1 on: August 31, 2007, 01:36:02 pm »

You can not use weld identical verts!!!
You will screw up your uvmap that way Wink

I use Wes H's ''MTS2_505956_wes_h_VertexNormalDM''
When you have imported you new obj into milkshape and objx then i import the original mesh and copy all the normals by using Wes his tool.
Its a bit of a search the first time on how it works but if you used to it you dont want anything else. Wink
Logged

No longer active
Bakajin
Member

Posts: 22


View Profile
« Reply #2 on: August 31, 2007, 09:27:38 pm »

I've been trying Wes' tool and the fact it drove me nuts inspired me to try something else. I tried copying all the normals (select all --> wes' tool) and the new mesh turned completely black as if all the normals turned inward or somphin. Selecting more than two verts yields similar results. So I went to try pairs of verts with mixed results, some shadows disappeared, some didn't. Guess I can try again (again).

Does that mesh turning entirely black part sound like I might have forgotten a step . . . importing objx file? Something?
Logged
wes_h
Member

Posts: 28


View Profile WWW
« Reply #3 on: August 31, 2007, 10:58:33 pm »

One thing that makes the Sims2 body mesh shading issues harder than they might need to be is the fact that, by default, there are no smoothing groups. This is mainly because the game files (GMDC) do not contain them (because they are not needed for runtime 3D rendering).

A smoothing group is a subset of a mesh that should not have any edges that are shared with a different smoothing group use averaged normals. My impression from looking at the Maxis meshes is that smoothing groups were used by the artists that made them originally.

One place that is easy to describe this is at the hem of a dress. At that edge, the faces that are on the outside of the dress should have normals that face outward (from the center of the body), while the faces on the inside of the dress should face inwards (towards the center of the body).

Maxis made these work by making sure that the "seam" there was not welded. Welding is where vertices that belong in more than one face are the same, versus unwelded, where there are two or more vertices at the same place. This is because in The Sims 2 mesh format, there is exactly one normal for every vertex (in some formats, the normal is associated with the face, but not here). Then, each set of faces needs to be placed in seperate smoothing groups (so, one for the inside, another for the outside). If those two steps are done, then the MilkShape function "Smooth All" will set the normals as I described they should be.

If you weld the seam there is only one vertex at each point along the edge, and so there can only be one normal. When you use smooth all, the result is the average of the two directions, which makes a normal that points downward. This give a dark shaded area at the dress hem.

You get a similar effect when you leave the seam unwelded, but have the two parts in the same smoothing group. In this case there are two normals, but they each point partly at the floor and partly the way they should, giving a shading issue, but not as intense.

As Bloom pointed out, there is also a UV mapping issue with welding seams where the UV map has seperated parts. The UniMesh exporter applies a partial fix for this by adding a new vertex in and then remapping the faces so that both UV coordinates are able to be exported (effectively unwelding them), but when this happens one of the normals can be lost.

If you cannot retain the original Maxis normals, which is what happens when you move the mesh to and from Poser, then you can cure this with smoothing groups. As an aide, I wrote a tool plugin that attempts to make new smoothing group assignments by combing through the model and splitting the parts that are UV mapped seperately into new smoothing group assignments. Since this is just a calculation, and there are only 32 smoothing groups, this process sometimes fails to get the entire mesh seperated on very complex meshes. But the latest releast of the UniMesh plugins had this plugin, named "Sims2 UniMesh Make Smoothing Groups V4.09", located in the Tools menu in MilkShape. Just make a backup of your work before you try it, please, in case you are not satisfied with the results.

<* Wes *>
« Last Edit: August 31, 2007, 11:05:17 pm by wes_h » Logged
Bakajin
Member

Posts: 22


View Profile
« Reply #4 on: September 01, 2007, 02:30:15 am »

Thanks Wes, I'll give it a try after the holiday.
Logged
Pages: [1]
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.106 seconds with 31 queries.
SimplePortal 2.1.1