Hi there, I am experiencing issues with the use of Boolean Nodes and the faces being flipped in exported .fbx files (I have seen the same in .obj files too). I have re-created a project and I have attached screenshots to demonstrate.
I did a quick test, exporting the result of the boolean operation as an OBJ and loaded that into modo90x. Works correctly that way. Yet, exporting as alembic of FBX creates that inverted face normal. I wonder if the problem is related to the polygon being an ngon? I also played with some other geometries (box+box) and always get an inverted normal with FBX/Alembic.
One solution could be to use the boolean outputgroups and transfer normal directions from the original geometry to those. But that's probably a case-depending solution.
Marc
--- Out of here. Being called a dick after having supported Houdini users for years is over my paygrade. I will work for money, but NOT for "you have to provide people with free products" Indie-artists. Good bye. https://www.marc-albrecht.de [www.marc-albrecht.de]
Yeah I just tried OBJ and it worked for me too. I'm pretty sure in the more complicated project where I first saw this, OBJ == FBX in this regard. I could stick with OBJ, however it gives the object the name “default” in Unity, which is a bit of a pain.
It looks like the Boolean node is working fine. It shouldn't need any brickering or triangulating in advance.
It looks like FBX requires a reversed winding order from Houdini, but that's being handled, (though there's a small inconsistency in vertex order when re-importing, but the winding is okay). However, from a few Google searches, it sounds like a lot of other programs don't support importing ngons from FBX, so they just show up as invisible. If you put down a Font SOP and export that, is it visible from either side in FBX Review or Modo?
modo is fine with importing ngons … it actually does import the ngon cleanly, but the face is flipped (you can flip it back or see it from the other side) - both in FBX and in Alembic. With obj the face is not flipped.
Winding order may well be a reason, but I would assume the winding is the same if you split the cube before the boolean … we could also have a look at it in Blender (which handles ngons fine as well), but since FBX Review seems to agree on the face looking backward … hmm … I don't see a “bug” as such in there, since ngons should be avoided anyway, but it sure is an interesting puzzle.
Marc
--- Out of here. Being called a dick after having supported Houdini users for years is over my paygrade. I will work for money, but NOT for "you have to provide people with free products" Indie-artists. Good bye. https://www.marc-albrecht.de [www.marc-albrecht.de]
After looking into this a bit more, FBX Review and Maya are fine with ngons and their winding order, but they're not fine with the bridge, i.e. the edge shared between primitive 78 and itself. They both skip that polygon entirely. If I explicitly split the polygon into 2 by adding another edge with PolySplit, it imports fine in FBX Review (and presumably Maya). I'm not sure on a good way to automate that, apart from triangulating any face that has at least two vertices sharing the same point.
We could probably use FBX's support for explicit hole polygons when exporting, though that could be complicated to get right. There'd be a lot of cases that interface wouldn't support, but it might be possible to get something to work for most cases. If you'd like that, feel free to submit an RFE for it. Alternatively, it might be easy to put in an option (presumably on by default) to triangulate any polygons that have the same point twice when exporting.