Surface normal in a mess when exporting

Next
 From:  Gep
4602.1 
Hi,

I'm very new to MoI (and very pleased with it), and i have a big issue : i have done a building in MoI but when i export it to modo (either in lwo or obj), the surface normals are in complete mess. I have tried deleting the surface normal map, i have run a polygon align tool, but it does not change anything. The building is 52000 polys, full of bevels and the faces are separated on export to avoid artefacts, so it is absolutly impossible to repair it manually. I have about 30 buildings to do and i'm quite stressed by now...

Anybody could help ?
Thanks in advance.
  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:  Frenchy Pilou (PILOU)
4602.2 In reply to 4602.1 
maybe take a look aout the Plug about LWO for Blender ?
http://moi3d.com/resources
  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:  Frenchy Pilou (PILOU)
4602.3 
Another tracks : does every volumes are "solid" and some are not "surfaces"?
(Manifold or no manifold)
  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:  Gep
4602.4 In reply to 4602.3 
Haha, Pilou is everywhere... Hey i posted here to have a different opinion than on the french forum !!
Thanks Pilou, as i said in french, i indeed cut all unneeded surfaces, so my solids are no more solids. I'll try making them solid again.
  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
4602.5 In reply to 4602.1 
Hi Gep - if you could post a sample model of some small piece your model that does not work right, or even a screenshot of what you are seeing that would definitely help, because I can't really understand what you are seeing by just the description of a mess.

One thing to watch out for is if you do any transformations to the objects after you have imported them into Modo, make sure you are in "item" mode when doing the transforms.

Otherwise if you do something like transform all the vertices Modo does not transform the vertex normals in that case and you end up with a vertex normal map that doesn't match your geometry anymore and that will make for weird shading.

Also usually it is best to not separate your model on export - you usually want to keep things joined together because the mesher will do extra work on joined edges to make sure there is a unified mesh structure between the surfaces. If you have 2 surfaces that are just sitting right next to each other but not actually joined, then they will get meshed separately and they may have different vertex structures on curved edges, leaving little cracks between them. That won't happen if you have them joined though.

If you need things separated, it's better to separate them in Modo after you have imported them.

But if you can please provide a sample model or at least some kind of screenshot that helps to illustrate what you are seeing, that would be a big help to be able to give you some better tips.

- 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:  Gep
4602.6 In reply to 4602.5 
Hi Michael,
Fist of all, thanks for your software, it's a pleasure to use.

I think Pilou was right, my mesh was not closed and this caused the mess. Here is a picture of what i see in modo just after import :



I have to export with unjoined edges, otherwise every n-gons render with creases. But as you can see, with all the bevels this makes a fair amount of surfaces and makes it nearly impossible to manipulate or, in this case, repair.

Anyway, i probably make things the wrong way, either in the construction method or in the export process, but i spent 3 hours learning the soft and was able to do the job, so once again : wonderful soft. (i would have spent days doing this in modo...)

Of course, if you still have an advice for my case, i'll take.

Gep.
  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:  Frenchy Pilou (PILOU)
4602.7 In reply to 4602.6 
Walls are in the sky! :)

That gives a style! ;)

Have fun future modeling!

Maybe you can send the File.3dm to Michael at
moi@moi3d.com if confidential needing for exploration of the "Bug" export ;)

EDITED: 12 Oct 2011 by PILOU

  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
4602.8 In reply to 4602.6 
Hi Gep - it looks like you're talking about face normals, not actually "vertex normals" ?

Vertex normals are used just for shading, they're what are in the vertex normal map and they don't actually control whether a face is a "front face" or "back face" - front/back face determination comes from the face normal, not from vertex normals.

From what I can see in your image there, that looks like a rendering (not a viewport screenshot, right) and there does not seem to be any shading artifacts, instead there are just some pieces missing entirely, is that correct?


The easiest way to deal with inconsistent face normals is to just set your render material to be a double sided material and then you don't have to worry about it - with double sided materials both front faces and back faces will render equally as well so that should sovle your problem if I understand it correctly.

If there is some reason why you don't want to just use double-sided materials, then a couple of other methods you can use is to run the "Flip" command in MoI to flip a non-solid surface object to the reverse direction:
http://moi3d.com/2.0/docs/moi_command_reference10.htm#flip

But also the best method tends to be to make solids out of your objects - solids will automatically have their surface normals oriented to point towards the outside of the solid so that would solve your problem. That should work even if you use Separate on the object after it has become a solid initially - surfaces that are separated off of a solid should maintain the same outward normal of the solid they came from.

Normally it's good though to just export solids without separating them first - could you maybe show some more detail about the "otherwise every n-gons render with creases." problem? That should not normally be an issue. Did you possibly delete the vertex normal map in the case where you saw creased rendering? If you leave the vertex normals intact and don't end up with invalid vertex normals by doing a transform while not in item mode, then there should not normally be creases showing between geometry that is smooth. That's basically the point of vertex normals is that having the accurate normals come through and get used in the rendering prevents shading artifacts.


A single individual surface that has never been a part of a solid has an arbitrary direction for its positive-direction normal though that will depend on things like whether you drew its original input curves in a clockwise or counter-clockwise direction. A single surface all on its own doesn't know whether it's the front face or the back face of your building, it's only when it gets joined into a solid that it can have knowledge of its orientation like that since it then has a volume to reference.

