SlideShare a Scribd company logo
Maya Dynamics Basics
Lab 5: MEL and Expression
Author: Khieu Van Bang
Email: tribang.nd@gmail.com
CONTENTS
 Basics:
Why using MEL & expressions?
Differences between MEL and expression.
What you can do by using MEL and Expression ?
 MEL Basics:
 How Maya Uses MEL.
 Script Editor.
 MEL Commands .
 Variables .
 Return Values.
 Expression:
 Create expression.
 Helpful Resources.
1) BASICS
1.1) What is MEL and Expressions?
1.2) Differences between MEL and Expression.
1.3) What you can do by using MEL and Expression ?
MEL and Expression
1.1) What is MEL and Expressions?
1) MEL and Expression
 MEL stands for Maya Embedded Language. MEL is a scripting language which can
embody "open architecture" of maya. By using MEL, user can control maya functions
directly/indirectly. Even maya's GUI (graphic user interface) can be controlled by MEL.
Therefore user can add new functions that maya doesn't have OR customize GUI as
their needs.
 Expression controls attribute of object. User can control an animation which cannot
be key framed (e,g. particle). Using expression is similar to script MEL.
We will mainly learn how to work with Expression.
1.2) Differences between MEL and Expression.
1) MEL and Expression
MEL Expression
MEL is more likely completely independent
programme.
Expression is a correlation with objects.
MEL needs complete structure of grammar. Expression needs only the least rules.
MEL is executed no matter animation is played
or not.
Expression is executed only while animation
playing.
MEL is saved separately with the scene. Expression is saved as a part of the scene.
MEL access to the attribute indirectly. Expression access to the attribute directly.
1.3) What we can do by using MEL and Expression.
1) MEL and Expression
 MEL : control an attribute of object accurately, create new macro, create new user
interface, customize maya GUI.
 Expression : control attributes of object apart from key framing by numerical
expression, control attributes by conditions, It can use MEL command in expression.
However, it can't control the attribute that controlled by existing key, set driven key,
constraint, motion path or other expression. It can occur an error if you run MEL
commands such as connection/disconnection of attribute or creation/deletion of
object within the expression.
 Grammar of MEL is very similar to other programming languages like C, C++. Not
only the MEL, most script based languages are descended from C. It is not essential
to learn programming language for MEL. Although if you have experience with
scripting language, it will be easier to understand the structure.
 Do not worry !
1) MEL and Expression
o I know you are designers.
 Expression is very easy to use.
2) MEL BASICS
2.1) How Maya Uses MEL.
2.2) Script Editor.
2.3) MEL Commands .
2.4) Variables .
2.5) Return Values.
MEL and Expression
2.1) How Maya Uses MEL
2) MEL Basics
 Menus.
 Shelf Buttons.
 Hotkeys.
 Expressions.
 GUI.
2.2) Script Editor
 Top area displays the MEL that Maya just did.
 Bottom area is a work area where you type code interactively.
 Selecting text and hitting „ctrl + Enter‟ executes code.
 Make a shelf button by selecting text and middle mouse dragging to the shelf.
2) MEL Basics
 You get to it by hitting.
 Structure:
<command name> -flags values;
Example 1:
sphere -radius 3;
Example 2:
polySphere -radius 2.5 -subdivisionsX 10
-subdivisionsY 30 -name "Rambo";
These flags are like the option box settings.
2) MEL Basics
2.3) MEL Commands
Variable type Default value
int 0
float 0.0
string ""
 Modes :
Creation
-By default.
Edit
-Used to change values of an existing object.
Query
-Used to get a value from an existing object.
2) MEL Basics
2.3) MEL Commands
2.3) MEL Commands
2) MEL Basics
Examples of Modes:
- Creation
polySphere;
- Edit
polySphere -edit -radius 4 “Rambo”;
- Query
polySphere -query -radius “Rambo”;
2.4) Variables
- Are for storing data.
- Always start with a „$‟
- Data Types.
- Int (Stands for Integer)
4
- Float
7.259
- String
“Frito Chili Pie”
- Declaring a variable.
- int $theNumberAwesome = 42;
- Equals sign assigns a value to a variable.
2) MEL Basics
2.5) Return Values
 Are the result of running a command:
