MoI discussion forum
MoI discussion forum

Full Version: MOI mesh export issue

Show messages:  1-14  15-34  35-49

From: Michael Gibson
26 Aug 2024   [#35] In reply to [#34]
Hi rom, it looks like it might be more of a problem with fillets made in v5 where there is an unexpectedly large gap between the fillet surface and the cylinder surface.

So it may be fillets that need fixing up more than or in addition to the mesh exporter - I'm investigating it.

However as mentioned above if you set CentroidTriangulation=y inside moi.ini it should fix the mesh export for now, can you confirm that?

Sorry I didn't understand what you wrote originally!

Thanks,
- Michael
From: rom
26 Aug 2024   [#36] In reply to [#35]
after ini edit it looks way better, THANK YOU so much!
lets hope your investigation will deliver even more refined results

Image Attachments:
iniedit.png 


From: rom
27 Aug 2024   [#37]
OK here is another example default fbx export (MOI5, ini edit ON, hope it'd help in exporter polishing
numerous artifacts (long thin triangles fail to maintain the general fillet curvature)
Regards,

Attachments:
New folder.zip

Image Attachments:
Screenshot 2024-08-27 113519.png 


From: binfordboy
27 Aug 2024   [#38]
Hi Michael,
In 2016 in the old thread about centroid triangulation you wrote:

@metin, re:
> Michael, maybe it's a good idea to add the Centroid triangulation option as a checkbox to
> the mesh export options of MoI V4, to make it more accessible? Thanks in advance.

Yes, that sounds like a good idea to add for V4, if you can remind me about it again when v4 starts up I will add it in.

So i would like to remind you for V5 :-)
From: PaQ
27 Aug 2024   [#39] In reply to [#38]
@rom

Looks again like a vertex normal data problem on your side. That's the .FBX provided directly rendered in Houdini.
I know Max have hundred of options in the .FBX import dialog, there must be something about recomputing vertex normal's, or creating Smoothing Groups that need to be disabled.
The goal is the read vertex normals MoI's created.

Previously you said : `MOI's export preview is rather schematic and hides the bare truth`.

Actually that's not true, the mesh MoI display at export time should look exactly the same in your DCC viewport. If you see a difference, like dark shading area or ugly sharp triangle like you post above using the 'generic' display mode (opengl/directx/Vulkan), it's a good indication that something is lost in the import process, or something get mess-up after the import (vertex merging, attempt to reduce/edit the geometry, normals re-computing using an average method etc).

Image Attachments:
K01.JPG 


From: Michael Gibson
27 Aug 2024   [#40] In reply to [#37]
Hi rom,

re:
> (long thin triangles fail to maintain the general fillet curvature)

Low poly artifacts like that will just generally be what you can expect if you are trying to restrict polygon count.

The main way to make polygons adapt to the fillet's curvature better is to move the slider towards the right so it will have more subdivisions in curved areas.

I don't really understand why you refuse to do that?

For this case put in angle = 8 and divide larger than = 4 and that will make a much higher quality mesh for rendering at just 25k polygons for the whole object.

The defaults are generating just 3k polygons for the entire object, it's just not enough density for rendering quality on something that has tightly curved fillets.

If you want a higher quality result for the default, you can set Angle=6 in moi.ini , that should change what is used for the default angle.

- Michael
From: PaQ
27 Aug 2024   [#41]
Hello Michael,

I'm really hope I'm not wasting too much from you time. I'm rebuilding 'my own' centroid triangulation, and I'm wondering what's is the rule used to excluded large ngones form that process. MoI "centroid" doesn't do that horrible cap. Do you just skip it if ngones to process contains too many points ? I can also see that concave ngones can't be triangulate that way, are you exlcuding those one from the 'process' ?

Not super important, I'm doing 'stuff' very far from my comfort zone, but I'm kinda curious tho. !

Image Attachments:
Centroid.JPG 


From: Michael Gibson
27 Aug 2024   [#42] In reply to [#41]
Hi PaQ, there isn't a limit on number of points but it does a test that the centroid triangulation won't make a mess.

That happens in UV space and it's pretty simple. For every edge of the n-gon, make a triangle out of the centroid point and the edge points and calculate the signed area of the triangle. If the area is negative it means that triangle is reversed in orientation so don't do a centroid triangulation on that n-gon.

Signed area of a 2D triangle goes like this:

With 2D points K, L, M

XLK =   L.x - K.x;
XMK = M.x - K.x;
YLK =   L.y - K.y;
YMK = M.y - K.y;

signed_area = 0.5 * (XLK*YMK - XMK*YLK);

The sign will be negative if the triangle vertices are in clockwise order, positive if counter-clockwise.

ref:
A programmer's geometry pg. 62
Adrian Bowyer, John Woodwark
Page 62, chapter 4.1 "Area of a triangle"

You can leave out the * 0.5 in this case since it doesn't actually need the area, it just needs to know if it's positive or negative.

- Michael
From: PaQ
27 Aug 2024   [#43] In reply to [#42]
Oh nice, thanks for the explanation, I will try to apply that logic !
From: rom
28 Aug 2024   [#44]
@PaQ Hereby is fragment of MOI's (sic!) preview. Rotated triangles almost 90 degree are scattered everywhere. I can't blame my Max's importer here - Its a classic GIGO case.
The default fbx export settings delivers pretty high poly count, so we cant say its because of being low poly.

Image Attachments:
paq.png 


From: PaQ
28 Aug 2024   [#45] In reply to [#44]
Hello,

Sorry it's hard to understand what area/model you are pointing with that last screenshot. Since using centroid triangulation I can't find any of those 90 degree issue.

If I look at the previous issue in MoI, here's what I have using the default settings :



I can see a small issue (red area), but nothing like those black triangles and other ugly shading variation like you show in 3dsmax.




As Michael suggest, giving it a bit more room (lower angle, divide larger than) produce much better render mesh. Even if you can consider the triangulation not 'optimal', I can't find any glitches or visual imperfection looking at the shading view alone. This is exactly how my model look's like in my DCC, Moi doesn't hide or enhance anything.

Image Attachments:
_XP01.JPG  _XP02.JPG  _XP03.JPG  _XP04.JPG 


From: rom
28 Aug 2024   [#46]
@Michael Gibson

>>Low poly artifacts like that will just generally be what you can expect if you are trying to restrict polygon count.
The main way to make polygons adapt to the fillet's curvature better is to move the slider towards the right so it will have more subdivisions in curved areas.
I don't really understand why you refuse to do that?

Because I'm from Archviz field and usually my projects (hotels, malls, city blocks etc) contain **tens of thousands** entourage objects (which I'd like to make in MOI). even using proxies and forest packs we, Archviz monkeys, have to keep poly count discipline.
I attach a screenshot of a typical mesh from some good model maker. Notice 3-5 segments for a fillet, 16-24 segs for cylinder - no more. 24 segments for a fillet (your and PaQ's sujeestions) is not an option in my case,
https://storage.de.cloud.ovh.net/v1/AUTH_cfac7191c3a34a1e9648a2af88284d53/VP_Download_Mirror/catalogs/3D_MALL_EQUIPMENT_catalog.pdf

Image Attachments:
mall chair.png 


From: PaQ
28 Aug 2024   [#47]
Tweak first "Angle" and (optionally) "divide large than" to get a nice overall resolution on high curvature area (silhouette).
You can then use "Avoid smaller than" this remove excessive geometry in fillet area.

This alone will already produce a mesh lighter than the default angle 12, with better silhouette, and good quality surface.



A poly reduce in your DCC (according it preserve vertex normals) can be a last touch.


Left : default export value (6500 tris), Middle : "optimized" one using advanced MoI settings (4900 tris), Right : polyreduced-LOD (2440 tris).

I hardly see any difference, the middle model will handle close-up way better tho.

If you expect low poly game asset where every triangle "count", using a CAD mesher is probably not the ideal tool. Imho MoI provides a lots of control over the mesh quality with a comprehensible set of options, it's just the best for the task. I had no shame to produce game assets using it, even tho it was only for prototype content. But yes you have to give up on what you usually produce by manually poly modelling assets, as you don't have direct control over the topology.

Image Attachments:
_XP_02.JPG  _XP_03.JPG 


From: Michael Gibson
28 Aug 2024   [#48] In reply to [#46]
Hi rom, maybe I can detect these kind of n-gons and do some additional refinement just on them.

- Michael
From: rom
29 Aug 2024   [#49]
@PaQ thank you, of course I use it, and lately folks at Autodesk put lots of efforts to improve the Retopo modifier. There're hints that they will push it even further.
https://www.youtube.com/watch?v=qtj3rvL2pUI&t=161s
But its still doesn't mean Moi's exporter can't be improved :)

>>Hi rom, maybe I can detect these kind of n-gons and do some additional refinement just on them.
Awesome Michael, thank you for attention

Show messages:  1-14  15-34  35-49