Controlling Subdivisions of Curve on Export

Next
 From:  snookD
2986.1 
Hi,

Just doing a few tests.

I've created a simple object from three poly lines and an arc and then extruded.

On the default setting the curve consists of just three subdivisions and at it's maximum only eight?! Am I missing a crucial setting?



Many thanks.
Image Attachments:
Size: 218.7 KB, Downloaded: 91 times, Dimensions: 1920x1073px
Size: 220.5 KB, Downloaded: 77 times, Dimensions: 1920x1073px
  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:  BurrMan
2986.2 In reply to 2986.1 
WHat you are seeing are "N-Gons". MoI's mesher is Top of the line! If the program you are sending to reads these, you will want this. In that dropdown where you see the word n-gons, you can select Quads and triangles to see what you would normally expect. :O
  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:  BurrMan
2986.3 In reply to 2986.2 
Sorry, I think I mis-spoke. THere is a setting called "Divide Larger Than" if you want to dice it up more.

I should just shut my pie hole here!!
  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:  snookD
2986.4 In reply to 2986.2 
Hi,

I'm afraid you're missing the point. I understand all about NGons. What I'm querying is how the exporter deals with curves. In order to get any kind of detail on the curved area I have to set it to maximum. Therefore if the object had fillets they would be incredibly dense (for more than I would need) just to get a very basic density on the curved area.
  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:  snookD
2986.5 In reply to 2986.4 
Hey yep that worked. Cheers.
  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
2986.6 In reply to 2986.1 
Hi snookD, yeah the angle parameter (which is what is controlled by the top slider bar) is not so good to use as the only parameter when you have a surface that is pretty broad and large in size but only shallowly curved in shape.

In those cases putting in a value for "Divide larger than" will help to put in additional divisions without making more curved bits get too excessive.

It sounds like you have already figured this out, but you enter in a distance for the "Divide larger than" value, and it will make sure to divide any polygons larger than that. So for instance putting in a value of 1.0 will break up any polygons larger than 1 unit in size but not cause heavier meshing on things like small fillets.

- 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:  snookD
2986.7 In reply to 2986.6 
Hi Michael,

Thanks for getting in touch. I am also finding that using something like an arc I have to change the default viewport meshing angle from the default 10 to get a smooth line. This is also reflected in the standard export settings where I get one subdivision where the middle point of the arc is. Is this normal? It's as though moi isn't interpolating the arc.

If I then start to add booleans etc then I have to then lower the viewport mesh angle to 2-3 in order to prevent errors. The object exports fine so this is just a display issue and only occurs with the standard arc.

Tested on windows7 under parallels 4 + windows xp under vmware both with the same outcome.

If this is normal then is there a way to rebuild curves in moi?

Many thanks

EDITED: 14 Oct 2009 by SNOOKD

Image Attachments:
Size: 215.7 KB, Downloaded: 23 times, Dimensions: 1850x1033px
Size: 148.2 KB, Downloaded: 20 times, Dimensions: 1883x1029px
  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
2986.8 In reply to 2986.7 
Hi snookD,

> I am also finding that using something like an arc
> I have to change the default viewport meshing angle
> from the default 10 to get a smooth line.

It's actually best to just not worry about that.

Don't worry about trying to make the real-time display perfectly smooth, because if you increase the display mesh angle to lower than 10 it will tend to make an extremely dense display mesh in other areas and take up a lot of memory.

NURBS are rather different than polygons - if you happen to see some roughness in the realtime display of a NURBS surface it does not actually mean that the surface is necessarily bad or rough, you are just seeing the display polygons.

Later on when you actually export to a mesh file, that is the point when you can crank up the density and produce a denser mesh if you want, don't try to do it just for the real-time display.

In the future I do want to add in some additional control to the display mesh generation, but the roughness that you see there is only a display artifact, just ignore it.


> Is this normal? It's as though moi isn't interpolating the arc.

Yes, it's normal - like I mentioned previously, it is something that can happen when only using an angular metric to control subdivisions, when you have a surface that is somewhat broad in size but only shallowly curved.

