Convert/Transfer User_Normal (cluster prop) to "Hard Edges"

Discussions regarding modelling with SOFTIMAGE©
Post Reply
MikeM
Posts: 17
Joined: 23 Jun 2013, 23:11

Convert/Transfer User_Normal (cluster prop) to "Hard Edges"

Post by MikeM » 26 Mar 2014, 16:30

Hi,

I am importing lowpoly meshes in OBJ exported from another software and the normals are improted into a "User_Normals" cluster property:

Image

These aren't editable in the same fashion as smoothing a lowpoly mesh by using the "hard edge" method, in fact when trying to use hard edges on a polymesh which has user_normals it doesn't effect the shading at all as the user normals are obviously overriding it.

So I would like to convert user normals back into hard edges so they can be edited, I do realize user_normals defines any smoothing angle range, so only fully smoothed and sharp verticies/edges/faces could be converted to hard edges.

I couldn't find anything in the docs or searching on forums/google, I could probably figure out a way to do with through scripting but I figured I might save myself some time and just ask here in case there's already a proper way to do it.

Any ideas if this is already possible?

Thanks in advance!

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Convert/Transfer User_Normal (cluster prop) to "Hard Edges"

Post by myara » 26 Mar 2014, 17:14

I was starting to write something like that when I was importing objects from Maya.

I don't know what software you are using so I don't know if this can help you but I found that disconnecting those Edges in Maya, and connect them in SI was easier to write :P
I just wrote a couple of scripts one for disconnect hard edges in Maya and one to convert those disconnected edges back to hard edges again. Send me a message if you want info about it, I may have those scripts somewhere in my HDD.

BTW, if you desist in converting normals to edges, this tool could help you a little:

It selects edges by the angle of their adjacent polygons, not their normals.
http://myara.web.fc2.com/mHardEdgeMarker.html
M.Yara
Character Modeler | Softimage Generalist (sort of)

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Convert/Transfer User_Normal (cluster prop) to "Hard Edges"

Post by rray » 26 Mar 2014, 17:41

Not really helpful in your case but if you ever wish to the the exact opposite (i.e. convert 'hard' marked and auto edges to user normals) you can just hit modify->component->set user normals->auto.
softimage resources section updated Jan 5th 2024

MikeM
Posts: 17
Joined: 23 Jun 2013, 23:11

Re: Convert/Transfer User_Normal (cluster prop) to "Hard Edges"

Post by MikeM » 26 Mar 2014, 18:08

myara wrote:I was starting to write something like that when I was importing objects from Maya.

I don't know what software you are using so I don't know if this can help you but I found that disconnecting those Edges in Maya, and connect them in SI was easier to write :P
I just wrote a couple of scripts one for disconnect hard edges in Maya and one to convert those disconnected edges back to hard edges again. Send me a message if you want info about it, I may have those scripts somewhere in my HDD.
I am working with another artist who is using blender and he is exporting in OBJ, but we are in the same situation from maya>obj>softimage when it comes to user normals vs hard edges.

I have also tried reconnecting edges and mark as hard before, in general it works great but its not the cleanest way to go as it can weld edges that were not supposed to be connected in some rare cases where disconnected edges from faces that are close together but not meant to be connected.

Thanks for offering the script, I already had some quick stuff based on the SI log, I should probably rewrite it with the SI Object Model.

Code: Select all

ActivateEdgeSelTool(null);
DeselectAll();
SetSelFilter("Border_Edge");
var openEdges = SelectAllUsingFilter("Border_Edge", siCheckComponentVisibility, null, null);

var WeldEdgesOp = ApplyTopoOp("WeldEdges", openEdges, siUnspecified, siPersistentOperation, null);
WeldEdgesOp(0).distance = 0.001;
HardEdge();

ActivateObjectSelTool(null);
myara wrote: BTW, if you desist in converting normals to edges, this tool could help you a little:

It selects edges by the angle of their adjacent polygons, not their normals.
http://myara.web.fc2.com/mHardEdgeMarker.html
This is definitely very helpful! thanks so much, I will take a look and try to do the same thing but based on the user normals cluster to get the 100% original hard edges.
rray wrote:Not really helpful in your case but if you ever wish to the the exact opposite (i.e. convert 'hard' marked and auto edges to user normals) you can just hit modify->component->set user normals->auto.
Thanks indeed I am trying to achieve the opposite, usually there is no need to do this to export to the game engine as the normals data is written on the exported model (for FBX/OBJ etc).

Well I guess I'll try to write a script to do this, I will keep you updated.

Thanks a lot!

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests