getting a local x,y,z coord of a vertex

 05 May 2003 ktpr Frequenter getting a local x,y,z coord of a vertex I have two vertices. Is there a way to get the local (or global I guess) coordinates of these two vertices? thanks for your time cheers ktpr share quote
 05 May 2003 TiKiMoN Bully of Jesters   Dave Stone Developer Nuvox Greenville, USA Turn on "Echo All Commands" in the Script Editor, and then select the vertices you want coordinates for. It will show you which vertices they are, and I am sure that from there, you can get their x, y and z coordinates. __________________ :=TiKiMoN share quote
 05 May 2003 larryvm moving around the world   portfolio fernando vizoso TD el ranchito Madrid, Spain you can get the local position of one vertex in the mesh node of the poly the local position is vrts[numvertex]+pnts[numvertex] vrts is the original local position and pnts is the tweak of this vertex example the position in x of the vertex 293 is pSphere1.vrtx[293]+pSphere1.pntx[293] __________________ larry@larryvizoso3d.com share quote
 05 May 2003 ktpr Frequenter if I understand this correctly you basically move a vertex by 0 and it returns the result, which you capture and use? cheers ktpr share quote
 05 May 2003 ktpr Frequenter # construct ??? thank you for the replies. they have helped. In the node reference, for subdiv surfaces, it says there is a node called "vertex", which is a compound type.(file://C:\Program%20Files\AliasWavefront\Maya4.5\docs\en_ US\html\Nodes\subdiv.html). It also says that the array can be accessed using the # construct but gives no example of how to use it. My attempt to get the info gets nothing. given subdivSphere1: float \$z[] = `getAttr subdivSphere1.vertex` print (\$z[0]); // " " <- no value I am trying to get the vector coords of a subd point in space, which I can already do with poly vertices. thank you for your time cheers ktpr share quote
 05 May 2003 alexx Yes, I Listen... as asd asdf Afghanistan i strongly recommend using the command xform , which has switches to query world space coordinates from anything.. cheers alexx share quote
 05 May 2003 TiKiMoN Bully of Jesters   Dave Stone Developer Nuvox Greenville, USA can you even select "points" on a subdivision surface? since they are evaluated through polygonal proxies, you can't actually select a "point" on the surface unless the detail level is extremely high, I would imagine. am I way off on this...? __________________ :=TiKiMoN share quote
 05 May 2003 TiKiMoN Bully of Jesters   Dave Stone Developer Nuvox Greenville, USA For any points, use pointPosition -w/-l (point)... the result is an array of 3 float values [float float float]. for example: I have a polygon sphere called pSphere1. world coordinates : pointPosition -w pSphere1.vtx[0]; local coordinates : pointPosition -l pSphere1.vtx[0]; Still not sure how well that will work for subd surfaces though. __________________ :=TiKiMoN Last edited by TiKiMoN : 05 May 2003 at 09:41 PM. share quote
 05 May 2003 ktpr Frequenter alex: thanks. Xform doesn't seem to work on vertices though. Select a sud vert and run "xform -q -r -os -m;" the values are the same for everything. --- tikimon: (man I feel like i'm working in the dark because no one knows much about subd. The documentation is hooorrrrible) Given a subd sphere named "subdivSphere1": setAttr "subdivSphere1.displayLevel" 1; // where 1 should be desired level pickWalk -d down; querySubdiv -a 4; // selects faces. string \$vertex_list[] = `subdListComponentConversion -ff -tv`; // print string for vertices All this being said, does anyone understand what the # means in the flag help documentation (file://C:\Program%20Files\AliasWavefront\Maya4.5\docs\en_ US\html\Nodes\flagHelp.html). I just need that damned coord of a subd vertex again thanks ktpr share quote
 05 May 2003 alexx Yes, I Listen... as asd asdf Afghanistan not -os.. that is object space i think (no maya here) ther is a -ws or something for world space.. i am about 102% sure.. roughly.. i counted twice cheers alexx share quote
 05 May 2003 ktpr Frequenter OMFG tikimon, you are my hero pointPosition -l subdivSphere1.smp[256][67108867]; works like charm now I can finish my poly uv transfer to subd script. Screw that weird # construct. ahhhh [edit - actually thanks goes to everyone who replied to this thread ] cheers ktpr share quote
 05 May 2003 TiKiMoN Bully of Jesters   Dave Stone Developer Nuvox Greenville, USA sweeeeeeeeeeeet. in an effort to make myself look less intelligent than it appeared before, I just browsed through the MEL documentation until I found that command. anyway, glad it works! __________________ :=TiKiMoN share quote
 01 January 2006 CGTalk Moderation Expert Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.