Tangent space can't compute ngon faces


#1

When I decided to use Armory in collaboration with a commercial project, I noticed a simple bug that can be very annoying.
Each time I wanted to compile the scene this error came up:


This means that i have to add the triangulate modifier for alot of objects, and even then it wont compile.
I managed to get away by going to edit mode and triangulating all the meshes, but it may be harder than that in bigger projects.
I hope this bug gets fixed soon,

Peace,
-Parsa/Jamie


#2

Yes, that is due to triangulation needed - Although instead of manually triangulating each mesh, you can just add the triangulation modifer to the objects, as these are added upon export.

Although if you’ve a lot of objects, even adding the modifier can be a lot of work. - Until this is somehow added in Armory, you can script your way out of it, running something like this should probably work in the meantime:

import bpy

for obj in bpy.data.objects:
    if obj.type == "MESH":
        modTri = obj.modifiers.new("Triangulate", type = "TRIANGULATE")
        bpy.context.scene.update()

#3

Decimate?
… Intresting choice!
Will look into it.


#4

Sorry, meant triangulate - Fixed the script


#5

This would be a good thing to put into the Armory addon.


#6

There is actually an open issue somebody was having with the triangulation. Apparently it is supposed to triangulate it on export:


#7

on the original GitHub report Lubos replied:

The meshes are triangulated on export, so this is likely a weird bug.

Maybe the code is removed in the latest 0.6 graphics updates, so the only way of implementation is to currently use Naxela’s source or just wait.
Cheers,
J