returnValue <command name> -flags values;
 Use backquotes to store the return value/result of a
command in a variable:
int $variable = <command name> -flags values;
2) MEL Basics
Example 1
2) MEL Basics
 MEL commands
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -tx 1 -ch 1;
 Command options
move -r -os -wd 0 0 5.109298 ;
move -r 0 0 5 pCube2;
Example 2
2) MEL Basics
 Variable declarations
int $height = 2;
polyCube -w 1 -h $height -d 1;
 Variable assignments
int $width;
$width = 2;
polyCube -w $width -h $height -d 1;
$width = $width + 1;
polyCube -w $width -h $height -d 1;
Example 3
2) MEL Basics
 Selective structure
int $height = 2;
int $depth;
if ($height>2)
{
$depth = $height;
polyCube -w 1 -h $height -d $depth;
}
if($depth < 1) { polySphere -r 1;
}
Example 4
2) MEL Basics
 The for-construct
int $i;
for ($i = 0; $i < 20; $i++) {
sphere -pivot 0 $i 0;
}
 A spiral surface
select -all;
delete;
circle -center 4 0 0;
int $i;
for($i = 0; $i < 60; $i++)
{ duplicate;
rotate -r 0 3 0;
move -r 0 .3 0;
}
select -all;
loft;
3) EXPRESSION
MEL and Expression
What is Particle expression ?
3) Expression
 Are more complex than other types of expressions. For example, we can write an
expression to control all particles in an object the same way, or you can control each
particle differently.
3.1) Attributes Notes
3) Expression
1
2
 Add dynamic attributes(Modify > Add Attribute)
o Control dynamic and custom attributes you add to a particle shape node.
o When we add a dynamic attribute to an object, the attribute names appear in the
Expression Editor’s Attributes list.
 Per Particle (Array) Attributes
o Are created with Radius, Mass, Opacity,
Color, and Incandescence per-particle
ramps already added to the nParticleShape
node.
 Step 1: Create a object.
o Example: Type "sphere" in command line and press enter. It will create a
new nurbs sphere.
 Step 2: Change object attributes.
o Example: Change the name of the sphere in channel box as "Ball".
 Step 3: Create expression.
o Select the ball. Go to Window > Animation Editor > Expression Editor,
run Expression Editor.
o Type in "ScaleBallWidth" in the box of Expression Name.
o Type "Ball.scaleX = Ball.scaleZ = time +1;" in the expression box.
3.1) Create expression
3) Expression
 Step 4: Click "Create" and playback the animation.
3.1) Create expression
3) Expression
3.1) Create expression
3) Expression
3) Expression
Example 1 : Random Colored Particle.
Random colored fireworks shot up into the sky every time
3) Expression
How to create it ?
Example 2: Control the moon orbiting the earth
3) Expression
3) Expression
How to create it ?
 Books
 Complete Maya Programming by
David A. D. Gould.
 Websites
 area.autodesk.com
 fundza.com
 ewertb.soundlinker.com
Helpful Resources.
MEL and Expression
Helpful Resources.
MEL and Expression
Helpful Resources.
MEL and Expression
Thanks!

More Related Content

What's hot

Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
Dr. Ramkumar Lakshminarayanan
 
Jide grids developer_guide
Jide grids developer_guideJide grids developer_guide
Jide grids developer_guide
Satheesh Somasekharan
 
Advance Excel tips
Advance Excel tips Advance Excel tips
Advance Excel tips
Ashish Patel
 
Csharp
CsharpCsharp
Csharp
vinayabburi
 
Gui programming a review - mixed content
Gui programming   a review - mixed contentGui programming   a review - mixed content
Gui programming a review - mixed content
Yogesh Kumar
 
Graphical User Interface in JAVA
Graphical User Interface in JAVAGraphical User Interface in JAVA
Graphical User Interface in JAVA
suraj pandey
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
yht4ever
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)
Bilal Amjad
 
Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput dataYash Sharma
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
Chain of Responsibility Pattern
Chain of Responsibility PatternChain of Responsibility Pattern
Chain of Responsibility Pattern
Hüseyin Ergin
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
SARASWATHI S
 
Part 12 built in function vb.net
Part 12 built in function vb.netPart 12 built in function vb.net
Part 12 built in function vb.net
Girija Muscut
 
Chapter 13.1.6
Chapter 13.1.6Chapter 13.1.6
Chapter 13.1.6patcha535
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1
PRN USM
 

What's hot (17)

Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
 
Jide grids developer_guide
Jide grids developer_guideJide grids developer_guide
Jide grids developer_guide
 
Advance Excel tips
Advance Excel tips Advance Excel tips
Advance Excel tips
 
Csharp
CsharpCsharp
Csharp
 
Gui programming a review - mixed content
Gui programming   a review - mixed contentGui programming   a review - mixed content
Gui programming a review - mixed content
 
Graphical User Interface in JAVA
Graphical User Interface in JAVAGraphical User Interface in JAVA
Graphical User Interface in JAVA
 
GUI Programming In Java
GUI Programming In JavaGUI Programming In Java
GUI Programming In Java
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)
 
Unit 6 Java
Unit 6 JavaUnit 6 Java
Unit 6 Java
 
Power of call symput data
Power of call symput dataPower of call symput data
Power of call symput data
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
 
Chain of Responsibility Pattern
Chain of Responsibility PatternChain of Responsibility Pattern
Chain of Responsibility Pattern
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
 
WPF Controls
WPF ControlsWPF Controls
WPF Controls
 
Part 12 built in function vb.net
Part 12 built in function vb.netPart 12 built in function vb.net
Part 12 built in function vb.net
 
Chapter 13.1.6
Chapter 13.1.6Chapter 13.1.6
Chapter 13.1.6
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1
 

Viewers also liked

Progression from prelim to final thriller film
Progression from prelim to final thriller filmProgression from prelim to final thriller film
Progression from prelim to final thriller film
tubze_t
 
Maya Python (PyMel)
Maya Python (PyMel)Maya Python (PyMel)
Maya Python (PyMel)
Melanie Torres Bisbal
 
Seni kriya clay lempung dari tepung l
Seni kriya clay lempung dari tepung lSeni kriya clay lempung dari tepung l
Seni kriya clay lempung dari tepung l
Lailatul Arofah
 
Kmew presentation
Kmew presentationKmew presentation
Kmew presentation
Ренат Муратшин
 
Magazine Genre Research
Magazine Genre ResearchMagazine Genre Research
Magazine Genre Research
christianragland
 
Nikravesh big datafeb2013bt
Nikravesh big datafeb2013btNikravesh big datafeb2013bt
Nikravesh big datafeb2013bt
Masoud Nikravesh
 
Happy birthday quote pictures
Happy birthday quote picturesHappy birthday quote pictures
Happy birthday quote pictures
kayum1
 
CoinTelegraph franchise program
CoinTelegraph franchise programCoinTelegraph franchise program
CoinTelegraph franchise program
CoinTelegraph
 
Javed sayyed resume
Javed sayyed resumeJaved sayyed resume
Javed sayyed resume
Javed Sayyed
 
Cruise in andaman
Cruise in andamanCruise in andaman
Cruise in andaman
andamannicobartourism
 
Properties of matter
Properties of matterProperties of matter
Properties of matterlatasant123
 
加鑫(蔣堂)產品目錄 2015
加鑫(蔣堂)產品目錄 2015加鑫(蔣堂)產品目錄 2015
加鑫(蔣堂)產品目錄 2015
mkt-jdg
 
Influence of micropolar lubricant on bearings performance a review(2)
Influence of micropolar lubricant on bearings performance a review(2)Influence of micropolar lubricant on bearings performance a review(2)
Influence of micropolar lubricant on bearings performance a review(2)
susheelpote
 
Vipra today july 2016
Vipra today july 2016Vipra today july 2016
Vipra today july 2016
Withs Technosolutions
 
RELIEVES / ESCULTURAS
RELIEVES / ESCULTURASRELIEVES / ESCULTURAS
RELIEVES / ESCULTURASWilliam Pico
 

Viewers also liked (17)

Progression from prelim to final thriller film
Progression from prelim to final thriller filmProgression from prelim to final thriller film
Progression from prelim to final thriller film
 
Maya Python (PyMel)
Maya Python (PyMel)Maya Python (PyMel)
Maya Python (PyMel)
 
Seni kriya clay lempung dari tepung l
Seni kriya clay lempung dari tepung lSeni kriya clay lempung dari tepung l
Seni kriya clay lempung dari tepung l
 
viaMAXI
viaMAXIviaMAXI
viaMAXI
 
Kmew presentation
Kmew presentationKmew presentation
Kmew presentation
 
Magazine Genre Research
Magazine Genre ResearchMagazine Genre Research
Magazine Genre Research
 
Nikravesh big datafeb2013bt
Nikravesh big datafeb2013btNikravesh big datafeb2013bt
Nikravesh big datafeb2013bt
 
Mathematica. 3[1]
Mathematica. 3[1]Mathematica. 3[1]
Mathematica. 3[1]
 
Happy birthday quote pictures
Happy birthday quote picturesHappy birthday quote pictures
Happy birthday quote pictures
 
CoinTelegraph franchise program
CoinTelegraph franchise programCoinTelegraph franchise program
CoinTelegraph franchise program
 
Javed sayyed resume
Javed sayyed resumeJaved sayyed resume
Javed sayyed resume
 
Cruise in andaman
Cruise in andamanCruise in andaman
Cruise in andaman
 
Properties of matter
Properties of matterProperties of matter
Properties of matter
 
加鑫(蔣堂)產品目錄 2015
加鑫(蔣堂)產品目錄 2015加鑫(蔣堂)產品目錄 2015
加鑫(蔣堂)產品目錄 2015
 
Influence of micropolar lubricant on bearings performance a review(2)
Influence of micropolar lubricant on bearings performance a review(2)Influence of micropolar lubricant on bearings performance a review(2)
Influence of micropolar lubricant on bearings performance a review(2)
 
Vipra today july 2016
Vipra today july 2016Vipra today july 2016
Vipra today july 2016
 
RELIEVES / ESCULTURAS
RELIEVES / ESCULTURASRELIEVES / ESCULTURAS
RELIEVES / ESCULTURAS
 

Similar to Session 05 – mel and expression

Mel for beginners
Mel for beginnersMel for beginners
Mel for beginners
kedar nath
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICA
emtrajano
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
Luca Berardinelli
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180
Mahmoud Samir Fayed
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_arguments
Ruth Marvin
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Balint Erdi
 
SMARCOS CNR Paper Supporting Transformations across user interface
SMARCOS CNR Paper Supporting Transformations across user interfaceSMARCOS CNR Paper Supporting Transformations across user interface
SMARCOS CNR Paper Supporting Transformations across user interfaceSmarcos Eu
 
The future of DSLs - functions and formal methods
The future of DSLs - functions and formal methodsThe future of DSLs - functions and formal methods
The future of DSLs - functions and formal methods
Markus Voelter
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
JOSEPHINEA6
 
Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011
Mickael Istria
 
The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210
Mahmoud Samir Fayed
 
EGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL OpenEGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL Open
Will Smythe
 
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
Dynamic and Generic Manipulation of Models: From Introspection to ScriptingDynamic and Generic Manipulation of Models: From Introspection to Scripting
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
vanwormhoudt
 
Mule expression language
Mule expression languageMule expression language
Mule expression language
sathyaraj Anand
 
Mule Expression language
Mule Expression languageMule Expression language
Mule Expression language
Mani Rathnam Gudi
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3
Vijay Perepa
 
UML: Once More with Meaning
UML: Once More with MeaningUML: Once More with Meaning
UML: Once More with Meaning
Ed Seidewitz
 
Functions in Python Syntax and working .
Functions in Python Syntax and working .Functions in Python Syntax and working .
Functions in Python Syntax and working .
tarunsharmaug23
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
Son Nguyen
 

Similar to Session 05 – mel and expression (20)

Mel for beginners
Mel for beginnersMel for beginners
Mel for beginners
 
VBA
VBAVBA
VBA
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICA
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180 The Ring programming language version 1.5.1 book - Part 174 of 180
The Ring programming language version 1.5.1 book - Part 174 of 180
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_arguments
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
SMARCOS CNR Paper Supporting Transformations across user interface
SMARCOS CNR Paper Supporting Transformations across user interfaceSMARCOS CNR Paper Supporting Transformations across user interface
SMARCOS CNR Paper Supporting Transformations across user interface
 
The future of DSLs - functions and formal methods
The future of DSLs - functions and formal methodsThe future of DSLs - functions and formal methods
The future of DSLs - functions and formal methods
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011
 
The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210The Ring programming language version 1.9 book - Part 98 of 210
The Ring programming language version 1.9 book - Part 98 of 210
 
EGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL OpenEGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL Open
 
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
Dynamic and Generic Manipulation of Models: From Introspection to ScriptingDynamic and Generic Manipulation of Models: From Introspection to Scripting
Dynamic and Generic Manipulation of Models: From Introspection to Scripting
 
Mule expression language
Mule expression languageMule expression language
Mule expression language
 
Mule Expression language
Mule Expression languageMule Expression language
Mule Expression language
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3
 
UML: Once More with Meaning
UML: Once More with MeaningUML: Once More with Meaning
UML: Once More with Meaning
 
Functions in Python Syntax and working .
Functions in Python Syntax and working .Functions in Python Syntax and working .
Functions in Python Syntax and working .
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 

More from Trí Bằng

Session 11 – fluid effects
Session 11 – fluid effectsSession 11 – fluid effects
Session 11 – fluid effects
Trí Bằng
 
Session 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanterSession 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanter
Trí Bằng
 
Session 09 – particle goal
Session 09 – particle goalSession 09 – particle goal
Session 09 – particle goal
Trí Bằng
 
Session 08 – particle instancer
Session 08 – particle instancerSession 08 – particle instancer
Session 08 – particle instancer
Trí Bằng
 
Session 07 – object desintegration
Session 07 – object desintegrationSession 07 – object desintegration
Session 07 – object desintegration
Trí Bằng
 
Session 06 – particle materials
Session 06 – particle materialsSession 06 – particle materials
Session 06 – particle materials
Trí Bằng
 
Session 04 – field &amp; collision effect
Session 04 – field &amp; collision effectSession 04 – field &amp; collision effect
Session 04 – field &amp; collision effect
Trí Bằng
 
Session 03 – emitters
Session 03 – emittersSession 03 – emitters
Session 03 – emitters
Trí Bằng
 
Session 02 – animation particle basics
Session 02 – animation particle basicsSession 02 – animation particle basics
Session 02 – animation particle basics
Trí Bằng
 
Session 01 – introduces maya dynamics
Session 01 – introduces maya dynamicsSession 01 – introduces maya dynamics
Session 01 – introduces maya dynamics
Trí Bằng
 
Session 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya DynamicsSession 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya Dynamics
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNHThiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAYThiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYAThiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬTThiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬTThiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
Trí Bằng
 
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNHThiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
Trí Bằng
 

More from Trí Bằng (20)

Session 11 – fluid effects
Session 11 – fluid effectsSession 11 – fluid effects
Session 11 – fluid effects
 
Session 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanterSession 10 – advanced goal &amp; instanter
Session 10 – advanced goal &amp; instanter
 
Session 09 – particle goal
Session 09 – particle goalSession 09 – particle goal
Session 09 – particle goal
 
Session 08 – particle instancer
Session 08 – particle instancerSession 08 – particle instancer
Session 08 – particle instancer
 
Session 07 – object desintegration
Session 07 – object desintegrationSession 07 – object desintegration
Session 07 – object desintegration
 
Session 06 – particle materials
Session 06 – particle materialsSession 06 – particle materials
Session 06 – particle materials
 
Session 04 – field &amp; collision effect
Session 04 – field &amp; collision effectSession 04 – field &amp; collision effect
Session 04 – field &amp; collision effect
 
Session 03 – emitters
Session 03 – emittersSession 03 – emitters
Session 03 – emitters
 
Session 02 – animation particle basics
Session 02 – animation particle basicsSession 02 – animation particle basics
Session 02 – animation particle basics
 
Session 01 – introduces maya dynamics
Session 01 – introduces maya dynamicsSession 01 – introduces maya dynamics
Session 01 – introduces maya dynamics
 
Session 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya DynamicsSession 00 – Course overview Maya Dynamics
Session 00 – Course overview Maya Dynamics
 
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNHThiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
Thiết kế 3D_cơ_bản với Maya_Bài_16._DỰNG_CẢNH_VÀ_PHỐI_CẢNH
 
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAYThiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
Thiết kế 3D_cơ_bản với Maya_Bài_14._MENTALRAY
 
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
Thiết kế 3D_cơ_bản với Maya_Bài_12._HOẠT CẢNH (ANIMATION)
 
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 2
 
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
Thiết kế 3D_cơ_bản với Maya_Bài_11._VẬT LIỆU NANG CAO TRONG MAYA PHẦN 1
 
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYAThiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
Thiết kế 3D_cơ_bản với Maya_Bài_10._VẬT LIỆU CƠ BẢN TRONG MAYA
 
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬTThiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_8._DỰNG HINH THỰC VẬT
 
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬTThiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
Thiết kế 3D_cơ_bản với Maya_Bài_6.__DỰNG HÌNH ĐỒ VẬT
 
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNHThiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
Thiết kế 3D_cơ_bản với Maya_Bài_5._PHƯƠNG PHÁP MODELING - DỰNG HÌNH
 

Recently uploaded

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 

Recently uploaded (20)

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 

Session 05 – mel and expression

  • 1. Maya Dynamics Basics Lab 5: MEL and Expression Author: Khieu Van Bang Email: tribang.nd@gmail.com
  • 2. CONTENTS  Basics: Why using MEL & expressions? Differences between MEL and expression. What you can do by using MEL and Expression ?  MEL Basics:  How Maya Uses MEL.  Script Editor.  MEL Commands .  Variables .  Return Values.  Expression:  Create expression.  Helpful Resources.
  • 3. 1) BASICS 1.1) What is MEL and Expressions? 1.2) Differences between MEL and Expression. 1.3) What you can do by using MEL and Expression ? MEL and Expression
  • 4. 1.1) What is MEL and Expressions? 1) MEL and Expression  MEL stands for Maya Embedded Language. MEL is a scripting language which can embody "open architecture" of maya. By using MEL, user can control maya functions directly/indirectly. Even maya's GUI (graphic user interface) can be controlled by MEL. Therefore user can add new functions that maya doesn't have OR customize GUI as their needs.  Expression controls attribute of object. User can control an animation which cannot be key framed (e,g. particle). Using expression is similar to script MEL. We will mainly learn how to work with Expression.
  • 5. 1.2) Differences between MEL and Expression. 1) MEL and Expression MEL Expression MEL is more likely completely independent programme. Expression is a correlation with objects. MEL needs complete structure of grammar. Expression needs only the least rules. MEL is executed no matter animation is played or not. Expression is executed only while animation playing. MEL is saved separately with the scene. Expression is saved as a part of the scene. MEL access to the attribute indirectly. Expression access to the attribute directly.
  • 6. 1.3) What we can do by using MEL and Expression. 1) MEL and Expression  MEL : control an attribute of object accurately, create new macro, create new user interface, customize maya GUI.  Expression : control attributes of object apart from key framing by numerical expression, control attributes by conditions, It can use MEL command in expression. However, it can't control the attribute that controlled by existing key, set driven key, constraint, motion path or other expression. It can occur an error if you run MEL commands such as connection/disconnection of attribute or creation/deletion of object within the expression.  Grammar of MEL is very similar to other programming languages like C, C++. Not only the MEL, most script based languages are descended from C. It is not essential to learn programming language for MEL. Although if you have experience with scripting language, it will be easier to understand the structure.
  • 7.  Do not worry ! 1) MEL and Expression o I know you are designers.  Expression is very easy to use.
  • 8. 2) MEL BASICS 2.1) How Maya Uses MEL. 2.2) Script Editor. 2.3) MEL Commands . 2.4) Variables . 2.5) Return Values. MEL and Expression
  • 9. 2.1) How Maya Uses MEL 2) MEL Basics  Menus.  Shelf Buttons.  Hotkeys.  Expressions.  GUI.
  • 10. 2.2) Script Editor  Top area displays the MEL that Maya just did.  Bottom area is a work area where you type code interactively.  Selecting text and hitting „ctrl + Enter‟ executes code.  Make a shelf button by selecting text and middle mouse dragging to the shelf. 2) MEL Basics  You get to it by hitting.
  • 11.  Structure: <command name> -flags values; Example 1: sphere -radius 3; Example 2: polySphere -radius 2.5 -subdivisionsX 10 -subdivisionsY 30 -name "Rambo"; These flags are like the option box settings. 2) MEL Basics 2.3) MEL Commands Variable type Default value int 0 float 0.0 string ""
  • 12.  Modes : Creation -By default. Edit -Used to change values of an existing object. Query -Used to get a value from an existing object. 2) MEL Basics 2.3) MEL Commands
  • 13. 2.3) MEL Commands 2) MEL Basics Examples of Modes: - Creation polySphere; - Edit polySphere -edit -radius 4 “Rambo”; - Query polySphere -query -radius “Rambo”;
  • 14. 2.4) Variables - Are for storing data. - Always start with a „$‟ - Data Types. - Int (Stands for Integer) 4 - Float 7.259 - String “Frito Chili Pie” - Declaring a variable. - int $theNumberAwesome = 42; - Equals sign assigns a value to a variable. 2) MEL Basics
  • 15. 2.5) Return Values  Are the result of running a command: returnValue <command name> -flags values;  Use backquotes to store the return value/result of a command in a variable: int $variable = <command name> -flags values; 2) MEL Basics
  • 16. Example 1 2) MEL Basics  MEL commands polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -tx 1 -ch 1;  Command options move -r -os -wd 0 0 5.109298 ; move -r 0 0 5 pCube2;
  • 17. Example 2 2) MEL Basics  Variable declarations int $height = 2; polyCube -w 1 -h $height -d 1;  Variable assignments int $width; $width = 2; polyCube -w $width -h $height -d 1; $width = $width + 1; polyCube -w $width -h $height -d 1;
  • 18. Example 3 2) MEL Basics  Selective structure int $height = 2; int $depth; if ($height>2) { $depth = $height; polyCube -w 1 -h $height -d $depth; } if($depth < 1) { polySphere -r 1; }
  • 19. Example 4 2) MEL Basics  The for-construct int $i; for ($i = 0; $i < 20; $i++) { sphere -pivot 0 $i 0; }  A spiral surface select -all; delete; circle -center 4 0 0; int $i; for($i = 0; $i < 60; $i++) { duplicate; rotate -r 0 3 0; move -r 0 .3 0; } select -all; loft;
  • 20. 3) EXPRESSION MEL and Expression
  • 21. What is Particle expression ? 3) Expression  Are more complex than other types of expressions. For example, we can write an expression to control all particles in an object the same way, or you can control each particle differently.
  • 22. 3.1) Attributes Notes 3) Expression 1 2  Add dynamic attributes(Modify > Add Attribute) o Control dynamic and custom attributes you add to a particle shape node. o When we add a dynamic attribute to an object, the attribute names appear in the Expression Editor’s Attributes list.  Per Particle (Array) Attributes o Are created with Radius, Mass, Opacity, Color, and Incandescence per-particle ramps already added to the nParticleShape node.
  • 23.  Step 1: Create a object. o Example: Type "sphere" in command line and press enter. It will create a new nurbs sphere.  Step 2: Change object attributes. o Example: Change the name of the sphere in channel box as "Ball".  Step 3: Create expression. o Select the ball. Go to Window > Animation Editor > Expression Editor, run Expression Editor. o Type in "ScaleBallWidth" in the box of Expression Name. o Type "Ball.scaleX = Ball.scaleZ = time +1;" in the expression box. 3.1) Create expression 3) Expression
  • 24.  Step 4: Click "Create" and playback the animation. 3.1) Create expression 3) Expression
  • 26. 3) Expression Example 1 : Random Colored Particle.
  • 27. Random colored fireworks shot up into the sky every time 3) Expression How to create it ?
  • 28. Example 2: Control the moon orbiting the earth 3) Expression
  • 29. 3) Expression How to create it ?
  • 30.  Books  Complete Maya Programming by David A. D. Gould.  Websites  area.autodesk.com  fundza.com  ewertb.soundlinker.com Helpful Resources. MEL and Expression