[Closed] obj smoothing disappears with add skin
Hi, Firstly thank you all so much I’ve lurked and learnt for some.
I have a basic script that adds xform, skin and bones to a picked object then collada export.
It works well for edit mesh but if an edit poly is picked the objects smoothing is removed completely. I can’t work out what I am doing wrong, if I click through the max UI to do the same process everything is ok. Although an edit poly will have minor errors in the FBX exporter I don’t want to force people to collapse to mesh. Any ideas what I am doing wrong?
ResetXForm obj
obj.pivot = obj.center
select obj
modPanel.addModToSelection (Skin ()) ui:on
if addBones2Skin.checked == true do (
for b in mBonesArray do(
if isValidNode b == true then (
skinOps.addbone obj.modifiers[#Skin] b -1
)
)
skinOps.SelectBone obj.modifiers[#Skin] 1
)
– 3ds max 64 2011
Where does your obj come from? Is that an object created in 3ds Max, or is this imported?
Do you see the unsmoothed object in the 3ds Max viewport or after exporting?
Just a wild guess, but could this be related to explicit normals?
– MartinB
Thanks for your reply Martin.
The object could be either imported or created in 3ds Max. It seems to be mostly a viewport
problem, exporting to Collada or Obj format keeps the smoothing although I can’t see it. With
an FBX file export the smoothing is lost. (I tried lots of opotion combinations in the exporter).
Your guess has helped point me, thanks. Adding a normal modifier without unify or flip checked cures the missing smoothing in the viewport but leaves me a little irked to not know why it is needed.
I have been in the habit of adding an Xform before skinning, I hope this is good practice, Maybe I should be converting poly characters to mesh everytime as well. I will go back
and research that one.
Normals is one of the old parts of 3ds Max. Traditionally, 3ds Max would recompute surface normals whenever needed, based on the Smoothing Group data. But then Explicit Normals were introduced, which should override the SG. Unfortunately, there are several parts in 3ds Max that destroy these Explicit Normals.
If you want, you could post a test file for me to look at.
– MartinB
Very kind, I wont bother you with a file, I can study up now I have a direction to head off in.
ps. Sorry for the lag this was my first couple of posts.