But really the easiest thing to do is to just not render with single sided materials - use double-sided material surfaces and you should not have to worry about which direction surface normals happen to be pointing in at all.

Hope this helps!

- 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:  Ambimind
4602.9 In reply to 4602.6 
Thanks for sharing your work Gep, MOI is so effortlessly precise that it really does make complex work of this kind a sinch!
In addition, it must be said that time is not the only important factor - one other is the maintenance of sanity during tough deadlines, when there just isn't enough time to work fully conscious and considerate of ones actions.
  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:  Gep
4602.10 In reply to 4602.8 
Hi Michael,

Ah ok, face normals, sorry i am not very aware of the proper vocabulary (when i worked with real clay, vertices and face normals were always just right, haha).

Yes, double sided material solves the problem, exept that the polys remain impossible to select, making material assignment quite painful in modo... (ok you can do it in MoI, but you still need selection in modo for size or position adjustment, etc...)

Fliping in MoI would be great as far as you know which part to flip, but as you can see in the previous image, it would be a tedious work to do here, except if it does a kind of "align" like in modo, that is turning all normals in the same way for a given surface. And here i wonder why this function has no effect in modo, it works just fine usually.

So you're right, the best way is to have a solid.

As for the creases on n-gons, here is a picture (i turned on reflexion mode in viewport for better visualisation, these creases do show in render) :



As you can see, my fillet definition is quite low, this does not happen when i export with more subdivisions. But i have to do an entire town and need to keep the poly count to the minimum. Of course, this does not happen if i export with separate surfaces. Keeping or deleting the vertex normals does not change anything in this case. (note : i redid the export for example and divided plan surfaces here, but the issue is the same with default value for this setting)

Thanks again for your kind help. (and forgive my english, please)

Ambimind, yes you're right, sanity is the hardest thing to keep in this job, haha...
  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
4602.11 In reply to 4602.10 
Hi Gep - sorry I'm not completely familiar with some Modo details - how is it that using double-sided materials does not allow you to select the polygons?

Do you mean you are not seeing the back-facing polygons inside of the Modo editor window? Surely there is some setting within Modo that you can toggle to make those show up and be selectable. You may need to post a question regarding that in the Luxology forum to get some modo-specific advice for that part.

> As for the creases on n-gons, here is a picture (i turned on
> reflexion mode in viewport for better visualisation, these
> creases do show in render) :

Are you 100% certain that you have the vertex normal map being used in that case? Getting the proper vertex normals to be used should avoid shading glitches like that from happening.

Also which format did you use for transferring - you should usually use LWO format to get the best results with going to Modo.

If you still can't get the n-gons to shade properly even if you're really sure you're using the vertex normal map, can you please post a 3DM file with that geometry in it that you are showing there (just only that geometry and not all the rest of the file would be easiest to test with), so I can take a look at it?

Also note that if you want to have a solid but have the pieces for it to be separated on export, there is actually a setting for "Weld vertices along edges" which you can uncheck when exporting solids out from MoI which will make the mesh generated from each surface in a solid have its own separate vertices along shared edges (but with still unified mesh structures) instead of having faces actually share a single vertex in common between them where they touch at a common edge. So if you want to have separate pieces in Modo it's probably best to keep things as solids but turn off welding at export time to get that, sorry I forgot to mention that setting previously.

But I'm kind of confused about that screenshot that you show, because that's exactly the kind of artifacts that you should not be seeing if you get the vertex normals that are exported from MoI to be used for the rendering. That screenshot looks like the kind of thing you would see if you are not using vertex normals from MoI and instead having Modo automatically cook them up by just averaging the normals of adjacent faces - that's what happens if the vertex normal map is not used.

- 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
4602.12 In reply to 4602.10 
> but as you can see in the previous image, it would be a
> tedious work to do here, except if it does a kind of "align"
> like in modo, that is turning all normals in the same way
> for a given surface.

Well yes when you do a Flip in MoI it flips the entire surface including other surfaces that are joined to it all as one piece, then all the polygons generated from that flipped surface will be going in the other direction.

But yes it can be better to use solids rather than messing with flipping but I still don't understand why you can't just turn on double sided lighting and not have to deal with it at all...

Surely there is a setting Modo for you to be able to see double-sided display within the editor window as well.

- 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:  Gep
4602.13 In reply to 4602.12 
Ok ok, it's all my fault, i now can export with no artefacts on n-gones, i was just doing things the wrong way. Sorry to have make you lose time on this, but at least it made me understand...

For modo, yes i can select the inverted polys in modo, but i have to select them "from behind", wich means turning around and inside the mesh again and again. But anyway this issue was solved by closing the mesh in MoI, so no more need to spent time on this either.

So, many thanks for your help, it all came from me and my poor technical skills, but you had me progressing. :)

Back to work now, buildings, buildings, houses, buildings...
  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
4602.14 In reply to 4602.13 
Hi Gep, no problem, I'm glad you've got things working now!

But you may want to ask on the Luxology forum about some setting to make all polygons show up in the editor window instead of having back-facing ones being hidden in the display. There is likely some setting you can switch to make that happen and then you would no longer need to spin around to select those polygons, that would then make things easier.

- 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
4602.15 In reply to 4602.14 


This option will help to solve your selection problem.

EDITED: 4 Dec 2015 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
 

Reply to All Reply to All