FORUMS: list search recent posts

getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
anthonymcgrath
getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 16, 2005 at 2:50:17 pm

I have a wireframe cube (made from long cylinders)

at each corner I've put a simple spheric object.

I'm animating this cube group turning in space and I'd like to get the co-ordinates of each point in space and have maya display them next to each sphere (under a group node possibly) onscreen ready for a hardware render. is this possible and how would I go about achieving it?



ta

confused ant


Return to posts index

Steve Sayer
Re: getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 16, 2005 at 3:36:40 pm

Here's a quick-and-dirty way that may or may not work for you.

Select your cube, and then select the 'Create Soft Body' command, with the 'Make Soft' option. Now you will have a particle at each corner of your cube. Select the particles, and change the type to 'Numeric.' Numbers from 0 to 8 should appear near your particles.

Now press the 'Add Attributes For [Current Render Type]' button in the Attribute Editor. One of the attributes that will appear is called 'attributeName'. In that text field, type 'worldPosition'. Done!

You'll need to use the Hardware Renderer to render out the particle readouts, though.

-Steve


Return to posts index

anthonymcgrath
Re: getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 16, 2005 at 4:42:32 pm

thats genius! your a complete legend Steve!

dont know if I'm pushing my luck but is it possible to do the following also:

add particleId or prefix each particleId

arrange the xyz worldPosition numbers so they're underneath each other
x
y
z

as opposed to

x y z

if not no bother but just wondering if thats do-able as it would really fine-tune my animation out (its an animation plotting a flight path of a spaceship) :)


Return to posts index


Steve Sayer
Re: getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 16, 2005 at 5:53:06 pm

I'm happy to help out, Anthony.

The tweaks you describe are possible, but they're not straightforward. It would take some mucking around with MEL, custom attributes, and possibly creating extra particle objects and/or actually creating text curves instead of just using the Numeric readout... So it will depend on how comfortable you are with MEL and expressions, and how important it is to you to make these changes.

Let me know if you want to pursue it further, I can point you in the right direction.

-Steve


Return to posts index

anthonymcgrath
Re: getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 17, 2005 at 8:39:12 am

hi Steve,
getting the right look for this is quite important for me as its for a movie and they have a house typeface they've chosen for all the graphics - this scene plays quite an important part too.
If I could get this flexibility then that would be fantastic - you couldn't help me out any further could you? I'm useless with MEL but if its needed then I'll do it. The criteria are the following:

-text aligned vertically
x
y
z

-being able to choose typeface (curves is fine)

-finally - text faces camera akin to creating annotations on objects

my 3d scene involves half a dozen objects but nothing too complex - cubes, and some simple polygon shapes but they're moving in 3d space.
I'm also open to compositing too so it doesn't have to be done in one render.


Return to posts index

Steve Sayer
Re: getting the xyz co-ordinates from an animated sphere and displaying them onscreen for render?
on Aug 17, 2005 at 6:20:51 pm

Anthony, can you post your email address here, or send me a message at gearboy@rogers.com? I have some relevant info that I can forward to you.

-Steve


Return to posts index


anthonymcgrath
received email with script Steve - cheers
on Aug 22, 2005 at 11:25:45 am

Hi Steve,
first I just wanna say thank for sending me that email on the HUD scripting stuff.
In the end I didn't use the mel scripting - not for want of trying but quite simply (and I bet you can guess) ..timescale :/ yep - they wanted it yday...sooo...

I attached a camera to the point that moved in my 3d space. I then baked out the xyz position of the camera.

I imported this scene into afx and parented a 2x2pixel solid to the camera making it face camera using auto orient

I then precomp'd this scene and did a xy motion track on the 2pixel shape!

I then copy and pasted this to the larger solid which had my animated data streams on it. I was able to remove the precomp afterward to keep things tidy

bingo - the text now moves with the shape in 3d space or appears to as the camera moves round the scene the text stays facing the camera as it isn't using anything more than xy co-ordinates - it didn't even have to be a 3d layer

bit lengthy maybe and not as flexible but thought I'd post my solution as it only took about ten minutes and a bit of scene organisation :D

cheers again steve - I'll take a proper look over that email soon


Return to posts index

Steve Sayer
Re: received email with script Steve - cheers
on Aug 22, 2005 at 2:02:28 pm

Sometimes the best solution is simply the one that you know you can get working in time for the deadline. ;)

Glad you made it--I hope the script can prove useful somehow in future. As I said, don't hesitate to email me with any questions.

-Steve


Return to posts index

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