8th July 2018, 09:29 AM | #1 |
Junior Member
Member
Join Date: Jan 2018
Posts: 24
|
Generated AC3D objects - normals problem
I hope someone can help with this as its baffling. I'm making some AC3D objects programatically but when I load them into AC3D some of them don't work. I've followed the info about AC3D file structure but nothing seems to talk about this problem. By "not work" I find that if I texture them in AC3D some surfaces don't take the texture. I seem to be able to fix broken ones by doing lots of "flip normals" and "change vertex orders" but why should that make a difference?
I've attached 2 examples. One works one doesn't. The working one is actually almost identical to the broken one but I reordered the vertices very slightly. Broken Poly: https://www.dropbox.com/s/lqdz0bor0z...broken.ac?dl=0 Working Poly: https://www.dropbox.com/s/76jl4rnsx8...-works.ac?dl=0 All the objects I'm making have a top & bottom with matching polygon shape and sides composed of multiple simple rectangle surfaces. When texturing these objects the simple rectangles always texture correctly but the top/bottom poly shapes often don't. Help please ! |
8th July 2018, 04:23 PM | #2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Generated AC3D objects - normals problem
Your file generation looks great. From a quick look, I think the problem is that the first three vertices of the complicated polygons are an obtuse angle compared with the other vertices.This is forcing the normal calculation to be not what you want.
If you use Surface->change-vertex-order and then resize/undo to force normal recalculation (must fix the change-vertex-order code to recalc normals...) that should bring color back to those surfaces. Alternatively, triangulate, or divide up the large polygons. |
8th July 2018, 04:28 PM | #3 | |
Junior Member
Member
Join Date: Jan 2018
Posts: 24
|
Re: Generated AC3D objects - normals problem
Quote:
|
|
8th July 2018, 05:43 PM | #4 | |
Junior Member
Member
Join Date: Jan 2018
Posts: 24
|
Re: Generated AC3D objects - normals problem
Quote:
|
|
9th July 2018, 08:19 AM | #5 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Generated AC3D objects - normals problem
Yes - a convex polygon is fine. When you get a concave polygon, that's when the problem you saw can occur.
|
Tags |
.ac file |
|
|