Home Technical Talk

Autodesk 3ds Maxscript: How to get the values of rotated vertices?

polycounter lvl 6
Offline / Send Message
MrQuetch polycounter lvl 6
I know that one cannot actually rotate vertices, as they are points in 3D space. As far as I'm concerned, I can get the values of vertex positions from an object's mesh data. But, suppose I want to rotate an object in 3ds Max - how do I get the vertices of the mesh data from the rotated object? No matter which way I rotate the object and run my script, the mesh vertex positions are only relative to the object's transform position. I have researched about matrices and quaternions, and have looked at other locations on the internet, but am still unable to find my answer. I apologize if this is a dumb question. Hopefully it has an easy fix.

Any help is greatly appreciated.

Replies

  • monster
    Options
    Offline / Send Message
    monster polycounter
    Do you want the world coordinates of the given vertex?

    Try

    vertex_position * $.transform

  • MrQuetch
    Options
    Offline / Send Message
    MrQuetch polycounter lvl 6
    monster said:
    Do you want the world coordinates of the given vertex?

    Try

    vertex_position * $.transform

    Hi again, monster.

    Yes, I do want the world coordinates. I just tried your code and it works perfectly. I'm surprised I didn't think about that sooner. I didn't know it would be this easy though.

    Thanks again for your help. This was bothering me for awhile.
Sign In or Register to comment.