STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
350
IN-GAME
2,087
ONLINE
Founded
November 8, 2013
All Discussions > Bug Reports > Topic Details
Devieus Mar 17, 2014 @ 6:00pm
Importing breaks smoothing groups
When importing any SMD, the smoothing groups are completely destroyed (unless I've missed something). It should be possible to leave them intact.

I've taken the liberty of looking through the code and I believe there are two ways of doing so:
  • Join vertices upon importing, rather than remove doubles.
  • Tag edges as sharp when necessary, then add an edge split modifier.
Last edited by Devieus; Mar 17, 2014 @ 6:01pm
< >
Showing 1-7 of 7 comments
ZeqMacaw Mar 17, 2014 @ 6:22pm 
I have also noticed this (based on someone else pointing it out to me and me testing it). I am sure there would be many modders who would love to have such a feature as described here.

I would expect that the plugin would always need to join vertices, if close enough, in order for the tagging and adding of edge modifier to work as expected.

Technically, an SMD file does not store smoothing group info, but rather stores vertex normal info. I am sure Artfunkel knows this. The real trick is to have Blender keep that info, tell Blender to tag the sharp edges, and add that edge split modifier.

:)
Artfunkel Mar 18, 2014 @ 4:16am 
I'd love to get this working, but I've never managed to properly convert the individual vertex normal values in an SMD into sharp edges.

The good news is that there are currently efforts underway to add custom normal support to Blender that will fix this issue once and for all.
Devieus Mar 18, 2014 @ 7:27am 
From what I've seen, the vertex normals are stored in a list somewhere, the list is currently commented out because nothing is done with it; but put it back in and the normals would be stored locally, so it can be iterated over. Though doing that would cause importing to take very much longer because every new vertex would have to be compared to every other already in there, it's better than nothing at the moment.

For the record I'm more for the second option, because it's more likely to keep the UVs intact.
Artfunkel Mar 18, 2014 @ 10:35am 
Blender regenerates vertex normals at regular intervals. It's always been possible to assign the SMD values, and in fact everything shows up correctly at first. But the data is lost when the user starts to edit the mesh. To permanently store the normals I would need to convert them to sharp edges, which is not easy at all.
Devieus Mar 18, 2014 @ 12:45pm 
I realize that, I mentioned that, the sharp edges and everything.

The way I imagined it would work is at some point during the import, a vertex is compared to all others, if one exists at the same coordinates, but has a different normal, then there'd be a vertex in the same poly where it came from that would also have a vertex in the same spot with different normals; selecting both vertices would select an edge which can be marked sharp.

Though I see the problem would be to descern which vertex in the list of vertices corresponds to which in the imported model.
Artfunkel Mar 18, 2014 @ 1:38pm 
Unfortunately that leads to all edges between verts with different normals being marked sharp. You can see the results of that algorithm here.[facepunch.com] The solution to that involves orthographic projections in order to detect precisely which edge the difference is along, which I've never managed to get working.

Custom normals offer a far simpler solution (and more reliable - who says that Blender will generate the same normals as seen in the model even with sharp edges correctly applied?) so I'm going to wait for them instead.
Devieus Mar 18, 2014 @ 2:29pm 
That doesn't seem logical, as long as two polys are in the same smoothing group, they should have two matching vertices, so an edge between them would never be marked sharp.

Thanks anyway though, I guess the best thing to do is wait then.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details