UV islands to hard edges

A little tool I created for my studio. Turns out you need to use hard edges to bake good normal maps. 3Ds Max has a script to assign smoothing groups based on UV islands for that purpose. Blender hasn’t smoothing groups, but we have an automatic “UV islands to seams” operator and a nice “Edge Split” modifier with an option to use marked hard edges.

The button this add-on adds to the “Shading/UVs” tab automatically runs the operator, selects the seam edges and makes them hard edges, and adds the modifier with the appropriate settings. You only have to export then your obj/fbx.

Here: UVs_to_hard_edges.zip (1.44 KB)

The button doesn’t make sure the modifier is at the top of the pile at this time and I highly recommend you to either use this before anything else or make sure it’s the first of the stack yourself :stuck_out_tongue:

Hope you find it useful :slight_smile:

1 Like

Thanks @Shonosh a useful job to have directly all in one button! Congrats.

Hi Shonosh,

I have this traceback with your add-on:


Traceback (most recent call last):
  File "/home/patrinux/.config/blender/2.76/scripts/addons/UVs_to_hard_edges.py", line 88, in poll
    return(context.active_object.type == 'MESH')
AttributeError: 'NoneType' object has no attribute 'type'

Your poll() function isn’t good enough! :no:

Why modifier instead of Auto Smooth in object data tab?

Here is the corrected py file, please:
https://copy.com/uU9gab9qQ77sCn4a

  • No uppercase in py file name.
  • Poll() corrected
  • Category => “UV” like other UVs add-ons.

byebye :cool:

Spirou4d, it says a decryption key is needed to access the file.

Link changed to Copy.com.
Bye bye.

Hi Shonosh,
I have a new traceback with Blender 2.78:


Traceback (most recent call last):
  File "/home/patrinux/.config/blender/2.78/scripts/addons/uv_to_hard_edge.py", line 79, in poll
    return context.active_object.type == 'MESH' and context.active_object is not None
AttributeError: 'NoneType' object has no attribute 'type'

Solution for the poll() function in 79# line.:


    @classmethod
    def poll(cls,context):
        if context.active_object is not None :
            return context.active_object.type == 'MESH'
        return False

Got a screenshot of this in action?

HI there, is this function in the standard Blender yet ? I used a similar function in MODO all the time and loved the speed.

Great tool! Thank you

TexTools has ths functionality within 2 tools

http://renderhjs.net/textools/blender/images/op_smoothing_uv_islands.png
UV smoothing

Applies smoothing normals to the object except at the UV island edge bounds.This is often used for normal map baking so that the edges of UV islands bake nice.

Select uv island bounds

Selects the edge bounds of all UV Islands in the 3D view.

The selection tool can be used to apply manually hard edges to the uv island bounds. Blender itself only has a tool natively that converts the uv borders into uv seams, TexTools uses that functionality inside the 2 tools to convert the selection.

2 Likes

thanks for the answers, super nice tool! ill definitely send a donation soon.

btw, I assume the bevel shade baking does not work yet ?

It does but you need a 2.79 nightly build the reason is that the bevel shader is not available in any stable release yet.
Once running a build with the bevel shader available those bake modes will appear. Its all in the documentation as well.

1 Like

This needs to come to 2.8 for the love of god!!!

I have updated the addon to work with 2.80. I’m not able to upload it to the site, so I placed it on my github.

Hope it helps any one that needs it :slight_smile:

2 Likes

Thanks for the good stuff.