Meshing Question

Next
 From:  Imensah
1723.1 
Hi Michael,
I have noticed every now and then while meshing certain shapes that some of the edges generated do not span fully along fairly uniforn faces. Is there a reason why these edges terminate and not run across the entire u or v span.
If i visualize the shape below as a nurbs object made up of 6 patches, i almost expect this shape to mesh in a manner that will have edges generated to echo where my u and v isoparms might be thus resulting in my meshed object having continuous edges that run to the boundaries of each patch...no?
It will save a lot of clean up time in render app. if broad surfaces like that could mesh without these short spanning edges. Will an option to force continuous edges in the mesher be a nightmare?




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
1723.2 In reply to 1723.1 
Hi isaac, there is actually a bug in the way that "avoid smaller than" was being handled for such things, if you send me an e-mail I can send you the patch to fix it up, although it still generally won't work for that purpose you want there, it is more intended to avoid heavy meshing on very small sized details instead of what you are doing there. So you probably don't actually need the patch, just don't use "Avoid smaller than" in this case really at all.

When you get terminating edges, it means that the surface is curving by different amounts.

Normally the meshing is based primarily off of curvature, with the angle parameter. If you want to get more regular meshing instead of curvature-based meshing, you probably should crank the angle parameter to be way looser (like say 30 degrees) and then use the "Divide larger than" setting to primarily drive the division. Since that is distance based it will not be as focused on changes in curvature like you are currently seeing. That will tend to make a much more evenly divided mesh in situations like you are showing.

If you'd like to post the .3dm model file it would probably help to make some more specific recommendations.

- 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:  Imensah
1723.3 In reply to 1723.2 
Thanks Michael,
I just created an irregular shape to make the the description more obvious. It is not an object i have any intention of using, although i had similar problems trying to mesh a similar shaped irregular object a few days ago and spent a while cleaning it up to make it a decent quad mesh for a c clark subdivision surface render test within xsi.

I have attached a sample model. Please let me know if you find any meshing settings or work-around for quad-meshing such curvatures.

Thanks
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
1723.4 In reply to 1723.3 
Hi isaac, here is an example of some settings that will get a more uniform mesh created across that object:



It's not always totally guaranteed to stop ending edges, but this combination of settings (bring angle looser and drive more off of "Divide larger than") can usually reduce such things by quite a bit.

This still does not automatically guarantee that all the surfaces will have a totally aligned quad structures where they meet at common edges. That's kind of a UV grid synchronization problem that I would like to try and improve in the future though.

A full "all quads only" mesh generation is a pretty difficult thing to do in general because it means tiling areas like holes with a pattern of quads that is not at all aligned to the UV structure of the surface. That's a much different problem than what MoI's current mesher does, it is going to be a while before I can make an attempt to dig into that totally different style of meshing.

- Michael
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:  Imensah
1723.5 In reply to 1723.4 
Cool!, I'll be sure to play around with the settings a bit more when i run into that again. I understand a quad only mesh for more complex objects is not practical;
Any improvement to prevent terminating edges in simple/broad areas will be great.
  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
1723.6 In reply to 1723.5 
Hi isaac, a few general settings to try are:

Try angle at 20, 25, 30, and also try a really big angle like 90.

Then try "Divide larger than" at around 2, 1, or 0.5 - the value you put here is a distance for what size you want your final polygons to be so the distance that you use here should be kind of relative to the size of your object, like don't put in a value that is 1/10000th the size of your object or you will get quite a lot of polygons.

You may need to try a few combinations of those different angles and lengths before you get one that really eliminates all terminating edges, it may not always be possible to get rid of all of them. But for example in your object you posted an angle of 25 and "Divide larger than" of 2 did seem to get rid of them all.

I would like to add a few more meshing options in the future to try and give some additional control over it.

- 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:  PaQ
1723.7 
Hello Michael,

I'm just have four questions about the meshing tool too.

1) The first time you export an object in a polygon format (.lwo .obj), the meshing tool is using a default settings value. (12° angle, weld vertices on, etc.)
With this default value it might already take quite some time to have a feedback, and most of the time I will change this value and this 'waiting time' is somehow lost.

So I was wondering if it's technically possible to show the actual settings used in the viewport in fact, as I suppose we already see a mesh version of the
nurbs model. That would give a first realtime preview of the mesh.

Of course keeping any new settings for the next export as it's working now it's just fine.

2) Running the meshing tool as a command without having to export my model would be a nice feature too (but maybe it's already possible ?) it helps me sometimes to check my model during my modeling process, ... maybe it's because I'm coming from polygon modeling school too.

3) Is the 'add detail to inflections' from the view option working a little bit like the 'avoid smaller than' from the meshing command ? (just by curiosity)

4) If question 1) is impossible to archive, having somehow a way to export the poly model as it is in the viewport, so without any extra meshing computing, would really
boost my workflow. This would help to really quickly export my model, even if it's a draft one, and allow me to make some quick preview in my rendering package, testing some materials etc.

