Jump to content

Weird lighting on model


Jago

Recommended Posts

Hello there everyone.

 

I have been lurking around for a long while but finally found a reason to join and get involved after encountering a bug that has been driving me crazy for the last few days. Using the "Blender Frankenstein tutorial" I swapped the head from one model to another. However, after doing this the model and texture react differently to the light, for some bizarre reason. I have literally tried everything I can think of to do with skinning, shaders and the like. It definitely seems like a problem that occurs when importing and/or exporting the .glm. 

 

Maybe it is something to do with the smoothing groups in Blender? That seems to be all I can think of. Having been a former 3DS Max user, I'm still very much getting used to the Blender interface. Anyway, here's two images explaining the issue beyond my words. 

 

Correct look:

 

 

shot0095_zps0c616fbf.jpg

 

 

Incorrect look:

 

 

shot0091_zpsbebd70e0.jpg

 

 

 

 

 

 

I have no idea what is causing the weird lighting and different look on the second image. I haven't upscaled the size of the head or moved it at all. I haven't played with the vertices or anything of the sort. All I did was rename the hierarchy and exported. I even slapped the original texture back on the face to see if it was my texture; no luck. I completely removed the shaders thinking it was caused by a shader issue.

 

To put it simply, I'm out of ideas.

 

Any help greatly appreciated! 

Link to comment

I'm guessing that it was the shader making it not show the light on the face in the original. Are you saying that with the shader linking to the face texture/without the shader entirely it produced the same result? If the model is the same then it sounds more like a shader issue.

Link to comment

I'm guessing that it was the shader making it not show the light on the face in the original. Are you saying that with the shader linking to the face texture/without the shader entirely it produced the same result? If the model is the same then it sounds more like a shader issue.

 

With the same shader applied, it produces the result as shown above. If I remove the shader it remains the same. Both versions have the same shader applied but it doesn't seem to affect the incorrect look.

 

In otherwords, after swapping the head to the other model (incorrect look) it has changed to what you can see in the picture. Regardless of whether a shader is applied or not. 

Link to comment

When you compiled did you tell carcass to "remove duplicate verts"? that option will remove the smoothing groups you created manually or that were already present (splitting polygons is the only way to get smoothing groups in this engine). The splits could also have been welded back together when the .glm was imported by blender.

Link to comment

Are you referring to when I compiled the .glm from 3DS Max? I didn't because it is a mash up of two previously released models. Perhaps you are right then about them being welded back together when I imported the .glm into Blender. However, I believe the polygons are already split as I'm seeing lots of triangles as per usual. 

 

Maybe I'm not following!

Link to comment

I've never used blender so i'm not familiar with the process...but importing .glm in max doesnt weld split verts. When you're done mixing models, you'll export to .XSI. Then you feed the .XSI to carcass...at this step you can choose to weld back together all those duplicate verts, but it doesn't usually happen by accident. So at some point in the import / export / compile process the verts got welded back (if that is indeed the issue you're dealing with here). So check your meshes in blender before exporting and even try importing the new .glm in max and look for welded verts.

Link to comment

Well, all the verts are welded together. Should they be separate then? I separated them and exported but this then gave me an error that suggested the modified mesh now exceeded the limit of the amount of verts/face you are allowed on any given mesh.

Link to comment

Nope! The "head" and "head_face" are still separated into two different meshes like in the original model. I tried to flip the normals after doing a ton of research but that doesn't seem to be doing anything either. It has to be a model issue because literally nothing has changed in the skin/shader files. 

 

Thanks for your continued help Pysk0, much appreciated.

Link to comment

Carcass usually tells you the name of the problematic mesh in case you want to fix that problem too. Flipping normals is just another term for flipping polygons the opposite way and has nothing to do with the current issue. Are you using a .car file or using assimilate to compile? if you are using a .car, paste the content so we can see if there's something wrong in the options.

Link to comment

Maybe that is the issue then. I'm using the blender tutorial (http://jkhub.org/topic/4905-frankensteining-with-blender/) and avoiding carcass, assimilate, root.xsi etc completely. Due to the simplicity of the tutorial and my lack of time to weigh a model these days I find it the perfect solution, aside from this irritating issue.

I was trying to find a way of exporting to .xsi through blender but there doesn't seem to be a script.

 

EDIT:// So I did a little more re-search and found this: http://www.katsbits.com/tutorials/idtech/what-are-smooth-groups-and-mesh-smoothing-on-models.php

 

It seems to be exactly the problem I am having. The problem is, if I edge split the verts and export it I'm well over the 1000 limit. Blender is doing something odd on export that is causing it to recieve bad lighting and shading.

Link to comment

If you want to split and preserve your smoothing groups and not hit the limit, simply detach the smoothing groups to a new object...like "head_augment" for instance would contain all the split portions and help keep down the vert count on the main object. Simply clone the mesh, select portions (the smoothing groups) you want to keep and do an invert selection to get rid of the head's polygons. Do the same on the original head, but this time you'd only delete the "smoothing groups" portion. When you do this in max your meshes keep the original weights and still behave as one mesh because they still have the same values.

Link to comment

I think I'll have to go back to 3DS Max, I have no idea how to do that in blender and I'm sure it has something to do with the export of the .glm (lack of tick boxes etc).

 

I'm not even sure it has smoothing groups applied to it, I can't seem to find them anyhow. I've spent days trying to figure this out with absolutely no progress. Probably time to jack it in!

Link to comment

I too think this is probably related to normals. Blender tends to automatically calculate them, I believe, and may yield different results from the original model. You can kind of check this by enabling Vertex Normal Display in ModView and comparing the models, but it's kind of difficult to see.

 

I can't really think of any solution if that is the case; it would certainly require changes to the plugins, but I'm not even sure Blender can do it at all.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...