As an aside, I posted this 5 days ago on 2008-06-21, but for some reason I got a message stating that posts on this forum need moderator approval, which I never got. Not sure if that's a forum bug, or a moderator problem. Anyway, here's another try.
My models don't display correctly in my XNA program, even though they look the way I expect them to when I create them in XSI Mod Tool. I would think it could be a problem with my rendering code, except the problem also exists while viewing my models with the FBX plugin for QuickTime. Polygons seem to be in places where they shouldn't be, and when panning, zooming, or orbiting, these extra polygons flicker. I've duplicated the problem with several models, but the steps below seem to be one of the easier ways to reproduce it.
The following set of steps are a quick way to reproduce the problem:
- View->Layouts->Default
- Change to wireframe mode, if needed
- Get->Primitive->Polygon Mesh->Cube. This is cube A.
- In the properties window that appears, change cube A's length to 16
- Get->Primitive->Polygon Mesh->Cube. This is cube B.
- Use the translate tool on the right side of the screen to move cube B to 6,6,0
- Select cube A, then hold ctrl and select cube B
- Modify->Poly Mesh->Boolean->Difference
- Press the "Freeze" button on the bottom right
- Select cube B, then press the delete key on the keyboard
- File->Save the model as whatever you wish
- File->Crosswalk->Export FBX. These are the settings I used. If it's not listed, it was set to disabled.
- Scene scaling factor = 1.0
- Geometry = enabled
- Shapes = enabled
- Keep XSI effectors = enabled
- Show the warnings and errors dialog box = enabled
- Load the exported .fbx in Quicktime with the FBX plugin and you should see the problem
The XSI screenshots look the way I expect them to. The wireframe in QuickTime also looks how I expect. However, the shaded views for both QuickTime and XNA have polygons "covering" the hole that should be cut out of the large cube (cube A).
Changing the cull mode didn't fix anything. I've checked the normals and they look ok. What is causing this, and what can I do to fix it?
Shaded view in XSI (correct)
Wireframe view in XSI (correct)
Shaded view #1 in QuickTime (incorrect - extra polygons that flicker when panning, zooming, orbiting)
Shaded view #2 in QuickTime (incorrect - extra polygons that flicker when panning, zooming, orbiting)
Wireframe view in QuickTime (correct)
Shaded view in XNA (incorrect - extra polygons that flicker when panning, zooming, orbiting)