I’m trying to import in UE4 an FBX containing a mesh exported from a proprietary software, using the FBX SDK 2017 in compatibility mode for FBX 2014.
When i do the import, UE4 tells me: “Error txe_export could not be created because all of its triangles are degenerate.”.
This is an example of one of my polygons:
Judging by those numbers: about one tenth of a millimeter.
Assuming that’s what preventing import, try scaling the model up in some external application, export the result to a new FBX and try importing that one. If it works, you can scale it back down again once safe and sound inside UE4.
However, for optimal realtime performance, you usually want to avoid geometry with such microscopic scales. Better to capture fine detail in a normal map.
thank you for replying!
i’ve tried scaling in my external application by 0.01, 0.1, 10, 100, with no luck.
Unfortunately I can’t edit the model in any way because it comes from architectural data, so i have no control on it.
are you supposing from my data that it is so?
it is not said that THAT polygon is degenerated, the culprit may be another one.
I would know how much a polygon has to be thin to be considered a degenerated triangle by Unreal.
I suspected it was some CAD-related source material. If not even scaling up by a factor of 100 helps, then I guess the problem isn’t related to polygon size… unless of course it’s a model with micrometer-scale detail.
Gotcha. And yes, it was mere conjecture based on the data you posted. Unfortunately I don’t know if Unreal has a hard limit or what it is, if that is the case. You could look into the FBX import code, but that’s a fairly nasty piece of source.
#define THRESH_POINTS_ARE_SAME (0.00002f) /* Two points are same if within this distance */
So that’s your answer.
However, when you uncheck RemoveDegenerates, the check is still performed but with a threshold of 0.0. This would imply that if you still get the same error message with that flag unchecked, it probably means that at least one triangle is truly degenerate, i.e. two of its points are exactly on top of each other.
i came to your same conclusion creating cubes progressively smaller; the one with 0.0001 edge was still imported, the one with 0.00001 edge gave me the same error.
then i tried to build and export a degenerated cube (a brick with 0 height):
[FONT=Courier New] FbxVector4 lControlPoint0(0, 0, 1);
FbxVector4 lControlPoint1(1, 0, 1);
FbxVector4 lControlPoint2(1, 1, 1);
FbxVector4 lControlPoint3(0, 1, 1);
FbxVector4 lControlPoint4(0, 0, 1);
FbxVector4 lControlPoint5(1, 0, 1);
FbxVector4 lControlPoint6(1, 1, 1);
FbxVector4 lControlPoint7(0, 1, 1);
this is correctly imported. maybe because not every triangle is degenerated.
but also my architectural model had not degenerated polygons!