Author Topic: Chamfer Modifier/Smooth to Adjacent - 3DS Max  (Read 557 times)

2023-11-04, 10:25:43

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Last night i noticed something pretty weird happening with Max's chamfer modifier and I don't know why.

But, by default, whenever I use the Chamfer modifier I always tend to select 'Smooth Chamfers Only' and then enable 'Smooth to Adjacent'.

However, 'Smooth to Adjacent' appears to be messing up the normals of my geometry.  It's only really noticeable with a super low sun though.

In the attachment look at the floor tiles, it's just a simple line with floor generator.  I've then added an edit poly and welded all verts.  Then added the chamfer.  The top screenshot is how it should look.  The bottom is wrong, super dark, no shadows.  Looking at the floor tiles is the most obvious, but you'll also notice it's happening on the small wall upstand to the right of the image.  But it only seems to be happening on the poly's facing upwards (Z).

I always thought 'Smooth to Adjacent' was the correct way to go, now I'm not sure.  But it's used on pretty much everything in my scenes.  I've got 12 images in total, and some of the geometry that used the chamfer modifier is now collapsed, so it's too late to go back.  Thankfully this is the only scene where it's really noticeable due to the low sun.

There is another way to fix it and that's simply adding a 'Normal' modifier on top with 'Flip Normals' ticked, that returns the dodgy looking geometry to how it should look.

So there are 3 scenarios:

Chamfer - Smooth Chamfers Only - Smooth to Adjacent On = Wrong Shading/Shadows
Chamfer - Smooth Chamfers Only - Smooth to Adjacent Off = Correct Shading/Shadows
Chamfer - Smooth Chamfers Only - Smooth to Adjacent On - Flip Normals = Correct Shading/Shadows

Can anyone shed any light on why this is happening and what the correct way to go is as it's got me questioning everything I've done previously.

It's not a Corona Sun issue, as the same also happens when using a HDRI with a low sun.
« Last Edit: 2023-11-04, 10:33:23 by dj_buckley »

2023-11-04, 13:28:48
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1865
    • View Profile
'Smooth to adjacent' uses explicit normals which are problematic in Corona. You could try to set the 'Shadow terminator handling' to 1.0 (I think 0 is the default) in debug/dev tab in Corona render dialog. It might help, although I recall a case where it didn't...

2023-11-04, 13:45:27
Reply #2

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
So best to leave it off?  I noticed adding an inset in the Chamfer modifier fixes it too.

Also why is it only noticeable when the sun is low?  Am I hitting some sort of threshold.  I don't fully understand explicit normals/normals, other than when it comes to front and back side faces

2023-11-04, 14:09:54
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4761
    • View Profile
    • studio website
I also found this bug and with much tamer light when using 'Weighted Normals' modifier on imported CAD geo to simulate "adjacent" smoothing like the Chamfer has. It's fantastic 2-click solution to get perfect smoothed geometry you didn't model. At least it looks perfect in viewport because it gave me this same issue with Shadow Terminator when rendering with oblique light (though I didn't use anywhere close as powerful and low light as the Sun example here).

This is to be considered a bug by Corona imho.
But perhaps one that can't be fixed easily given it triggers the ShadowTerminator "fix". Maybe the way Corona fixed the terminator issue years ago was by modifying the normals during render time, and this kind of reverses that?
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2023-11-04, 14:41:47
Reply #4

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Setting the terminator back to 1 fixes the issue.  But I'm not sure what this does and what it might be screwing up elsewhere

Edit: Just testing the Shadow Terminator value and 0.1 - 1.0 render fine, anything below 0.1 and you start to see the issue.
« Last Edit: 2023-11-04, 14:45:55 by dj_buckley »

2023-11-04, 16:35:32
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Regarding chamfer, i would recommend whenever it's possible, use inset instead of smooth to adjacent, Corona or not. Contrary to smooth to adjacent, inset does not require explicit normals to work and this is big plus in my book. I just wish it would default to flow loop and not that stupid face inset mode.

But overall, this is Corona's problem, not 3ds Max's It would be really REALLY great if one day devs would fix this issue once and for all.

I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-11-04, 16:37:57
Reply #6

dj_buckley

  • Active Users
  • **
  • Posts: 875
    • View Profile
Inset just isn't ideal when you're chamfering already fine details, although a tiny inset does seem to still do the trick.

Out of interest, setting my shadow terminator to 0.1 ... is that likely to mess up other stuff elsewhere?