FORUMS: list search recent posts

XYZ coords of a plane - MEL ?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Millar
XYZ coords of a plane - MEL ?
on Mar 31, 2010 at 5:36:59 am

Hello - simple description:

Imagine you had a plane and it was subdivided x & y by arbitrary amounts - you then animated this plane through maya 3D space over time:

How can I get Maya to output a file (.txt .xml or .tiff even) that gives each subdivisions centre point on the planes position in 3D space ?


Slightly more detailed description>> So imagine a square plane 2x2 units large created flat centred at the origin was subdivided by 2 in each x and y so it was now defined by 4 1x1 squares. The planes top left subdivided square would have a centre at -0.5, 0, -0.5 (XYZ) (the original top left that is, it is free to rotate or move however and no longer be 'top left').

So my text file for this first frame would be:

-0.5, 0, -0.5 (top left)
0.5, 0, -0.5 (top right)
-0.5, 0, 0.5 (bot left)
0.5, 0, 0.5 (bot right)

and if I were to move the subdivided square - I dunno, pivot 90deg around its 'top' edge so it was standing up the next output would be:

-0.5, 0.5, 1 (top left)
0.5, 0.5, 1 (top right)
-0.5, 1.5, 1 (bot left)
0.5, 1.5, 1 (bot right)

You'll notice I used a typical scheme where you read from top left to right then down to bot right and had the x y z values tab delimited and the subdivision position line delimited. This is just an example (I got hose numbers just by eyeballing it).

I'd want much more subdivisions in reality and deform the plane also, importantly: could it be done with an nCloth ??

I may as well be a complete beginner with maya and programming, but have a little experience in both a long while ago, should with a struggle be able to nut it out, but any hints or similar programming re. this kind of carry on would be *greatly appreciated*

MEL ?? possibly within the app UI itself ?

Kind regards


Return to posts index

Michiel Duvekot
Re: XYZ coords of a plane - MEL ?
on Mar 31, 2010 at 3:30:53 pm

It may sound strange, but the easiest thing might be to use hair. Placing a follicle on an nCloth will give you something that you can query the position of with xform -q -ws -t and that can be written out to an xml file.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]