Aller au contenu

Photo

wierd shadows on custom models


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
-Semper-

-Semper-
  • Members
  • 2 259 messages
hello modding folks,

to get me back in modelling for nwn2 i thought i redo the codi exterior buildings and spice them up a bit with lod models, tinting and improved polygon count/details. the main prob with the available codi exterior models is that those models deliver very bad performance because of the scattered model files - one building contains up to 20 different meshes and texture files which need to be loaded. i'll compress them to max 2 meshes and 2 different texture sets.

as you can see at the first picture, the building on the right (plc_se_build01) contains no errors at all. the second building on the left (plc_se_build02) suffers from wierd semitransparent shadows (black huge spots like the one on the back where the far left window is covered in darkness). dunno what's going wrong with the mesh so i provided a files.rar for interested people to help me out tracking down this bug ;)

as always thx in advance :wizard:

Image IPB

Image IPB

i already reset xform numerous times, checked for flipped polygons, ngons and so forth. i use max11 and tapzn's tools.

ps: right now the tower's vertices are not welded so you'll notice the background through thin lines^^ that's not the source of the error because i also checked the model ingame with welded vertices.

Modifié par -Semper-, 18 février 2011 - 10:35 .


#2
ArtEChoke

ArtEChoke
  • Members
  • 85 messages
I think you're missing some verts when you weld. I was able to get rid of all of the dark areas by welding several different groups by each of the three problems on the building.



On the one to the right of the door specifically, the verts are shifted upward and need to be snapped back into place before welding.


#3
-Semper-

-Semper-
  • Members
  • 2 259 messages
thx for checking, artechoke! ;)

interesting. i was able to eliminate some of the spots too by recreating polys without welding. the strange thing is there are still errors at polys where all vertices are welded and there are polys where some corners are not welded but in the same time there is no dark spot visible... this drives me nuts :D

Modifié par -Semper-, 19 février 2011 - 09:49 .


#4
BigfootNZ

BigfootNZ
  • Members
  • 131 messages
If your meaning the black gradiented areas coming out from vertexs id say that is due to verts being welded around acute angles or across smoothing groups. The engine attempts to smooth the lighting around the extreme angle and you get that odd lighting. Its because the vert at the corners the effect is happening is welded. That or the original model had bad smoothing group assignment. Throw in a box into max and assign its faces all a single smoothing group number and you'll see what i mean. Looking at that second pic id say the wall is welded to the gutter at that single vert and the gutter and wall faces share the same smoothing group but the face on the left of the black gradient is a different smoothing group or its vert where it links to the gutter where the lighting problem is detached from the rest.

In game engines and model exporters for such games all smoothing groups are ignored and in reality the verts around smoothing groups are broken and split into two verts. Hence why you fixed it by breaking the verts at those corners by redoing the poly faces but not welding them.

Id say that it wasnt in Bats original mdl, but might be an issue with the importer you are using, some completely ignore smoothing groups or give a model all one single smoothing group, like some of the old NWN1 max importers used to do. It could even be arbitrarily welding verts sharing the same co-ords.

Take your model, weld all the verts of the models indirvidual peices to make sure you havent got any odd clusters of detached verts  where there should only be 1. Then select all models faces and assign them smoothing group 1, then go through and assign all the planes and parts with indirvidual smoothing groups until the model looks all nice with the right sharp lighting cut offs on edges, then export it again, that should fix your problems hopefully.

It could also be a problem with the normals not playing nicely with models verts, but im not sure how to explain that correctly. Hmm sounds like im as clear as mud.

Modifié par BigfootNZ, 19 février 2011 - 08:29 .