Why is some geometry so poor

Next
 From:  Michael (MJV)
3533.1 
Hi. I am trying the demo and have run into a major issue. Why is it that some geometry is so poor? These fillets look fine in the standard Moi interface, but when saving as Obj or any geometry format, many edges show crossover geometry which produces horrible shading artifacts and is simply very disappointing. Is there some special trick to getting acceptable geometry to export?

Thanks,
Michael
Image Attachments:
Size: 112.6 KB, Downloaded: 197 times, Dimensions: 1156x557px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.2 In reply to 3533.1 
Hi Michael - if the shading looks different in the receiving application than it does inside of MoI, then most likely that receiving application is not reading in the vertex normals shading information from the OBJ file.

What application are you trying to import into, and what file format are you using for the transfer?


> Is there some special trick to getting acceptable geometry to export?

The only trick is to make sure the vertex normals are going through. Some programs may only read vertex normals if the mesh is structured a certain way like only if it has unwelded vertices, or only from certain formats. If you can give some details about what program you are transferring to, that would probably help me to be able to give you some advice.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael (MJV)
3533.3 In reply to 3533.2 
Thanks for your help but the problem has nothing to do with the receiving application. The posted screenshot is of Moi!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.4 In reply to 3533.3 
Hi Michael, it's a bit hard to tell exactly what you are running into just from the screenshot, could you post the 3DM model so I can actually examine the area that you are complaining about?

In that MoI screenshot I'm not able to see any of the horrible shading glitches that you were talking about, because of the wireframe display there obscures the shaded display.

Usually if the vertex normals are going through to the rendering program, even geometry that is made up of skinny triangles like that will not really have any shading glitches in your rendering, because the vertex normals that should be used for shading actually come from the original NURBS surface.

But if you are not getting the vertex normals come through during the import to the rendering program, and instead the shading is just getting averaged directly from the polygons alone, then that's the kind of thing that tends to create shading glitches.



If you are having a problem with the shape of the generated mesh and not shading, then that's a somewhat different kind of thing.

If it is a shallowly curved area and you want to have some more polygons created in that area, you will probably want to use the "Divide larger than" parameter to force the longer polygons there to be subdivided.

In the screenshot you show, you are only using the angle parameter to create the mesh. If you have an area that is only slightly curved it means that there is not much angular deviation there, so just the angle parameter alone doesn't really force it to be divided there.

For that kind of a situation, you can enter in a distance value in "Divide larger than", which will cause areas that have polygons larger than that length to be subdivided.


If it is just the fact that there are triangles there that is bothering you, you could switch the Output: parameter to be Output N-gons instead of "Output: Quads & Triangles" like you have it set in that screenshot. That will generate larger polygons that have a wireframe that more resemble the original NURBS geometry instead of having additional edges from the triangulation.


But if you could post the 3DM model, it would be easier to examine it and give you some specific advice.

Also if you are seeing shading glitches in your rendering program it would be a big help if you would say which one you are transferring into.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  steve (STEVE_HOME)
3533.5 In reply to 3533.1 
Hi Michael (MJV)

Try changing your "Angle" to 12/15 deg, then add an entry to the "Divide larger than" of 12 deg on "curved"


Here is a quick example of the change in mesh created:-


With Angle set at 8deg:-



With Angel at 15 and "Divide larger than" set at 15 "Curved"




Then experiment.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael (MJV)
3533.6 In reply to 3533.4 
Thanks so much for the thorough and speedy response. I have read that you are the developer of the program and somewhat of a genius. It is very kind of you to answer my questions. I think the problem is that I come from a SDS modeling background and this kind of geometry for me is hard to accept. The fact that is isn't editable in the Cinema 4D where I will finally use it is one thing, I can accept that, but to see these crossover polys and the the shading errors they create right in Moi is disappointing to me. Your solution just seems to localize the problems to smaller areas.

