Home Coding, Scripting, Shaders

3dsMax UV-Islands to Smoothing Groups Script.

Snafu__
null
Offline / Send Message
Snafu__ null
Hey guys,
Ive found this script https://pastebin.com/YEcQU0pA here http://www.martinpalko.com/create-smoothing-groups-from-uv-islands/
Sadly I need the script to give each separate UVisland a new Smoothinggroup. Instead of looking at the faces orientation and give out duplicates.
For example if I have a box this script gives me 3 Smoothinggroups instead of 6. 
Anyone can help me modify the script accordingly? 
Thanks in Advance

Replies

  • monster
    Offline / Send Message
    monster polycounter
    Why do you need seperate smoothing groups? I think most UV to smoothing groups scripts will use the same method as both of those scripts or newer scripts swill select uv edge boundaries and make them hard edges. Neither will help you.

    Another issue is that there are only 32 smoothing groups. I think you'll run out quickly.

    In the pastebin you posted if you replace line 89-95 with the following it should work. Unless you have more than 32 uv islands.

                for island = 1 to uv_islands.count do -- Select and auto smooth each UV island
                (
                    editPoly.SetSelection #Face uv_islands[island]
                    editPoly.smoothingGroupsToClear = -1
                    editPoly.smoothingGroupsToSet = 2^(island-1)
                    editPoly.ButtonOp #SetSmooth		
                )

  • Kanni3d
    Offline / Send Message
    Kanni3d ngon master
    Wouldn't TexTools built in tool for UV->SG work? Why would you want every face to explicitly be a different SG? Like @monster mentioned, there are only 32 smoothing groups, and you most likely will have more than 32 islands.
  • Snafu__
    Offline / Send Message
    Snafu__ null
    Thanks guys. Was a huge misunderstanding on my part :dizzy:
Sign In or Register to comment.