Pure awesomeness

Next
 From:  F.ip2 (CEKUHNEN)
5880.1 
Michael hands down!

I am deeply impressed with the NGON mesh export quality of MOI. It is such a joy to get clean simple mesh for texturing!

I read that on the Modo side people have some issues with rendering NGONS and maybe for curved surfaces those render engines are not very well optimized.
Blender recently got NGON support as well and in most cases it works actually very well. Only when using reflective materials sometimes shading artifacts seem
to emerge.

In MOI the shaded preview is butter smooth so I assume that probably the issue is here with Blender and how it handles vertex shading.

Out of curiosity, being an artist not a programmer, do you have any explanation why in the host applications the mesh always seems to be that much better
compared to the render engine?

I have attached an image here that shows the issue with NGONs and also when I triangulate the mesh. Do you have any advice to combat that?

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
5880.2 In reply to 5880.1 
Hi F.ip, that's a general problem with Blender, unlike other renderers Blender just totally ignores vertex normals that are present in OBJ files, and instead calculates the normals just from averaging surrounding polygons. With CAD data it's important for the vertex normals that are stored in the file (which are very accurate and come from the original NURBS surface), to be used for the shading rather than trying to make an approximation.

This is a major limitation of Blender and it basically makes Blender not very suitable for rendering CAD data. Pretty much every other renderer that I have seen is able to read in vertex normals and use them for shading.

See here for some previous discussions on this:
http://moi3d.com/forum/index.php?webtag=MOI&msg=4272.1
http://moi3d.com/forum/index.php?webtag=MOI&msg=4515.3


> Out of curiosity, being an artist not a programmer, do you have any explanation why in the
> host applications the mesh always seems to be that much better
> compared to the render engine?

It's because the render engine is not using the same data as the host application - the display in MoI is using the real vertex normals to do the shading, that really helps with CAD generated data to make the shading look exactly the same as the true surface. Blender just skips over that particular data in the file and does not bring it in and use it for doing its rendering and with CAD generated data where there tends to be a mixture of different sized polygons in it and with large flat areas and things like that, it just does not work very well to try and create the vertex normals for shading only by averaging polygon faces, usually evidence of the polygon structure will become visible when doing that.


> I have attached an image here that shows the issue with NGONs and also when I
> triangulate the mesh. Do you have any advice to combat that?

The main advice is unfortunately just not to use Blender for rendering your MoI objects since it just lacks this basic function of reading in vertex normals. Pretty much any other renderer would produce better results for you. When the vertex normals get used those artifacts will totally disappear.

This limitation in Blender isn't as much of a big problem when working with organic sub-d geometry where the polygons are basically all fairly evenly spaced and don't have things like some big flat planar area next to a tightly curved fillet like you can have with CAD generated geometry.


It's been a big problem in Blender for a long long time now, it's really unfortunate that they are so far behind every other renderer in this fairly basic area. Maybe the more people that ask the developers about it will help get it bumped up in priority to get fixed in Blender.


- 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:  F.ip2 (CEKUHNEN)
5880.3 In reply to 5880.2 
Hello Michael,

that is what I feared. Fortunately it is in most cases post-pro in photoshop can help.

Would this in theory than also mean that in Modo you should not edit the mesh or work with it or would Modo now
handle the vertex shading data the same way as MOI. There were many posts of users having issues inside Modo.

I did a test with STL meshes, and noticed that the same issue persists, however the RHINO model comes in fine only
with few mini issues. Does Rhino prepare the STL model differently? I am just asking because I am genuinely interested
in understanding what is happening behind the scenes.

I noticed that also for wood shell texturing the UV layout MOI produces is fantastic as one can see with this
beautiful wood grain flow.





Claas

EDITED: 11 May 2013 by CEKUHNEN

Attachments:

Image Attachments:
Size: 223.3 KB, Downloaded: 18 times, Dimensions: 846x564px
  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
5880.4 In reply to 5880.3 
Hi Claas,

> Would this in theory than also mean that in Modo you should not edit the
> mesh or work with it or would Modo now handle the vertex shading data the
> same way as MOI.

You have to be in "item mode" when you're transforming the mesh in Modo, you can't move individual vertices around or else you won't be able to keep using the vertex normals map.

Also occasionally Modo may have a problem with triangulating certain complex n-gon shapes, in some situations it can end up making a thin slivery reversed triangle along certain sides of certain n-gons. If you run into that issue then you can instead export that particular model as "Quads & Triangles" out from MoI and that will use MoI's n-gon triangulator instead which can do a better job since it is optimized to try and avoid making degenerate triangles when it converts an n-gon into triangles. It's pretty unusual to need to worry about this though.


> I did a test with STL meshes, and noticed that the same issue persists,
> however the RHINO model comes in fine only with few mini issues. Does Rhino
> prepare the STL model differently? I am just asking because I am genuinely interested
> in understanding what is happening behind the scenes.

Most likely the same artifacts are happening on the Rhino generated mesh, but you probably generated a more dense mesh from Rhino with smaller polygons in it. When you make smaller more evenly sized polygons it can help to reduce the shading artifacts from this problem, but it will not totally eliminate them. But basically the artifacts will be more localized to smaller areas of the object rather than stretching across large areas.

You should be able to replicate the same kind of result out from MoI by using the "Divide larger than" setting to make your output mesh diced up into smaller more even sized polygons rather than having some polygons in it that may stretch a long ways across the object. You put in a distance for "Divide larger than", and any polygons larger than that size get subdivided. So for example if you have an object 10 units across try putting in "Divide larger than" = 0.5 and that will dice the generated polygons up to be smaller than 0.5 units in size.

That's not really a complete solution though, there still will be problems that will be particularly noticeable if you are using reflective materials or doing close-up shots. Again I'd really recommend using a different renderer that can use vertex normals, it makes for a much higher quality smooth shading when the proper vertex normals get used. Blender is the only rendering program that I know of that is not able to use them.

- Michael

EDITED: 11 May 2013 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:  val2
5880.5 
F.ip2

If you want to use blender as the rendering engine it is doable. I'm attaching some images to look at. It is as Michael says you will need to play with the exporter settings. the middle object is just exported out at default values (Angle: 12 as Ngons) The one on the left is (angle: 3 divide larger than: 1 all avoid small than: .05 Ngon)
the one on the right is (angle: 3 divide larger than: 1.00 all, avoid small than: .05 quads and triangles) all OBJ
you will notice on the render there are artifacts on the NGon object to the left but on the object on the right they don't show up. I have found the Quad and tri to be the most reliable.


Cheers

Val








http://www.suburbanartworks.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:  TwinSnakes
5880.6 
Blender is FINALLY going to address the custom vertex normals issue. It's a 2.68 release target (among other features), but hey, its at least on their radar.

http://lists.blender.org/pipermail/bf-committers/2013-May/040144.html

Since this is a going to be a 1st class feature (not a 3rd party effort), it should meet everyone's needs.
  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
5880.7 In reply to 5880.6 
Hi TwinSnakes, wow I hope they're able to hit those target features for 2.68, that would remove a big source of problems for rendering CAD models in Blender!

- 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:  F.ip2 (CEKUHNEN)
5880.8 In reply to 5880.7 
I am really curious about how the Blender normal improvement will work out.

I noticed with a different model that the shading artifact is there because of a rough geometry.
In general the NGON exporter for this shell works extremely flawless.
Just those corners have issues. As marked in the image adding more geometry and then also
moving the vertices so the flow / surface continuity is better extremely helps with removing
the shading artifact which in this case is simply because of some choppy and impossible to shade
smooth parts.

Michael is in such a situation it possible to have the side shells mesh as is but have more subdivision
along U or V of the edge rounding geometry so that the mesh flow between sides and edge is more
consisten?




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
5880.9 In reply to 5880.8 
Hi Claas,

> Michael is in such a situation it possible to have the side shells mesh as is but have more subdivision
> along U or V of the edge rounding geometry so that the mesh flow between sides and edge is more
> consisten?

It's unfortunately quite difficult to have the mesh created as if it had human judgement about where to place vertices.

In the general case there is not necessarily any special U/V alignment between different surfaces, start drilling some holes through your blend areas and you can easily see what kind of general geometry the mesher has to be able to deal with.

It could be possible in the future to have special case handling of certain situations, but they have to be detected and categorized properly and it's not easy to do such things.

- 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:  F.ip2 (CEKUHNEN)
5880.10 In reply to 5880.9 
Hi Michael,

I fully understand I was just curious. The hand adjustment of the mesh can often fix some of the bad artifacts while this way maintaining also a less dense polygon mesh for rendering.
However if time is an issue I tried out the edge settings and those problems often disappear once a certain mesh density is reached and the surface flow is amazing - just the file size increases.

But this is both fully workable, NURBS to render polygon is just a matter of making trade offs before your lock up your computer because you ran out of ram, hahaha

Happened to me twice this night.


Thanks again for this wonderful mesher!

How complex is actually the math behind this? I can only imagine that this must be an incredible tough job to translate a NURBS data into a polygon mesh.
  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
5880.11 In reply to 5880.10 
Hi Claas,

> The hand adjustment of the mesh can often fix some of the bad artifacts while this way
> maintaining also a less dense polygon mesh for rendering.
> However if time is an issue I tried out the edge settings and those problems often disappear
> once a certain mesh density is reached and the surface flow is amazing - just the file
> size increases.

If the proper vertex normals are used, it's a much different situation and even quite rough low polygon count meshes don't have these particular kinds of shading artifacts, then you only need to make heavier meshes to make silhouettes less pointy.

So again I really recommend using a renderer that supports vertex normals importing, which is basically any renderer at all except Blender currently. Hopefully Blender will be able to hit that target in their planned update, it will really make a significant difference in render quality when rendering CAD data.


> How complex is actually the math behind this? I can only imagine that this must be an
> incredible tough job to translate a NURBS data into a polygon mesh.

It's a quite complex overall process, especially with making things making things to be able to work with all kinds of geometry.

This one particular area of mesh generation is probably the single most time consuming individual feature area that exists in MoI, I'd say about 8 or 9 months of full time work has gone into just this one particular area alone. But it's resulted in a quite unique mesh generator, other NURBS meshers do not natively generate n-gons like MoI does and instead connect interior mesh vertices to edge boundary ones using triangles and it's easy for that triangle connection area to be kind of messy. Not just in topology but also in shape as well, like with Rhino the edges get meshed to certain tolerance settings, and the underlying surface gets subdivided to certain tolerance settings but then when the outer edge boundary vertices get connected to the interior "underlying surface" vertices, those connector triangles can cross too large of an area and form a kind of divot in the mesh , basically the triangle connection pieces easily go out of the tolerances that were used for other parts of the meshing, making a visible indentation in the mesh shape. There are quite a few people who use MoI just for mesh generation to go from other CAD programs into polygon data because of this.

- Michael

EDITED: 15 May 2013 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:  F.ip2 (CEKUHNEN)
5880.12 In reply to 5880.11 
Thank you for all the help and explanations.
  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:  YHWH_777
5880.13 
Does anyone know if vertex normals have been fixed in Blender?

If so, what version of Blender? And can someone please post a URL where I can read about this?

Thanks...
  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
5880.14 In reply to 5880.13 
Hi YHWH_777,

> Does anyone know if vertex normals have been fixed in Blender?
>
> If so, what version of Blender? And can someone please post a URL
> where I can read about this?

I think the latest thing I've heard is that vertex normals are not discarded when you render anymore so that part is fixed. But I think you still have to make modifications to the importer in order to actually get them read in.

The latest discussions I know on it are here:

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

http://www.blenderartists.org/forum/showthread.php?299193-Modified-OBJ-Importer-for-Custom-Vertex-Normals


- 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