.
Results 1 to 10 of 10

Thread: Missing faces in lod model

  1. #1
    Join Date
    Nov 2006
    Location
    United States of America, Oregon, Portland
    Posts
    3,249

    Default Missing faces in lod model

    I've run into a weird problem when I was creating a lod model. Some of the faces of the model are not showing up in-game, but when I look at an external FBX viewer, the model appears to be OK. I was able to correct most of the issues by playing with verticies - moving / welding / creating edges /etc, but there's one I can't seem to fix.
    Are you guys performing some sort of optimization on meshes when you convert them to trainzmesh?

    Here's a shot of my remaining issue. Note the missing face circled in red. This is using the Trainz viewer, forcing the lod distance to 100m (so as to use the medium lod mesh).



    Below is a shot of the same area of the .fbx model in MS's 3D paint program.



    Unfortunately, I was not able to reproduce this issue using a test cube.

    For reference, here is the .cdp file:
    http://carsoncarshops.com/files/caboose-broken.cdp

    This is using build 94012.

    Any ideas? The material has no transparency (.pbrmetal); the face normals look correct; the UV's look OK - I'm not sure what else to look at...

    Like I say, I saw this on various other places on the model, but was able to fix it by re-arranging the geometry.

    Thanks,
    Curtis

  2. #2
    Join Date
    Nov 2006
    Location
    Australia, QLD, Brisbane
    Posts
    6,896

    Default

    Any chance that they’re simply back-facing?

    chris

  3. #3
    Join Date
    Nov 2006
    Location
    United States of America, Oregon, Portland
    Posts
    3,249

    Default

    I don't *think* so - the normals look correct. I tried resetting the normals and resetting the scale and rotation (which sometimes shows up flipped normals).
    I also flipped the offending face's normal inside Blender, and it was still missing in-game.

    That doesn't mean I didn't mess something else up, though.....

    Curtis

  4. #4
    Join Date
    Nov 2006
    Location
    Canberra, ACT, Australia
    Posts
    7,439
    Blog Entries
    30

    Default

    I took the liberty of importing your hi poly and medium poly meshes into Blender to have a look. In the medium poly mesh you have an artifact in the panel immediately to the right of the disappearing face. See below:



    I suspect this is caused by having a vertex on an edge - i.e. the lower panel to the right. The hi poly mesh doesn't have this issue.

    No idea if this causes the disappearing face but its something I would fix first.

    Paul


  5. #5
    Join Date
    Nov 2006
    Location
    United States of America, Michagain, Berkley
    Posts
    5,220
    Blog Entries
    6

    Default

    The key is PBR, I had this also, it's your UVmap is wrong, you used project from view so that edge face is a line on the UVmap and well disappear at some angles.

  6. #6
    Join Date
    Nov 2006
    Location
    United States of America, Oregon, Portland
    Posts
    3,249

    Default

    Hi Paul,

    Yes, that appears to be the problem. I added an edge to that face (below), and the adjacent missing face is now visible in-game. So, I guess this is a nice corner-case (ha!) for the FBX -> Trainzmesh converter?



    @whitepass,
    No, the UVmap is correct (at least, in this area). I have no doubts that what you described would cause issues, though.

    Curtis

  7. #7
    Join Date
    Nov 2006
    Location
    Canberra, ACT, Australia
    Posts
    7,439
    Blog Entries
    30

    Default

    Quote Originally Posted by Pencil42 View Post
    Hi Paul,

    Yes, that appears to be the problem. I added an edge to that face (below), and the adjacent missing face is now visible in-game. So, I guess this is a nice corner-case (ha!) for the FBX -> Trainzmesh converter?

    ....
    Torsten had quite a lot of stuff in his XML exporter to highlight possible issues in Trainz and I think TrainzMeshImporter had a warning about vertices on an edge. The FBX exporter has nothing of that. I have seen some interesting warnings in the TANE FBX importer that I don't understand. I should start collecting them and ask Chris what they mean.

    Paul


  8. #8
    Join Date
    Nov 2006
    Location
    United States of America, Oregon, Portland
    Posts
    3,249

    Default

    TMI may have had a warning about this, I'm not sure. I don't remember it ever dropping faces, though. One might reasonably expect an error shown in that case?

    Curtis

  9. #9
    Join Date
    Nov 2006
    Location
    United States of America, Oregon, Portland
    Posts
    3,249

    Default

    It appears that triangulating the mesh in Blender before exporting to .FBX solves this (and other) issues. That might be a good 'best practice.'

    Curtis

  10. #10
    Join Date
    Nov 2006
    Location
    Canberra, ACT, Australia
    Posts
    7,439
    Blog Entries
    30

    Default

    Quote Originally Posted by Pencil42 View Post
    It appears that triangulating the mesh in Blender before exporting to .FBX solves this (and other) issues. That might be a good 'best practice.'

    Curtis
    The XML exporter triangulates any ngons that are not already triangles. I did look in the FBX exporter code but it doesn't. The code is a bit difficult to follow.

    CG Cookie suggests triangulating all meshes before exporting to a game, even if it goes through Substance Painter first. It's also a good idea to eyeball (look at) the mesh looking for oddities before export. Strange things can happen if you inadvertently select a wrong vertex prior to some editing action. I get that occasionally.

    Recently, I've de-triangulated some odd looking ngons and then using the triangulate tool (crtl T) as Blender often does a better job than me.

    I'm toying with the idea of a "Best practices/ good ideas" WiKI page.

    Paul


Posting Permissions

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