A new separate thread stemmed from the
Polyhertz's 3dsMax script - 'Quick High-Poly' discussion.
MXS modifier for download here:
http://www.scriptspot.com/3ds-max/scripts/insetfix-modifier- InsetFix.ms is just the fixed inset-by-smoothing-groups modifier - it gives a cleaner result than simple inset but it's also slower (you won't notice that with simple models but for complex models you are better of using the regular inset)
- InsetFixChamferStack.ms is a modifier that adds the complete inset+chamfer interactive stack
- InsetFixQuadChamferStack.ms does the same but uses Quad Chamfer instead of max Chamfer (you need to have the Quad Chamfer modifier for it to work)
As it is a modifier, everything is procedural and you can return to the base object and change stuff any time.
If you only want a regular inset by smoothing groups modifier and don't mind its shortcomings (it's the one shown in the gif above and does basically what the original Polyhertz's script does, just as a modifier combo), you can get it here:
http://www.scriptspot.com/3ds-max/scripts/inset-by-smoothing-groupFor complex models I
strongly suggest you use this one as it's much faster.
For those who don't mind some tinkering and playing with something that breaks easily, and want to learn MCG, here's also the original MCG modifier:
http://www.scriptspot.com/3ds-max/mcg/inset-chamferBear in mind that you'll be basically a betatester if you install it, as there are still quite a few unsolved issues. Any pointers, suggestions etc are welcome.
If you decide to use the Smooth modifier in the stack and you get unexpected results after enabling it, you might want to try unchecking Prevent Indirect Smoothing.
If you get an error message, please open the maxscript listener window (F11 hotkey), copy its contents (should say what happened and what the values were), send it to pastebin and insert the link here. If you are able to reproduce it on a given mesh and you are allowed to share the model, it's even better if you attach the file as well.
Replies
Actually, due to the problems people were having with the MCG installation, I decided to no longer support the MCG version and do a MAXScript only version. Speed is the same, it doesn't need a weld modifier and it's only one file.
I'm using simpleMeshMod which was introduced in max 2016. Making it working in lower versions would be a task for someone familiar with max SDK - or give up the idea of making it a modifier, if you only want to set the params without seeing the result and apply it once. Sorry about that.
great stuff !
Just so you know, it seems to run on 2015 if you just tell it to be a standard modifier rather than simplemeshmod.
Just looking through your code it's like looking at a tidier version of the one I wrote up and gave up on recently - It hadn't occurred to me to use the empty modifier to collect parameters so I was unsatisified with needing to move up and down the stack for live editing.
I found that simply chamfering based on hard/soft edges was leading to shading artefacts around convex n-gons and convex transitions between faces. I ended up basing an edge selection off the original smoothing group boundaries plus edges attached to corner verts - it should be a fairly trivial change to your code and will improve results greatly
Which one are you using? Did you switch to the maxscript-only one? If so, a script editor window highlighting the error should pop-up, could you attach a screenshot showing it? Thanks in advance.
Ummm, but if you don't make it a simpleMeshMod, it won't be able to do the inset part, i.e. it won't do anything, so what's the point? That's the main function, inset polygon groups by their smoothing groups, then slap a chamfer on top. That avoids the shading artifacts you are talking about. If I misdunderstand what you mean, a picture would help. Thank you.
Im on a coach at the moment so cant get a pic but there are a couple in fansub's first thread from when we were discussing the matter a few weeks back.
Edit . Got you a link..
http://polycount.com/discussion/comment/2476751/#Comment_2476751
Ok, that could be solved by using selected edges instead of edges at the border of smoothing groups, say like this, right?
There's still a problem, though, the inset+chamfer combination as is deforms corners quite a bit:
That would be solved by using two chamfers, one with zero tension to get flat offset edges and predictable corner geometry without diagonals, and second one doing the actual chamfering, like this:
The inset edges could be even removed after the first chamfer as the first chamfer would give us the offset edges needed.
Are there any other problems that may arise?
Inset and chamfer 1 should be of exact same amount value ex : 0.04
and
Chamfer2 need to be half amount value of previous value ex : 0.02
It did worked on all objects of my scene and definitely deleted small artifacts. And it do work nice with max chamfer out of the box.
with Sp3
Good to hear that, I will definitely make a separate version to do this double-chamfer. That also means that number of segments won't be as easy to change, if I'm not mistaken... I will be away from max over the weekend so there won't be any progress in the next days, but I'll be keeping an eye on this thread
I still don't like it, though, maybe I should make a complete chamfer replacement instead, that would give a clean result...
I was having issues with Shapeshifter's demo model. Some of the more complex polygon shapes would just disappear. http://www111.zippyshare.com/v/WdMbGDkG/file.html (You need to Reset the normals add smoothing groups after importing.)
I only tried the MCG version last night. Maybe the MaxScript version will act different.
If using the Smooth modifier that is added in the stack, try turning the Prevent Indirect Smoothing checkbox off.
And that error shows the insetchamferstacksimple.ms file? The MAXScript-only file is self-contained and doesn't use mcg.
Are you using the MAXScript-only version? The MCG one breaks the borders and then uses fixed-value weld which may not work with some unit setups in which case chamfer won't do anything.
Would it be possible to have the script use the quad chamfer modifier if one has it installed?
for prop in getPropNames $.modifiers[1] do format "prop: %, value: %\n" prop (getProperty $.modifiers[1] prop)
(or a different number than 1 if it's not the first modifier from the top)? Thanks in advance. As a side note, it seems the quad chamfer chamfer can do chamfer based on smoothing groups and there's a inset parameter - what does it do, is the separate inset by smoothing groups even needed with it?
Hope this helps!
Thanks so much, and my apologies for the wait!
The only issue now is that it needs to default to Smoothing Groups in the modifier - otherwise it won't do anything. How would I pass that info to you to script it?
for prop in getPropNames $.modifiers[1] do format "prop: %, value: %\n" prop (getProperty $.modifiers[1] prop)
Run it with the Smoothing Groups active and then with some other mode and try to find a property that's changing when this changes. Note what the right value is and i will update the script (and tell you what to change).
prop: #load_chamfer_amount, value: 1
Edge Selection:
chamferModifier = Quad_Chamfer iterations:2 sharpness:0.5 smoothing_group:1 shading_type:2 chamfer_type:1
The linked file is updated now, too.