For export you have that "Divide larger than" parameter that you can use in addition to the angle parameter to make it subdivided more. There isn't currently an equivalent for display meshing, so just don't worry about it for display meshing.


> If I then start to add booleans etc then I have to then
> lower the viewport mesh angle to 2-3 in order to prevent errors.

Those are not actual "errors" in the surface data itself, they are just glitches in the quick visualization of the surface that is displayed in the viewport.

The display mesh is more oriented towards generating a result very quickly rather than trying to make something that is as smooth as possible. The export mesher is more focused on producing a better mesh.


> If this is normal then is there a way to rebuild curves in moi?

There is probably no need to rebuild it - just do not get so worried about any imperfections in the display mesh. It's trying to give you a quick visualization of your surface and not a "final quality" mesh result like the export process does.

I can tell you more specifics about if your model should be rebuilt or not if you can post the 3DM file for it instead of only a screenshot, it is a lot easier to analyze geometry in a 3DM file than just an image.

But my guess is that you do not need to rebuild it, just don't worry about the display mesh so much.

- 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:  snookD
2986.9 In reply to 2986.8 
Hi Michael,

Thanks for the info. I've attached the 3dm file. In order to view this without viewport glitches I have to set it to a mesh angle of 3.

Thanks.

I've also attached a quick screenshot of what i see with the standard settings.
Attachments:

Image Attachments:
Size: 194.6 KB, Downloaded: 39 times, Dimensions: 1895x1054px
  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
2986.10 In reply to 2986.9 
Hi snookD, thanks for posting the file.

That one looks like a pretty different issue than the previous stuff.

The stuff to ignore in the display are slight jaggedy looking shallow curves, like the kind of stuff you posted here: http://moi3d.com/forum/index.php?webtag=MOI&msg=2986.7

In this new case where the display triangles are kind of "leaking" outside the boundary - that is a different kind of a thing. That is not normal and it may indicate some problem with the trimming boundary, like a self-intersection or tiny "curly-cue" type thing in the trimming boundary of some faces.

I'll see if I can figure out what is wrong in this case.

- 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
2986.11 In reply to 2986.9 
Hi snookD - your geometry in this case seems to check out fine.

It looks like you are running into a bug in the display mesher where it does not deal with the particular kind of shape that you have here.

You've got a thing that is "long but shallowly curved" + narrow here:



When converting to polygons, in a case like this it is possible for the edges to get converted to polygons with slightly different point spacing, which can then make the polygons have a self-intersecting trim boundary even though the true shape does not. Here's my quick attempt to illustrate it - you've got this kind of narrow boundary on the left but it is possible for it to get converted into some lines like the right, where things cross each other:




Once things cross each other it causes further problems with mesh generation.



At export time, you can get a proper export if you use "Divide larger than" of .1 units, that seems to give a proper export mesh generation.


It's not very good to put the display mesh generation way down to an angle of 3 though, unless you are only working on a smaller number of objects - it will generally cause a really really dense display mesh for objects so you can run out of memory pretty easily with it set to that tight.


I'd like to fix this up in the display mesher so it would look better. But it tends to be a difficult area to mess with - it is important for the display mesher to be very quick so that you don't have to wait all the time for meshes to be generated since they need to be recreated after every edit of the object. The more checking that is added to the display mesher will help to make these cases display better but also will tend to slow down the meshing process across everything. That makes it a delicate area to mess around with.

So anyway for now it is a display artifact to still ignore, but most of the time you should not be running into glitches as severe as this though.

- 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:  snookD
2986.12 In reply to 2986.11 
Hi Michael,

Thanks for all the info. Great help. Yep this is the first object that I've encountered these sort of viewport glitches.

Thanks again for taking the time to reply.
  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
 From:  Michael Gibson
2986.13 In reply to 2986.12 
No problem! Thanks for posting the file, this will be a great test case for me to work with when I get a chance to try and tune up the display mesher.

- 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
 

Reply to All Reply to All