Home Technical Talk

Attaching a primitive to "fix" a normals issue...

greentooth
Offline / Send Message
Daf57 greentooth
Hi all,
This is a curiosity question - so I had this issue with some imported meshes that were crashing Max when using V-Ray IPR. The meshes were pretty simple but I guess the normals got mangled. I edited/reset the normals - eyeballing them they seemed good. But the Max minidump and V-Ray log were complaining about normals. So I googled around for a fix and came across this article here:
I tried it and it worked! Okay - sweet! But please explain what is happening when you attach and delete the primitive to fix the issue? Seems like magic! ;)

Thank you!
Daf

Replies

  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    Attach clears explicit normals, so does adding Edit Poly modifier (and collapsing if you want) which is IMHO cleaner (no renumbering of verts and mapverts etc).
  • Eric Chadwick
    I put a list of rules here for how & when Max preserves or removes edited vertex normals. Might help you.
    http://wiki.polycount.com/wiki/Normals#3ds_Max
  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    I put a list of rules here for how & when Max preserves or removes edited vertex normals. Might help you.
    http://wiki.polycount.com/wiki/Normals#3ds_Max
    That's a great list! May I add a few points (mostly CAD specific since that's where I meet explicit normals the most)?

    • The Collapse utility can be used to attach multiple meshes while keeping explicit normals. It's the fastest option as of now but doesn't support multiple material IDs.
    • The most reliable way to keep explicit normals while welding verts is to use ProOptimizer. Make sure Keep Normals > Protect Normals is checked, activate Merge Vertices with the threshold you want and uncheck Favor Compact Faces to avoid triangulation.
    • If you want to use a modifier that clears explicit normals but doesn't change topology, sometimes it's enough to add an Edit Normals modifier to the stack prior to applying an modifier, then add that modifier and move the Edit Normals modifier above it.
    I've also made one script to flip explicit normals on meshes (it's possible to do with editable poly in a few steps out of the box but with imported geometry, that takes much more time and necessitates conversion while this is usually near instant).
  • Daf57
    Offline / Send Message
    Daf57 greentooth
    Hey thanks, guys! Good info. Swordslayer - first thing I tried was adding an Edit Poly mod and collapsing. I was surprised it didn't work as that's always been the go-to in the past. The only thing that finally worked was the primitive.

    Great list Eric! Bookmarked!
    Thanks again!
    Daf
  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    Okay, that's weird, might not be _just_ a normal issue then. Were the objects imported with the .obj imported? If so, does importing them with the option to import as editable poly help?
  • Daf57
    Offline / Send Message
    Daf57 greentooth
    They were imported as FBX or simply merged from .max file. Weird thing is it's only an issue with V-Ray IPR - and OpenSubdiv. If I set OpenSubdiv iterations to a value it's fine. But if I set it to 0, but Render Iter to say 2 (OpenSubdiv only on render)  I get all the errors and mangled geometry. Starting to think this is more about V-Ray IPR than the geometry.
Sign In or Register to comment.