PDA

View Full Version : Help - Non-Planar Polygons when converting from Maya



wtdedula
11-20-2011, 06:19 PM
Hello All;
I am working on a model tonight that I have to finish for tomorrow. I imported a model that a student of mine created in Maya. He exported to .obj and then I imported into Lightwave Modeler Version 10. It looks fine in Modeler but my statistics say that I have 53 non-planar polygons which seem to be all around the model, not just in one structure. We are developing this for a interactive game so we can only use Polygons, no Sub-D's.

Is it normal for so many Non-Planar Polygons to be created when importing from Maya via. .obj ?

Can anyone suggest my best course of action ? I was hoping those Non-Planar polygons would be in one area that I can easily fix but they are all over the model. Is there anything I can do to fix without deleting and redoing all of the geometry that is Non-Planar ?

i have attached the .lwo file if anyone would like to take a look at it.

Thanks.

Tim

nickdigital
11-20-2011, 06:21 PM
If this is for a game you probably need tri's. Why not just use the Triple tool on the object? That'll make all your non-planar polys split into triangles.



Is it normal for so many Non-Planar Polygons to be created when importing from Maya via. .obj ?


I don't think this is a result of the file being an obj. Just questionable modeling technique imho.

wtdedula
11-20-2011, 06:57 PM
Hi Nickdigital;
Thanks for your thoughts. Converting to tri's worked though I would have rather not done that. I don't know anything about Maya and I wonder if my student knew about it. I'll inquire.

Tim

RebelHill
11-22-2011, 10:45 AM
Any polygon that has more than 3 verts can easily become non planar if only one of those verts is offset from the plane of the others by even the tiniest amount.

So these polys are non planar in maya just as they were in LW (and would be so in any soft) as the planarity of a given poly depends upon the exact relative positions of all its verts. Dont forget, that this isnt just to do with the model at its base pose... as it deforms, and the verts move, then polys are gonna shift in and out of planarity anyway.

If you're going to a game though... then tris is gonna be what you want, since most game engine wont like non planars, and polys WILL become non plnar as a result of deformation... so tripling is the correct move for you.

Ofc, its best to have a model that is originally made to fit with the requirements of your specific game engine, rather than just tripling any ol quad mesh, but... well, there you have it basically.

probiner
11-22-2011, 12:31 PM
'Normal Corrrector' plugin made Non Planars go from 53 to 40. It can be indeed that the normal was not being calculated right, but... LW flags non-planars based on a threshold found in Options>General>Flatness Limit.

If you put 1000%, tada, no non-planars :p Maybe there is a difference in the Maya threshold and LW threshold, but they are in any case non planar.

If I put the Flatness limit to 0% LW flags 1217. And there nothing Normal correct can do here, cause all he did was make the polygons go under the 0,5% threshold. It just fixes wrongly calculated normals.

Sensei
11-22-2011, 10:58 PM
I am guessing that normal correction tool is just recreating polygon using different vertex as start. Polygon's normal vector is calculated from 1st, 2nd and last vertex.

Flipping polygon is doing the same- 1st vertex is untouched, 2nd becomes last, 3rd becomes last-1, last becomes 2, last-1 becomes 3 etc. Just reverse order of vertexes. As a result, polygon normal is going in -nx,-ny,-nz direction.

Surrealist.
11-24-2011, 07:39 PM
Converting to tri's worked though I would have rather not done that. I don't know anything about Maya and I wonder if my student knew about it. I'll inquire.
Tim

I think your student did a good job on the modeling. And as has been stated the non-planars are a result of the polygons simply being constructed off axis. In some cases this is unavoidable when modeing anything that is not a box or a auto-generated sphere shape as in "Create/Ball". As soon as you go off into more intricate or demanding shapes it becomes a chore to keep them planar.

This is a known issue and one of the drawbacks of modeling polys for rendering. Traditionally, tris is, and has always been the answer. This has been the case as far back as I can remember and I have been modeling since about 1993. Tripling is just part of the process. (unless you are using Subdivision Surfaces and it should be noted that with this technology tripling happens at render time)

And this in itself is one of the things your student would need to learn when bringing things into LightWave Modeler. The proof is in the rendering. If you get black polys then they're not planar enough to render. If it renders fine don't worry.

There are tricks to keeping some of these polys planar in LightWave Modeler. One of them is the Set Value command. (you could do this if you wanted on the base parts of the model). Another trick is the "Flatten" tool which can flatten the polys on the normal. This will work at the expense of setting adjoining polys off axis to their normal. But it can work in some situations.

Regarding game engines. I am not familiar with all of them. But I do quite a bit of work modeling for a company that is writing an app that uses the Ogre engine. All of the models on import triangulate any quads that are present. (either as a setting or as a default I am not sure) and it has been my understanding that most if not all game engines work this way. I could be wrong on this point and it very well may be that some game engines can use quads. But given that much of the technology in game engines involves deforming meshes, it is certain that tris are the only way for them to render properly. And as I understand it the process is for the modeler to provide a quad mesh and either triangulate before hand or it gets done on import.

All this to say, you should not feel as if your student did anything wrong or outside of the normal workflow - it is safe to say - since the beginning of CG 3D time.:)