Hey polycount community!
I was wondering if there is a script/tool which allows the user to automatically generate smoothing groups from UVW seams in 3ds max. That should help to quickly bake normalmaps without weird seams.
I hope you can help
Cheers sebi
Replies
The opposite should be possible as well, I will have a look at it later and see if I can wrap together a quick script that does it the other way around.
In TexTools its the subscript 'fn_34__split_uv_by_smoothing_groups.ms' does it the other way you want it- I'll post it here as a reference for me later:
Prior to having it I'd use TexTool's UV->3d and then manually go and assign smoothing groups to each UV piece, then use it again to put it back together.
Hey,
thanks in advance! Sounds like a plan
here is the script:
just open the maxscript Listener (F11 in 3dsmax) and go: File > New Script...
within that new script document paste the listed script and then go:
Tools > Evaluate All
or hit alternatively CTRL + E
To use it for objects just make sure:
The way it works right now is that it will add a UVunwrapModifier (if not already on top of the stack) to determine the UV shells (which faces belong in a group) and after that it adds a editPoly modifier to assign the smoothing groups for the face selections.
Will add it in the next release of TexTools, until then and otherwise simply use this script and or extend it to a macroscript.
PS: Would you mind if i send you a pm here at polycount if I have other ideas for your textool plugin?
I won't take your other stuff, hehe. I did look at your Edit UV code last night though, to see how max 2008+ handles multi object unwrap. I made an Edit UV button for my bar too, and tried to make it pretty smart.
It was breaking in my 1.2.4 build, so I got that all good now I think.
I've tried this.. and it doesn't work for 1 of the object of the 2 in the unwrap, but if I select faces on both, it will.
thanks
It help you to bake perfect normals. When uv is broken/splited there MUST also be break/split on smoothing groups.
thx
When finished - I'll share for sure!
Pure win, as always Renderhjs. thanks
1) Select UV borders (used part of Renderhjs' script for Roadkill uwrapping)
2) Convert UV edges selection to EditPoly edges selection (Max is a real pain in the ass!) - my part of the script
3) Make smoothing groups in hard edges style (used script by Pier Janssen).
That's it Works pretty simple - select your mesh and press UV2HE button. Script is not perfect - in the places where too many hard edges meet there may be some smoothing defects because Max offers only 32 flags to make mesh look smoothed - and it is actually sometimes not enough.
It's important to notice that script gives best results on hard surface models but for organic models this solution isn't a good idea - because of an undesired hard edges over the model. Use similar TexTools' function instead.
As I told above - this script was meant to be a part of XSI to Max exporter - to handle hard edges correctly.
Looking forward to your comments.
When I tried that script it made every edge a hard edge, any ideas?
not sure has been a long while since I wrote that. I never had my hands on 3dsMax 2012 or 2011 so I don't know if something is different in those versions. Maybe a wacky modifier stack that might not ideal for what this script does. Try it on a snapshot of your model - aka copy it and merge it down to just the base poly object. Otherwise is it possible to show a screen of the model, or modifier stack
It has some other cool things to
http://www.matthewlichy.com/turboTools.html
Basically I build a list of all the UV islands using a UV modifier, then set the auto smooth threshold to 180 and run auto smooth on each island.
I'll post the source here too incase my website ever goes down in the future.