Cheers

EDITED: 29 Jun 2008 by PAQ

  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
1723.8 In reply to 1723.7 
Hi PaQ,

re #1:

> With this default value it might already take quite some time
> to have a feedback, and most of the time I will change this
> value and this 'waiting time' is somehow lost.

The plan I have for solving this is to make it possible to interrupt the mesher if you enter new values when it is currently calculating. Most regular commands do work this way already, like if you are doing a fillet and it is taking a long time to finish, if you enter a new fillet radius it will automatically cancel the current fillet calculation and start a new one with the new radius.

Doing the same kind of thing for the meshing dialog should make this work a lot smoother, the meshing dialog is just different enough from a regular command that I have not had a chance to make that happen yet.


> So I was wondering if it's technically possible to show the actual
> settings used in the viewport in fact, as I suppose we already see
> a mesh version of the nurbs model. That would give a first realtime
> preview of the mesh.

The problem there is that the viewport/display mesh is actually created with a different meshing process than the export meshing. The display mesh mechanism is very oriented towards calculating a result very quickly and sort of errs on the side of creating denser meshes. The export mesher does a different job and does a lot heavier and time consuming calculations to make more efficient and evenly spaced meshes, it's oriented more towards mesh structural quality and not towards execution time like the display mesher is.

So it just won't work very well to show the display mesh as a temporary result, it is just not the same mesh that is created for export at all.


> 2) Running the meshing tool as a command without having to export my
> model would be a nice feature too (but maybe it's already possible ?) <..>

I do this frequently myself to test the mesher - to get this set up, create a keyboard shortcut with this as the command on it:

SaveAs c:\test.obj

Or use Export instead of SaveAs if you want to only do selected objects instead of the whole scene. Now when you hit that key, the mesher will fire up and after you have looked at the result press Esc or Cancel to bail out without writing the "test.obj" file.


> 3) Is the 'add detail to inflections' from the view option working a
> little bit like the 'avoid smaller than' from the meshing command ?
> (just by curiosity)

It's a bit different than that - it's an option to try and actually increase the density of a mesh, while the "Avoid smaller than" is trying to decrease it.

The way it works is that it will force additional meshing subdivisions to happen in areas where there is an "inflection point". That's an area where the surface is changing curvature from one side to another. Like on a curve that is "S" shaped, the inflection point is the middle of the S where the curvature swaps from one side to the opposite side. It can look nicer to have refinement happen in these areas, and part of the reason why the display mesher is faster than the export mesher is that it takes some shortcuts and can more easily miss refining some areas than the export mesher, this piece of the display mesher tends to help compensate for that and give some detail in little tight areas that can be kind of noticeably rough in shading when they are not subdivided enough.

re: #4 - I would like to add some mechanism for exporting the display mesh at some point, that is actually on the wishlist already. But it is not a very beautiful mesh structure, it is triangles only, tends to be quite overly dense than necessary, and currently has T-junctures on shared edges instead of completely matching vertices along edges.

- 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:  PaQ
1723.9 In reply to 1723.8 
Ok thanks for the explanations.

Be able to interrupt the meshing is indeed a more elegant method that what I was thinking.
and thanks for the shortcut, so simple :o)

For the #4, yes I can imagine it would be a really draft model ... maybe an 'hidden' command is enough I'm
not sure many people would be interested by exporting an ugly models. As I said it's just
to have a quickly preview of 'complex' object in my renderengine ... where I do care more about proportion,
volumes etc that perfect smoothing shape ...

But again if I can abort the meshing command and put some high angle option, it would be cool enough.
(or maybe be able to add arguments to the command, like SaveAs c:\test.obj -Output triangles -Angle 50 -Avoid smaller 4)

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
1723.10 In reply to 1723.9 
Hi PaQ,

> (or maybe be able to add arguments to the command, like
> SaveAs c:\test.obj -Output triangles -Angle 50 -Avoid smaller 4)

You can actually do this part now by using a script, for that put in this as the command name for the keyboard shortcut instead:

script:moi.geometryDatabase.saveAs( 'c:\\test.obj', 'Angle=45;Output=quads' );

You can put in different parameters with this method. Each parameter should be separated from the others by one semicolon.

// Different possible options:
// NoUI=true
// Angle=12.0
// Output=ngons | quads | triangles
// MaxLength=0.0
// MaxLengthApplyTo=curved | planes | all
// MinLength=0.0
// AspectRatio=0.0
// Weld=true
// Display=shadedwithedges | shadednoedges | wireframe
// ExpandedDialog=false

Except there is a glitch in v1 where when you cancel the dialog when running outside of a command like this, the cancel will actually get queued up and so every other time you run it in a row will get canceled, so the shortcut will only work on every other keypress. I have just fixed this up for v2 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
 From:  PaQ
1723.11 
that's fine for now Michael, thanks a lot I will give a try !
  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