u3dreal
03-17-2006, 05:33 PM
Hello All,
I just spend one week to get hold of this problem but i must do something wrong here...
maybe i'm using a totaly wrong approche..
The problem is that i have to explode the objects into elements before exporting
to preserve smoothinggroups.
here is what i have come up with so far..
global snaps
global num_faces
global snaps = snapshot selection[1]
global num_faces = snaps.numfaces
global sg_1 = #()
global sg_2 = #()
global sg_3 = #()
global sg_4 = #()
for s = 1 to num_faces do (
local sg_face = getFaceSmoothGroup snaps s
if sg_face == 1 do (
append sg_1 s
)
if sg_face == 2 do (
append sg_2 s
)
if sg_face == 3 do (
append sg_3 s
)
if sg_face == 4 do (
append sg_4 s
)
)
delete snaps
sg_1
sg_2
sg_3
sg_4
it works OK for spheres and meshes...but not for simple objects like a cube...
here i get the following:
for a cube i get 2,4,8,16,32,64 as smoothinggroups using the above command..
when i enter subobjectLevel = 3 and select the faces manually i get 1,2,3,4,5,6 in the
smoothinggroups rollout...
I don't get it..
Is there a better way to do this...also i would like to have to total count of smoothgroups used and a better way to scan through all the smoothgroups...
I really would apprechiate some help from you pros....:)
As i'm sure this is quite easy if you know how.
Thanks slot for your help in advance...
Gregor
I just spend one week to get hold of this problem but i must do something wrong here...
maybe i'm using a totaly wrong approche..
The problem is that i have to explode the objects into elements before exporting
to preserve smoothinggroups.
here is what i have come up with so far..
global snaps
global num_faces
global snaps = snapshot selection[1]
global num_faces = snaps.numfaces
global sg_1 = #()
global sg_2 = #()
global sg_3 = #()
global sg_4 = #()
for s = 1 to num_faces do (
local sg_face = getFaceSmoothGroup snaps s
if sg_face == 1 do (
append sg_1 s
)
if sg_face == 2 do (
append sg_2 s
)
if sg_face == 3 do (
append sg_3 s
)
if sg_face == 4 do (
append sg_4 s
)
)
delete snaps
sg_1
sg_2
sg_3
sg_4
it works OK for spheres and meshes...but not for simple objects like a cube...
here i get the following:
for a cube i get 2,4,8,16,32,64 as smoothinggroups using the above command..
when i enter subobjectLevel = 3 and select the faces manually i get 1,2,3,4,5,6 in the
smoothinggroups rollout...
I don't get it..
Is there a better way to do this...also i would like to have to total count of smoothgroups used and a better way to scan through all the smoothgroups...
I really would apprechiate some help from you pros....:)
As i'm sure this is quite easy if you know how.
Thanks slot for your help in advance...
Gregor