I've attached the 3dm file here.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.7 In reply to 3533.6 
Hi Michael - just a quick note - you should not generally expect to use the geometry out of MoI as the input for subd smoothing.

Sub-d smoothing is very sensitive to the topology of the polygons. MoI's output is more intended to be used for rendering. It would take something more like "artificial intelligence" to try and replicate the human judgement and experience that is used by people making sub-d friendly topology.

So if you were expecting to have sub-d topology just automatically generated, that's just not really going to happen. Your expectation there is just way out of line with reality, it is not really feasible for MoI to reproduce things that require human intelligence like that.

However, you keep mentioning "shading errors" - that's something that you should definitely be able to get rid of pretty easily.

Also if you are using Cinema4D, it has good support for n-gons so you don't need to generate any triangles like you are doing.


Thanks for posting your model, I will examine it and try to give you some advice.

- Michael

EDITED: 12 May 2010 by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.8 In reply to 3533.6 
Just one other note on sub-d smoothing - if you do want to take the output from MoI and produce subdivision from it, you'll generally need to use a retopologizing tool to reform the polygon structure to make it suitable for that.

Try topogun or 3D-coat for that.

Those generally still require some user interaction to make a nice topology but they have a lot of tools set up to make it go pretty quickly.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael (MJV)
3533.9 In reply to 3533.7 
Yes, I never expected to use it as input for smoothing. I knew that little going in from having some very brief previous experience with Rhino. The thing I am really concerned about is these polys that are crossing each themselves and creating shading errors that can be seen right in Moi. See attached image:
Image Attachments:
Size: 91.4 KB, Downloaded: 106 times, Dimensions: 1272x680px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.10 In reply to 3533.9 
Hi Michael,

> The thing I am really concerned about is these polys
> that are crossing each themselves and creating shading
> errors that can be seen right in Moi.

Those polygons are not actually crossing each other, you're just seeing a typical artifact from a rougher amount of polygons.

Those are some long skinny n-gons that are getting triangulated with a "centroid" point in the middle. You're seeing the difference in shading between the points at the far left and right sides of the n-gon as opposed to the point in the center.

If you use "Divide larger than" as I mentioned previously to divide those up some more it will go away.

Also if you use Output:N-gons you probably won't even get that "centroid point" in the rendering in Cinema4D.


Earlier you wrote:
> Your solution just seems to localize the problems to smaller areas.

Keep in mind that polygons are actually flat things, it's only due to some rendering tricks that they are given the illusion of being smooth.

If you don't have very many polygons, that illusion tends to be broken....

That's just a fundamental thing about polygon rendering in general - it's a normal thing to reduce those artifacts to smaller areas, that's just how rendering polygons works! :)

Also another thing to keep in mind is that realtime displays as generated by your video card tend to take some additional shortcuts which make additional artifacts.


Anyway, for your shape here it is the shallow curvature of that bent fillet which makes it get a kind of rough amount of polygons.

Just add the value 1 in the "Divide larger than:" box, and there will be absolutely none of those shading artifacts remaining:





- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.11 In reply to 3533.9 
And here's what it looks like imported into Cinema4D.

If there's a shading glitch, you're going to need to help me find it, as far as I can tell it is completely glitch free:





And rendered:



I've also attached the OBJ file if you want to test it yourself.


I think you were getting confused about some rough low poly artifacts, when you have a rougher amount of polygons, with triangles connecting from the outer edges to a center point with different shading at each of those points, that looks like what you were thinking was "crossing polygons".

They were not crossing, you were just seeing too much difference in the shading of those vertices being spread across a long polygon.

- Michael

EDITED: 12 May 2010 by MICHAEL GIBSON


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WillBellJr
3533.12 
I purchased Cinema 4D specifically because it's is one, if not the best program available for importing MoI objects.

If you're using MoI v2 with the new shading features, be sure to install the Riptide plugin so those surfaces get imported properly.

I typically use MoI strictly for mechanical models - NURBS modelers don't usually create surfaces are are SDS friendly, so subdividing them will mostly always end up showing artifacts due to the polygon topology.

Without using subdivision, your models imported into C4D should look exactly the same as they do in MoI.

-Will
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  PaQ
3533.13 In reply to 3533.11 
Hi Michael,

Still at my job here so I did a quick reading, but isn't the kind of artifact also visible when the famous 'centroid' option is on . I remember having this kind of shading errors when exporting triangles mesh for octane, and you told me to disable the centroid options in the .ini files, ... it completely fix the problem indeed.

http://moi3d.com/forum/index.php?webtag=MOI&msg=3386.24

(EDIT - tweaked the link - the one here was accidentally a link to the message reply button)

EDITED: 13 May 2010 by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.14 In reply to 3533.13 
Hi PaQ, yeah, it is related to the centroid triangulation method, in combination with a low number of polygons being generated.

That centroid triangulation method can be disabled in the moi.ini file under:

[Mesh Export]
CentroidTriangulation=n


However, if you have enough polygons being generated (so that there aren't areas with a sudden shift from one polygon to the next), and your renderer is using the good vertex normals, then the artifact will go away even if centroid triangulation is enabled.


The centroid triangulation method means to convert an n-gon into triangles when possible by connecting all the n-gon's outline points to a center averaged point.

In a lot of circumstances it actually makes for a nicer triangulation, here's an example, meshing this face:



With the centroid triangulation method, a centroid point is added and the points from the outside all connect to it, making a nicely symmetrical and radial type triangle arrangement:




Compare that to the non-centroid triangulation method here, where no internal points are added and instead triangles are only connected up between the existing points of the n-gon:




However, there are some cases where adding in the centroid point causes problems.


The centroid point gets its own vertex normal, and if you have a kind of long and skinny n-gon it's possible for the centroid point to have a fairly different shading applied to it than to the outer points, that's what creates the kind of shading problem that was originally shown in this thread. It can be especially noticeable if some neighboring n-gon was actually a quad and so did not get any centroid added to it, so it only has shading vertex normals at the far points of the quad.


The other kind of thing that can be bad when trying to generate a low polygon output is if the centroid point pops out a fair distance from the other points (because the centroid point is actually evaluated to hug the true surface, it's not actually just a direct average of the other points.


I can probably make some refinements to the centroid triangulation in the future to disable it some of these situations where it is not so good, like maybe not do it on n-gons that have a wide aspect ratio.

But if you have used some other settings like "Divide larger than" to avoid too rough of polygons it won't be a problem.


The centroid point issue is also moot if you export using n-gons which for the original poster of this thread would be recommended since they are going into Cinema4D.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  FlashFire
3533.15 In reply to 3533.14 
I would very much like to see centroid or any export refinements. I think any refinements like these would continue to keep Moi
at the forefront of technology. And yes riptide has helped.

Chris
Flash Fire Designs
http://www.flashfire.com/
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3533.16 In reply to 3533.15 
Hi Chris, the centroid stuff only applies to triangulated output though.

If you're using Riptide and Cinema4D, you don't actually need to generate triangulated output, you can generate n-gon output instead.

That is set with the "Output: N-gons" option in the dialog that shows up when you export from MoI to OBJ format.

Centroid triangulation (or any triangulation) will not happen when you export to n-gons, it keeps many sided polygons intact and does not convert them into triangles when you use that option.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  nycL45
3533.17 
Interesting as always. Solution plus education. No time but a must read. L
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WillBellJr
3533.18 
Yes, always use ngon exports for the cleanest exports from MoI.

The only time you wouldn't use ngons is if your target app doesn't support them (like ZBrush or game engines for example).

In those cases crank up the polygon counts and use Quads/Tris or just Tris and be on the lookout for long/skinny polygons...

-Will
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 3533.19 deleted 26 Sep by 3IMAGE
 

Reply to All Reply to All