Results 1 to 12 of 12

Thread: lighting problem on faces

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default lighting problem on faces

    Me and wilddog are having problems with faces showing odd lighting effects along the nose,chin and forehead where the forehead isn't hidden by a helmet:





    are examples, they aren't the worst performing heads we actually gave up on using some head models previously because they had an even more obvious problem.



    shows the same model but with completely plain colour for the head texture - with 'blank' normal generated from that flat colour (with black alpha for that area too)


    The model doesn't show up as having any seam problem when viewing vertex normals in the selection editor in milkshape

    I've since managed to reduce the problem very very slightly by revising the head to have more facets in the nose and chin - that's improved the chin marginally but not done much for the nose....

    haven't noticed anyone else having this problem and am curious what everyone else does to avoid it - are we missing something on smoothing?

  2. #2

    Default Re: lighting problem on faces

    Maybe something about Alpha chanels in normal map:hmmm:

  3. #3
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: lighting problem on faces

    No we tried a lot of combinations its not alpha related as far as we can tell (we're just using a blank black alpha on that part). Its tied somehow with milkshape and smoothing I think. Its not the hard seam issue as I finally managed to create that on the head in the same place (althoguh it only shows up in game and never shows up in milkshape). Its created essentially by the game light on the mirror joint of the UV. We decided in the end to make the face a head on view rather than a side view in order to remove part of the issue. If the head is in chain it seems to break up the effect enough to hide most of the issue (particularly if they also have a helmet of some kind).

    Note If the unit faces a different direction relative to the game light the effect went away also.

  4. #4
    B. Ward's Avatar ★★★★ RockNRolla ★★★★
    Join Date
    Feb 2007
    Location
    East Coast, United States
    Posts
    4,376

    Default Re: lighting problem on faces

    Never ran into this sort of issue. Not sure I can be of much help to you, but if you would like me to send you one of my units and the texture and normal to compare it to see if that helps any let me know.

  5. #5

    Default Re: lighting problem on faces

    As you say, if is not alpha related, it must be something about the mesh ou uv coordinates. Try to resolve it and tell us something.
    Keep it up!

  6. #6
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: lighting problem on faces

    B. Ward - Thanks for the offer.

    As this head is basically just a vanilla head I managed to recreate it on a vanilla model. I used the armoured sergent and simply converted it to MS3D using GOM. I then moved the UV map of the head. After I had moved the UV and saved it I first got the seam error KE referred to and used his seam repairer to remove it (the seam only appeared in the game never in milkshape on the head (although I had to then use GOM to reconvert it back to mesh as KE's own tool kept causing a crash). This when applied against a simple 'base' (ie all one colour) texture map showed the same error (as viewed when going into the grass bowl custom battle).

    If I then moved the unit around I could position it where the error didn't show basically based on unit position relative to the game light. The error seemed to be strictly due to using a side view of the head as the UV and the issue was as you could see, on the face where the UV map started to mirror onto itself.

    In the end Makanyane amended the head model slightly to add in some extra triangles on the chin area and then she separated out the actual face to create a full front face UV. With these done this seems to of resolved the issue for this model.

    I was hoping it might of been tied to an incorrect setting when generating a DDS or normal but it didn't seem to be that and other than that it just seemed to be tied to the way milkshape handled the UV map when folded on to itself (again I wasn't sure if there was some setting we had used or should of used).

    Anyway at least for this model I think we're passed the problem but I know I had the issue with several vanilla style heads and previously this caused me to back out from using those heads which caused me the worse problems.

  7. #7
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: lighting problem on faces

    This was how the unit turned out in the end after the remapping Makanyane did as mentioned (ie by mapping the actual face from a head on view).

    Thanks to B. Ward and SigniferOne for their help and suggestions. We pretty much concluded its just down to the way a mirrored/folded face is handled and that texturing can help hide it.

    Spoiler Alert, click show to read: 


  8. #8
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: lighting problem on faces

    This is the usual seam problem all CA models have.
    It's a vertex normal issue that arises when editing models
    in Milkshape. Once you add any geometry (or do anything
    in Milkshape that triggers an auto-recalc of the normals)
    you tend to get these problems. Heads, and the torso,
    and really any tubular parts like legs, arms, etc. will have a problem
    at the join seam. Without a real method of dealing with it,
    you just have to push the faces into a near collinear geometry
    to get the normals to do the right thing when illuminating your models.

    Alternatives to this:
    (1) If you have access to 3ds Max, import the model into it WITHOUT
    opening them in Milkshape. Use the import/exportv!_3 script for this.
    This supports explicit vertex normals which it the heart of this problem.
    (2) Cure the problem for faces and under the arms using GOAT's
    planarizeseamnormals button. This only works on the face and under
    the arms. It won't detect anything else. Read the User's Manual
    for GOAT on how to do this; you have to select the vertices where the
    problem occurs and then save the file with the selected vertices before
    the button will work correctly.

    Hate to preach again, but the problem is heads and everything else in
    CA's models are just pieces of paper brought together so that they look
    like spheres (heads), or cylinders (torsos, arms, legs), but topologically
    they are still just R_2 planes. The vertex normals don't communicate
    across the joining boundary once they've been changed by being edited
    in Milkshape. Hence the lighting problems you see.

  9. #9
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: lighting problem on faces

    @KnightErrant - Thanks for the info. I thought 3DSMAX may have a cure but I don't have that (may need to see if I can do a 30 day trial).

    I wasn't sure if it was really the seam problem or not. I managed to get a true seam on the head for the first time after running the model through GOMs converter and then just moving the UV. That created a fairly obvious 'hard' looking seam on the head. I then did use the GOAT to smooth it and then used GOM to convert back to a mesh and that got us back to the version shown above where we had been on the actual model we were using (i.e. with the lighting issue). I wasn't sure therefore if it was really the seam issue or not. Also wasn't sure if the GOAT converter for milkshape to mesh was suppose to be used for the final conversion - as it does create a mesh but that mesh crashes the game as soon as its used. I wasn't sure if you've tried those tools on the version 1.5 units. CA added a couple of bytes extra in to the mesh file near the beginning so your conversions normally only work if I use a non updated kingdoms version (ie v 1.3).

    The other bit which confused me (I'm easily confused) was that I never saw any of the seam issue within milkshape. Your tutorial showed the effect via one of the tools but that always showed the normal bit as being as I expected on the head. Only the right body under arms etc showed what your diagram had so I wasn't sure again.

    A question on your seam routine in Goat. Do you have to select all seams in one hit or can you run it multiple time if you missed some (would it retain its fixing). I've had it crash (hang really) a few times on me and don't know if its because the milkshape file has got too big (after repeated merges) or due to selecting some edges which should be a seam but it doesn't recognise as a seam or just something else?

  10. #10

    Default Re: lighting problem on faces

    I am having a similar problem, the head is question is quite high poly and I have tried to planarize the seams following the tutorial but to avail. I do use 3ds max butam unsure as to exactly what needs to be done once the model is imported ?

    If you have access to 3ds Max, import the model into it WITHOUT
    opening them in Milkshape. Use the import/exportv!_3 script for this.
    This supports explicit vertex normals which it the heart of this problem.
    KE, you seem to imply that the very act of importing/exporting will fix the seams providing we don't mess with model in Milkshape after exporting 3ds max, is that right ? having tried this it doesn't appear to work.

    Admittedly the problem is not particularly noticeable, but its still pissing me right off !

  11. #11
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: lighting problem on faces

    @Yela Deshu,

    Well I'm not sure if I'm explaining the problem correctly. 3dsMax has
    the tools to solve the problem which Milkshape doesn't. Let's say
    the CA models are perfect, even though they have seams, they've
    modified the normals across the seams so you can't see any lighting
    problems in game. So the vertex normals are NOT what you get if you
    average all the face normals that touch a given vertex.

    Now the models are brought out of game and they go into .ms3d format.
    No problem yet, the normals are simply converted from RGB encoding
    into floats. In Milkshape, almost anything triggers a recalculation of the
    geometry, especially a recalc of the vertex normals. This can be simply
    adding 3 verts and one tri.

    If you don't do MS, but go directly from .ms3d to Max, the version 1_3
    of the importer/exporter tries to make the vertices explicit, that is, be
    immune to recalculation. Max allows this, one of the really cool things
    it does. On export, it reads the unrecalculable normals and writes them
    out to the .ms3d format. (Here is a difficulty you may have seen.
    Sometimes on export this part crashes Max. Don't know why. I've added
    print statements here and there as an experiment, and, lo and behold,
    the system crashes stop. What does this mean? Should I release a new
    import/export script with totally random print statements so Max
    doesn't die? Been doing too much settlement things to pursue this, but
    this weirdness really bugs me. Programs should do the same things
    every time!)


    The implication is what I meant, if you avoid Milkshape, the normals should
    not change with version 1_3. Should not means I think they should not,
    if they are, obviously I'm missing something. But that is what I THINK
    is the lighting normals problem, if they get recalculated somewhere,
    by some program, then they won't be what CA made them to be to get
    over these lighting anomalies at seams.

  12. #12

    Default Re: lighting problem on faces

    This is still problem for me, though now I am convinced its not a seam problem as such, much like wilddog encountered. Using Selection Editor in MS the vertex normals actually look fine, and there are no pronounced seams down the face in smooth shaded view of the model. planarizing is having no effect because there are no seams to fix !

    In game, I am still getting the same effect appearing when the sun is falling to the right or left of the unit.

    We pretty much concluded its just down to the way a mirrored/folded face is handled and that texturing can help hide it.
    I suppose there is no real solution then ? I have will have to give up and do these units 'full frontal' , which obviously takes up texture space. really annoying. happy to send the unit to someone if they want to take a look at it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •