Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 16-08-2011 , 08:02 PM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Expression invalid after edit

i'm looking for some help on this expression
this is my first expression, so please be gentle.....;-)
maybe i took a complete wrong aproach,... i'm learning and asking for help

thank you...

trying to bend a 3vertex cv.curve equaly

https://www.ieoie.nl/Maya/003_Bending.zip
extract and press play.....

the centre sphere is not moving as i expect it should move without the red second statement

it should always be in the middle of the 2 outer spheres, and translate in Y accordingly

so i tried adding second statement to my both "else if", but when doing so it is not working anymore....
i added this second statement cause it seems the translateY does not know if the spheres are moving away or towards each other

if (Total_LengthShape.distance == 200)
{
Centre_Sphere.translateY = 0;
Centre_Sphere.translateZ = 0;
}

else if (Total_LengthShape.distance > 200) && (Total_LengthShape.distance.time -1 <= Total_LengthShape.distance.time))
{
Centre_Sphere.translateY = Centre_Sphere.translateY - 0.5;
Centre_Sphere.translateZ = (distanceDimensionShape4.distance - distanceDimensionShape5.distance) / -2;
}

else if (Total_LengthShape.distance < 200) && (Total_LengthShape.distance.time -1 >= Total_LengthShape.distance.time))
{
Centre_Sphere.translateY = Centre_Sphere.translateY + 0.8;
Centre_Sphere.translateZ = (distanceDimensionShape4.distance - distanceDimensionShape5.distance) / -2;
}


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl

Last edited by ieoie; 16-08-2011 at 08:12 PM. Reason: mis spelled
# 2 17-08-2011 , 08:31 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
I don't think "Total_LengthShape.distance.time" exists and also lines like...

else if (Total_LengthShape.distance > 200) && (Total_LengthShape.distance.time -1 <= Total_LengthShape.distance.time))

cause syntax issues because of missing parentheses, it should be...

else if ((Total_LengthShape.distance > 200) && (Total_LengthShape.distance.time -1 <= Total_LengthShape.distance.time))


I don't quite know what you're after but if the middle sphere should only be moving in the Y axis then why include the Z axis in the expression at all? I opened the scene and commented out the lines concerning the Z axis and the center sphere went up and down as the two end spheres moved back and forth.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 3 17-08-2011 , 04:13 PM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

I don't think "Total_LengthShape.distance.time" exists and also lines like...

else if (Total_LengthShape.distance > 200) && (Total_LengthShape.distance.time -1 <= Total_LengthShape.distance.time))

cause syntax issues because of missing parentheses, it should be...

else if ((Total_LengthShape.distance > 200) && (Total_LengthShape.distance.time -1 <= Total_LengthShape.distance.time))


I don't quite know what you're after but if the middle sphere should only be moving in the Y axis then why include the Z axis in the expression at all? I opened the scene and commented out the lines concerning the Z axis and the center sphere went up and down as the two end spheres moved back and forth.



Thank you for your reply

i think you are right, that the .time i use is not possible
i tried using that cause in my opinion that is what is needed to get it working properly
i could be completely wrong ofcourse

since this is my first expression, i do the best i can, but it seems my knowledge of expressions is not sufficiant to create what i intend.....

the idea of the .time, was to let the expression check the previous distance and the current distance, and then use a < or > formula to let it know the spheres are moving towards each other or away from each other and change the movement in Y accordingly

so the output would be more accurate to the animation and aim of what i try to create

the Z axe is in the equasion because the centre sphere has to be in the exact centre between the 2 outer spheres

herewith my latest file and a little video to explain where my goal lies
https://www.ieoie.nl/Maya/005_Bending.zip

thank you for your time
hoping we can solve this here at the forum......


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl

Last edited by ieoie; 17-08-2011 at 04:15 PM. Reason: forgot something
# 4 18-08-2011 , 12:18 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Why are you doing this with an expression? Why not do it with a set driven key?


Imagination is more important than knowledge.
# 5 18-08-2011 , 02:07 AM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Why are you doing this with an expression? Why not do it with a set driven key?

i do not know what a driven key is, or how to set one up......
did you see my video.... so you exact what my aim is...???

if you can spare some time to make a small tutorial for me, that shows me how to do this driven key thingy.... and also shows me how to duplicate it, for instance 3-5 duplicates

i am open for new ideas.....thank you....

the idea is i can parent this construction on other animated geometric objects, a cube for instance
a scale animation on that cube would activate the construction instead of me keying values

i can imagine a scene with easily 100 of these curves.....

one of the experiments...., making from a straight edged cube, a shape that points out the vertices of the cube only using circles instead of straight tubes....

and i would like to play with it.... making it huge or realy tiny, and then on a icosahedron for instance and see what patterns come out....;-)
stuff like that....

thank you for your insight....
hoping you drop me a small tutorial in my box that explains your idea on my construction....

enjoy....


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
# 6 18-08-2011 , 02:12 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Sure, I'll give it a go. Also, having a lot of expressions in your scene can cause it to dramatically slow down If you can you would usually want to build it with utility nodes instead.


Imagination is more important than knowledge.
# 7 18-08-2011 , 02:19 AM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Sure, I'll give it a go. Also, having a lot of expressions in your scene can cause it to dramatically slow down If you can you would usually want to build it with utility nodes instead.

woow thanx....

feel free to elaborate.... as much a you want....;-)
cause you use words i do not understand....

if the video becomes to big in size... no wurries......
i can share an ftp directory when needed....

i have a pretty strong computer to compute, so loading heavy files is not that of a problem...
at least upto now....;-)

it is an idea i want to explore.... so we see how it goes.....

thank you for your quick reply and sharing your insights in Maya
they are welcomed with open arms.....


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
# 8 18-08-2011 , 03:24 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Alright. Just finished recording, and am just touching it up before I send it out. I actually cover both the set driven key, and a brief overview of utility nodes. Hopefully you learn something from it.


Imagination is more important than knowledge.
# 9 18-08-2011 , 03:45 AM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Alright. Just finished recording, and am just touching it up before I send it out. I actually cover both the set driven key, and a brief overview of utility nodes. Hopefully you learn something from it.

ok

very curious....
almost cannot wait....;-)
very curious if this could do what i want it to do....

yesterday when my head started to blow from this expression i found out i could make my own UI element through MEL
mannnn.... this is very handy.....
how wundorous this maya is.... one complete setup of a few hours, in just one click now... yummies...

always was afraid of this programming stuff...
seems i can handle more then i thought after some time in Maya.....

Thank you again....
for your effort, and sharing way of life.....

enjoy


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
# 10 18-08-2011 , 05:29 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Hey mate, you'll just have to wait a little longer! It's 1:30 am here, so I need to crash. (Which is exactly what my video editing software has been doing... Go figure.)

I'll upload it first thing in the morning!


Imagination is more important than knowledge.
# 11 18-08-2011 , 01:22 PM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Hey mate, you'll just have to wait a little longer! It's 1:30 am here, so I need to crash. (Which is exactly what my video editing software has been doing... Go figure.)

I'll upload it first thing in the morning!



thank you...


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
# 12 18-08-2011 , 05:15 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988


Imagination is more important than knowledge.
# 13 18-08-2011 , 05:49 PM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

Here you go! Enjoy!

Maya set driven key and utility node tutorial - YouTube


alridey.....
this seems to be the answer
and pretty simple aswell.....amazing.....

thank you very, very much....


gonna try to recreate it right away.....
and make a scene with the ultimate test... see if it works in all my possibilties
will keep you updated.....

wooow... its a simple concept....
Maya is very huge to explore autodidactly.....;-)

thx.....


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
# 14 18-08-2011 , 07:02 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
No problem, glad to help!


Imagination is more important than knowledge.
# 15 18-08-2011 , 07:45 PM
ieoie's Avatar
Registered User
Join Date: Aug 2007
Location: The Netherlands
Posts: 88

No problem, glad to help!


Thx For all the effort
its amazing to see you can controll objects by using utilities in the hypershade
alsways thought Hypershade was only for coloring things.....
that driver key thing, is pretty promising, thank you for bringing this animation option in my attention.......

it works just fine when i construct it
but then when i connect it in one of my animated cubes it goes bezirk.....
thought i found a workaround but it still is not as it should be

looking for a way to solve it...
but it does not move as expected......

creating this bending tube is just step one....
of my puzzle.....

if you care to help some more we might can do a screenshare through mikogo or skype?
this way i can show a little deeper how i was used to construct and animate geometry....

maybe when you see this you say..... ooof, just adjust this or that and it works just fine....;-)

then we putt the result on the forum and close the thread

great tips...;-) sry its not working as planned
thx sofar.....

hope to hear from you again....
;-)


*
The Universe is larger then you ever can think, But smaller then the size of your imagination.

all are welcome at www.ieoie.nl
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads