Forum Groups
  All forums
    Help & Feedback
      Work in progress
      Finished Art
      Non-Max related

Maxunderground news unavailable

Unmirroring via script
show user profile  3joez
I have an object with a transform matrix whose x vector is inverted

(matrix3 [-1,0,0] [0,1,0] [0,0,1] [0,0,0])

I'm trying to restore the identity matrix with

$.transform = scaleMatrix[-1,1,1]*$.transform

But it's remirroring the object too(aka moving the vertices). What I want is just swap the x vector of the first row of the matrix, leaving vertices untouched.
Basically I want only the gizmo to invert its x axis.

read 504 times
6/24/2015 2:28:51 PM (last edit: 6/24/2015 2:30:50 PM)
show user profile  Garp
Not sure I follow but how about doing what you did twice with a resetXForm() in between?

read 492 times
6/24/2015 5:39:52 PM (last edit: 6/24/2015 5:39:52 PM)
show user profile  3joez
I'm trying to replicate this

at 51:56 you can see that he's inverting the x axis without using resetTransform at all

read 429 times
6/28/2015 6:24:11 PM (last edit: 6/28/2015 6:24:11 PM)
show user profile  Garp
Oh, I was completely off!

In the video, he's also flipping the geometry around, which doesn't show because it's a cube.
Try this:
$.transform = scaleMatrix [-1, 1, 1] * $.transform
$.objectoffsetscale *= [-1, 1, 1]

If you've set the ref. coord. system to local, you should see first the x arrow and the geometry flipped around, then only the geometry flipped back.

read 421 times
6/28/2015 8:54:51 PM (last edit: 6/28/2015 8:54:51 PM)
show user profile  3joez
Now I understand, I was tricked by the symmetrical geometry. Thanks Garp

read 413 times
6/29/2015 9:25:32 AM (last edit: 6/29/2015 9:25:32 AM)
show user profile  Garp
You're welcome.
If you're into rigging, the most important page in the maxscript documentation is probably:
MAXScript FAQ > General Advanced Topics > How are Transformations calculated in 3ds Max and MAXScript?
Another good resource is Bobo's Matrix Explained (CGAcademy, if I remember correctly).

read 411 times
6/29/2015 10:24:07 AM (last edit: 6/29/2015 10:24:07 AM)
show user profile  3joez
Yeah, I've seen Bobo's. Great resource. I will take a deeper look at the script page you've provided.

read 409 times
6/29/2015 10:42:36 AM (last edit: 6/29/2015 10:42:36 AM)
#Maxforums IRC
Open chat window