View Full Version : Fix Polygons tool

11-20-2008, 04:36 AM
With LW 9.X raytracing cameras came a lot more intolerance to slightly non planar polygons, or slightly broken one's. Also multiple edits... booleans, cuts, slices and complex merging can result in broken polygons:

Quite often you don't even know a Polygon is 'broken' until you render, which if it's a multi-million poly complex model, and it's small, might not become manifest till you finish the render!

The simplest way to 'fix' such broken polygons is to select them, triple them, and merge them. Trouble is on a very complex model, that's extremely time-taking! It would be nice to have a tool which went through every polygon and performed that operation in sequence. I wouldn't care if it took an age to run! It's quite possible a simple Lscript could be written to do that, but I have no idea how to code :D

11-20-2008, 04:55 AM
Oh, so that's an internal LW tool then is it? :p

11-20-2008, 01:01 PM
Oh, so that's an internal LW tool then is it? :p

I consider it to be because I probably wouldn't use Lightwave without it.

11-20-2008, 01:30 PM
I consider it to be because I probably wouldn't use Lightwave without it.

Whilst I wouldn't go quite that far, I have to say, it rocks my world. :D

11-20-2008, 05:54 PM
Whilst I wouldn't go quite that far, I have to say, it rocks my world. :D

I just say that because after I spent some time with XSI earlier this year, LWCAD 3 pretty much convinced me that I needed to upgrade my older version of Lightwave.

11-21-2008, 10:45 AM
So a way to find non-planer polygons (maybe with a user set tolerance) and then select those? Wouldn't it use some way of determining the direction of the normal to the relation of 3 verts at a time? After that you could either examine them and see if they could be manually corrected or triangulate them.

Probably would take for ever though...but maybe it could be "smart" some how and not check triangles etc...

11-21-2008, 10:58 AM
Why you do not use the "+ - Non-Planar" from the Statistics (w) panel to select the non-planar polygons, then press '=' to hide everything else.

That will speed up your display and then you can decide which ones you triple or not?


11-21-2008, 11:13 AM
sorry to explain I am not talking about nonplanar polygons, I am talking about 'broken' polygons, they are not the same thing at all! :)

a slightly non-planar won't cause an issue with the renderer, it's the polygon's who's point order has got broken and they simply don't render.. often in openGL you see them go black or their normal pops out a a completelly weird angle to the normal. Sometimes however they are invisible! :)

11-21-2008, 12:46 PM
You mean those polygons you get from sloppy modeling?

11-21-2008, 01:39 PM
What sloppy modelling? Select a an edge, select cut or connect, select a few more in turn.. oh look the polygon flips and flips back, then turns black and the normal freaks out. Sometimes it's really obvious a polygon is 'broken' and sometimes it's not, but it's got nothing to do with 'sloppy modelling' and I rather dislike the insinuation it's due to incompetence :p

Regular old modeller tools, not from third party, break polygons, and regularly for me, especially on Ngons, so I don't think it's a lot to ask for a tool which is native which also fixes them!

11-21-2008, 03:36 PM
Sorry, that was rude of me. Sometimes ya have those moments.

I guess I just don't really understand what it is you are talking about, I never seem to have that issue, whenever I do get black polygons it is because of something sloppy that I did, and they are usually relatively easy to fix.

11-21-2008, 06:35 PM
I've had polygons that are broken and they were not a result of sloppy modeling. I used to just think they were made from ngons with lots of points, its usually when it happened but since then I've had even 4 point polygons go black on me and I couldn't see a reason for it. The were all on the same plane, selected in order to create the polygon and there were no duplicate points. Fortunately, fix polygon tool in LWCAD is always there for me for those rare occasions.

11-22-2008, 05:29 AM
No problems :D

Not having it, does the fix polygon tool fix '1' polygon you select, or is it a mass model fix tool, as that's what I wanted.... I can fix one lone polygon :D

I just hear this from a lot of my friends, and have seen it myself that the new cameras have a lot more intolerance for what appears to be a perfectly fine polygon, but is in some way 'broken'... It renders fine in classic cam, but doesn't in perspective, and the model looks 100% fine in OGL.. That said I have sometimes spotted flipped polygons in layout that weren't there in modeler, the downside of slightly different engines! :)

Hunting and fixing 20 random ngons on a massive 500,000k model, after setting away a 9 hour render is a downer! :D

11-22-2008, 10:00 AM
can you post a sample object of what you are talking about?

11-24-2008, 12:47 PM
Make a polygon where the 1st, 2nd and last point lie on the same line.

11-24-2008, 01:57 PM
Oh and there's the perennial favourite of the 3 point quad, where you merge 2 diagonally opposite corners :D

Ok here's a particularly annoying example...

In this pic -> http://www.3dghetto.com/tobian/cargo-test70001-icon.png (http://www.3dghetto.com/tobian/cargo-test70001.png)

If you look on the orange bits, there are thin slivers which appear to have disappeared, caused by slightly broken polygons.. they were not non-planar, they displayed fine in OGL and were not black or showing any kind of funky normal.... but they rendered incorrectly. So I manually went in, tripled them, merged them and... they worked fine afterwards... Now in this case I was able to use photoshop to remove the errors, rather than spend another 5 or 6 hours re-rendering that shot! but the point is those errors were invisible to any other feature, other than renderer, and certainly impossible to see in the tiny preview window of the render... Also note there are a few holes in the mesh's alpha channel, even though all of those polygons look 'fine' and were perfectly normal quads/ngons.

Bleh :)

So rather than find out your model has invisible polygon errors, I just want a tool that will 'mass fix' all the polygons.. bearing in mind that there are over 500k polygons in that section of model alone, doing each one by hand, in sequence would be mind-numbing! :D

11-24-2008, 03:17 PM
Would you be able give us a small part of model containing those bad polygons with everyhing else removed? I'm curious to find out what is wrong with them and why they do not render.

11-24-2008, 03:33 PM
Unfortunately, in that case, no, I fixed them all already :) if I stumble on any others, I shall upload them, but I haven't been doing much rendering recently, mostly modelling :)

11-24-2008, 03:49 PM
Interesting, yeah I'm really curious to see the mesh, you don't save increments? On an unrelated topic it seems like you could drastically reduce your poly count on the orange beams though, if that little missing sliver is a single row of poly's then you have way more then you need. :)

11-24-2008, 04:17 PM
Yes I do save increments, just not for every polygon edit. :D I keep a tight regime of back ups too, I don't intend to loose that much work, trust me :D That pic is from a few months ago, so I don't have a clue if I do have the polygon pre-error :D The most odd thing is of course, I've rendered it before on pre advanced cameras, and it worked fine :)

Here's a screen shot of the area. In a few places I sliced across horizontally to make sure the error didn't happen again, as well as selecting, tripling and merging each face to be sure :D

A few things have changed in that area, since that render too :) But the topology of the girders have been there since probably about LW 7 LOL.