Notifications
Clear all

[Closed] Trasnform matrix of a model in a group, how?

Hi,

Those transform matrices of Max are driving me nuts !!

How can i get the correct transform matrix of a grouped model?
I have a situation where the model has been scaled on node level and the model belongs to a group, that has also been scaled (scale values != 1). How can I get the correct matrix of a model? I need node scale + group scale both baked to vertex coordinates of a node so that the node would be exported the same as it looks in Max viewport. How can i do that?

Currently i’m reseting the scale of the model to [1,1,1] and applying the previous scale to object offset matrix. Then I multiply the vertices of a model with the offset transform matrix. This works fine if the model doesn’t belong to a group (or belongs to a group that has not been scaled). So i guess the question is how can I get the scale/transform of a group merged to node ? I tried to add the parent scale to object offset transform. It almost worked.

Every help and any ideas are highly welcome !
Suvakas

2 Replies

No ideas? Anyone?
How to “bake” group matrix to nodes in a group?

Doesn’t that sort of thing trickle down to the node automatically?
e.g. simplified:


a = Teapot()
$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
a.transform
(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])
a.scale
[1,1,1]
(getVert a.mesh 1) * a.scale
[17.5,0,30]
a.scale = [0.5,0.5,0.5]
[0.5,0.5,0.5]
(getVert a.mesh 1) * a.scale
[8.75,0,15]
myGroup = group #(a)
$Dummy:Group01 @ [1.337892,0.000000,9.843750]
myGroup.scale
[1,1,1]
(getVert a.mesh 1) * a.scale
[8.75,0,15]
myGroup.scale = [0.5,0.5,0.5]
[0.5,0.5,0.5]
a.scale
[0.25,0.25,0.25][color=Green] -- note change due to group scale[/color]
(getVert a.mesh 1) * a.scale
[4.375,0,7.5]