Photoshop Maya 3DS Max Blender Bryce Corel DRAW Cult3D Flash Bodypaint 3D Cinema 4D LightWave 3D ZBrush Rhinoceros SoftImage XSI Vue d'Esprit x

Autodesk Maya Scripts tutorials

Showing tutorials 0 to 20 out of 24 Scripts tutorials.

ADVERTISMENT

ADVERTISMENT

In this chapter we will explore the power and functions of MEL script editor

An Introduction to Script Editor

In this chapter we will explore the power and functions of MEL script editor.

Rated:*** with 278 hits  Added on: Apr 15, 2008

The most fundamental aspect of MEL is command  In this chapter we will gain understanding of MEL commands

The MEL Command Syntax

The most fundamental aspect of MEL is command. In this chapter we will gain understanding of MEL commands.

Rated:*** with 233 hits  Added on: Apr 15, 2008

When you open the Maya  it first runs plenty of scripts that actually builds all the interface windows and elements you see    Maya itself has no interface  You can use Maya without using its interface  In this chapter we will discuss about the Maya   Prompt and use it to create a Maya file

Maya Prompt

When you open the Maya, it first runs plenty of scripts that actually builds all the interface windows and elements you see. Maya itself has no interface. You can use Maya without using its interface. In this chapter we will discuss about the Maya Prompt and use it to create a Maya file.

Rated:*** with 209 hits  Added on: Apr 15, 2008

Variable is essentially a placeholder for data  Once we store data in the placeholder we manipulate and change the value of   that data  whenever we want to  In this chapter we will explore variables deeply

Values & Variables

Variable is essentially a placeholder for data. Once we store data in the placeholder we manipulate and change the value of that data, whenever we want to. In this chapter we will explore variables deeply.

Rated:*** with 140 hits  Added on: Apr 15, 2008

  In this chapter we will examine the process and techniques to control the flow of the script  Loops let us repeat a command     over and over  Loops check a condition and then continuously loop as long as condition stands true  Before we dig deep into   looping  let us first understand how to test and compare values in MEL

An Introduction to Programming Concepts

In this chapter we will examine the process and techniques to control the flow of the script. Loops let us repeat a command over and over. Loops check a condition and then continuously loop as long as condition stands true. Before we dig deep into looping, let us first understand how to test and compare values in MEL.

Rated:*** with 156 hits  Added on: Apr 15, 2008

Attribute  MEL term Attr  is any item that lives inside the Maya node  In this chapter we will learn commands like listAttr      setAttr and getAttr

Attributes

Attribute (MEL term Attr) is any item that lives inside the Maya node. In this chapter we will learn commands like listAttr, setAttr and getAttr.

Rated:*** with 199 hits  Added on: Apr 15, 2008

Your scripts should be neat  elegant  boolet proof and properly included comments  This chapter is about Style of MEL script

The Style

Your scripts should be neat, elegant, boolet-proof and properly included comments. This chapter is about Style of MEL script.

Rated:*** with 149 hits  Added on: Apr 15, 2008

MEL allows scripters to save maya scripts inside of Maya file  In this chapter we will create and explore MEL script nodes

MEL Script Nodes

MEL allows scripters to save maya scripts inside of Maya file. In this chapter we will create and explore MEL script nodes.

Rated:*** with 211 hits  Added on: Apr 15, 2008

system command executes commands from the shell  The output of the executed command is returned as string  This command is     used to execute OS commands  In this chapter we will examine the system command and build a backup system using winzip

Hello Mr. OS

system command executes commands from the shell. The output of the executed command is returned as string. This command is used to execute OS commands. In this chapter we will examine the system command and build a backup system using winzip.

Rated:*** with 175 hits  Added on: Apr 15, 2008

  The Uninstancer Mel Script for Maya allows you to bake particle instances into geometry  animation  and blendshapes that can be modified and updated without messing around with dynamics and expressions

Uninstancer Mel Script for Maya

The Uninstancer Mel Script for Maya allows you to bake particle instances into geometry, animation, and blendshapes that can be modified and updated without messing around with dynamics and expressions.

Rated:*** with 507 hits  Added on: Mar 04, 2008

From our website  www tjgalda com    Skill level  intermediate    How do you query the colour in a ramp at any given point     Frustratingly  this isnt quite as simple as it sounds  Even the technical documentation from Autodesk states     Currently the routines to get the value of a ramp structure  with interpolation  are not available through MEL  which limits the use of this control by end users     So  we have to work around it in this case  We are able to sample the ramp and get back i how many colour entries there are  ii where they are in the ramp and iii  what colour they are  From that data  we can approximate fairly well what the ramp looks like  Lets build the tool for our example to do so on a relatively simple scale  You can add complexity later  but to keep things simple  were going to sample a simple ramp with two colours and a linear interpolation between the two colours  A ramp such as this mel code will create     Note  you can view all the mel on the website  www tjgalda com      Create the gradient using a ramp   string  tempName    shadingNode  asShader ramp    string  tj rampNode    rename  tempName tj gradientColour    string  tj rampWin    window  t tj Ramp Viewer tj rampWin    columnLayout   rampColorPort  node  tj rampNode   showWindow  tj rampWin     setAttr   tj rampNode    colorEntryList 0  color   type double3 0 988 1 0 8    setAttr   tj rampNode    colorEntryList 1  color   type double3 0 0 0 235    setAttr   tj rampNode    colorEntryList 1  position  1 0   removeMultiInstance  break true   tj rampNode    colorEntryList 2     showWindow  tj rampWin         Now that we have the ramp  we can gather information about the ramp  We need to determine where are they and what colour  create an array to catch each position and match the entry in the list of the ramp  Finally we will create an array to catch colour  use a vector array to maintain match in the list of the ramp     Where are they and what colour  Create an array to catch each position and match entry in list   int  entries    getAttr  size   tj rampNode  colorEntryList     vector  entry colour     for   i   0   i    entries   i          entry pos  i     getAttr   tj rampNode  colorEntryList   i   position     float  entryList colours      getAttr   tj rampNode  colorEntryList   i   color      entry colour  i        entryList colours 0   entryList colours 1    entryList colours 2             and print back the results  print   n entry pos   is n                  n     print  entry pos   print   nn                  n entry colour   is n                  n    print  entry colour          entry pos   is                      0  1                       entry colour   is                      0 988 1 0 8  0 0 0 235    In our example now  we can see that we have the two colour entries at 0 and 1  with the associated colour mix  Now we can work with some basic calculations to deduce what the colours are between  After we know the colour information  we can then begin to deduce what the ramp is like  The first step is to find the difference or delta between the two colours on each channel  From there  we can divide up the colour on regular intervals and determine what the exact colour is at any specific point on the map     This is a sampling step  How many intervals should we break the ramp into   int  step   20         Find the delta difference for each channel  Use temp vectors to get data out of the array easily  For our example to keep it simple  we can make some assumptions about where each entry is and what colours they are  We will assume only two colours  and that the first colour is brighter  Of course  one should build in robustness to remove these assumptions with true data     vector  tempTopV    entry colour 0    vector  tempBotV    entry colour 1      Use absolute to ensure its not a negative value  float  differenceR    abs  tempTopV x    tempBotV x     float  differenceG    abs  tempTopV y    tempBotV y     float  differenceB    abs  tempTopV z    tempBotV z           Divide up the delta per step  This is the amount of change per step that each colour travels   float  deltaStepR    differenceR    step   float  deltaStepG    differenceG    step   float  deltaStepB    differenceB    step         Now  start number    delta per step   the number of steps    end number  in other words  we have broken down what the difference can be at each interval  Finalize by building the arrays   float  colourStepsR     colourStepsG     colourStepsB      colourStepsR 0     tempBotV x    colourStepsG 0     tempBotV y    colourStepsB 0     tempBotV z         Each new step is the old step   the delta for that colour   for   i   1   i     step   i         colourStepsR  i     colourStepsR  i   1     deltaStepR    colourStepsG  i     colourStepsG  i   1     deltaStepG    colourStepsB  i     colourStepsB  i   1     deltaStepB        print   n                   n Colour intervals for R with a step of    deltaStepR    is n     print  colourStepsR   print   n                   n Colour intervals for G with a step of    deltaStepG    is n     print  colourStepsG   print   n                   n Colour intervals for B with a step of    deltaStepB    is n     print  colourStepsB           The results for our simple example are printed below  Of course  from here the complexity only increases  One needs to take in to account the type of interpolation  and the number of entries  but the procedure of sampling will all remain the same as outlined above     As you can see  its a lot of legwork for looking up a simple colour attribute         tj July 2006    Note  you can view all the mel on the website  www tjgalda com                             Colour intervals for R  with a step of 0 04939999878  is   0  0 0494  0 0988  0 1482  0 1976  0 247  0 2964  0 3458  0 3952  0 4446  0 494  0 5434  0 5928  0 6422  0 6916  0 741  0 7904  0 8398  0 8892  0 9386  0 988                       Colour intervals for G  with a step of 0 05  is   0  0 05  0 1  0 15  0 2  0 25  0 3  0 35  0 4  0 45  0 5  0 55  0 6  0 65  0 7  0 75  0 8  0 85  0 9  0 95  1                       Colour intervals for B  with a step of 0 02825000063  is   0 235  0 26325  0 2915  0 31975  0 348  0 37625  0 4045  0 43275  0 461  0 48925  0 5175  0 54575  0 574  0 60225        Note  you can view all the mel on the website  www tjgalda com    If you like this tutorial  or have ideas for other topics  let me know     tj

How to sample color at any given point in a ramp

From our website: www.tjgalda.com Skill level: intermediate How do you query the colour in a ramp at any given point? Frustratingly, this isnt quite as simple as it sounds. Even the technical documentation from Autodesk states: Currently the routines to get the value of a ramp structure (with interpolation) are not available through MEL, which limits the use of this control by end users. So, we have to work around it in this case. We are able to sample the ramp and get back i)how many colour entries there are, ii)where they are in the ramp and iii) what colour they are. From that data, we can approximate fairly well what the ramp looks like. Lets build the tool for our example to do so on a relatively simple scale. You can add complexity later, but to keep things simple, were going to sample a simple ramp with two colours and a linear interpolation between the two colours. A ramp such as this mel code will create: Note: you can view all the mel on the website. www.tjgalda.com Create the gradient using a ramp: string $tempName = `shadingNode -asShader ramp`; string $tj_rampNode = `rename $tempName tj_gradientColour`; string $tj_rampWin = `window -t tj Ramp Viewer tj_rampWin`; columnLayout; rampColorPort -node $tj_rampNode; showWindow $tj_rampWin; setAttr ($tj_rampNode + .colorEntryList[0].color) -type double3 0.988 1 0.8 ; setAttr ($tj_rampNode + .colorEntryList[1].color) -type double3 0 0 0.235 ; setAttr ($tj_rampNode + .colorEntryList[1].position) 1.0; removeMultiInstance -break true ($tj_rampNode + .colorEntryList[2]); showWindow $tj_rampWin; Now that we have the ramp, we can gather information about the ramp. We need to determine where are they and what colour, create an array to catch each position and match the entry in the list of the ramp. Finally we will create an array to catch colour, use a vector array to maintain match in the list of the ramp. Where are they and what colour? Create an array to catch each position and match entry in list. int $entries = `getAttr -size ($tj_rampNode+.colorEntryList)`; vector $entry_colour[]; for ($i = 0; $i < $entries; $i ++) { $entry_pos[$i] = `getAttr ($tj_rampNode+.colorEntryList[+$i+].position)`; float $entryList_colours[] = `getAttr ($tj_rampNode+.colorEntryList[+$i+].color)`; $entry_colour[$i] = >; } //and print back the results print ("n$entry_pos[] is n==================n"); print $entry_pos; print ("nn==================n$entry_colour[] is n==================n); print $entry_colour; $entry_pos[] is ================== 0 1 ================== $entry_colour[] is ================== 0.988 1 0.8 0 0 0.235 In our example now, we can see that we have the two colour entries at 0 and 1, with the associated colour mix. Now we can work with some basic calculations to deduce what the colours are between. After we know the colour information, we can then begin to deduce what the ramp is like. The first step is to find the difference or delta between the two colours on each channel. From there, we can divide up the colour on regular intervals and determine what the exact colour is at any specific point on the map. This is a sampling step. How many intervals should we break the ramp into? int $step = 20; Find the delta/difference for each channel. Use temp vectors to get data out of the array easily. For our example to keep it simple, we can make some assumptions about where each entry is and what colours they are. We will assume only two colours, and that the first colour is brighter. Of course, one should build in robustness to remove these assumptions with true data. vector $tempTopV = $entry_colour[0]; vector $tempBotV = $entry_colour[1]; Use absolute to ensure its not a negative value float $differenceR = `abs($tempTopV.x - $tempBotV.x)`; float $differenceG = `abs($tempTopV.y - $tempBotV.y)`; float $differenceB = `abs($tempTopV.z - $tempBotV.z)`; Divide up the delta per step. This is the amount of change per step that each colour travels. float $deltaStepR = $differenceR / $step; float $deltaStepG = $differenceG / $step; float $deltaStepB = $differenceB / $step; Now, start number + (delta per step * the number of steps) = end number, in other words, we have broken down what the difference can be at each interval. Finalize by building the arrays. float $colourStepsR[], $colourStepsG[], $colourStepsB[]; $colourStepsR[0] = $tempBotV.x; $colourStepsG[0] = $tempBotV.y; $colourStepsB[0] = $tempBotV.z; Each new step is the old step + the delta for that colour. for ($i = 1; $i

Rated:*** with 439 hits  Added on: Nov 20, 2007

From our website  http   www tjgalda com    How to make a fun pause screen using mel     TJ Galda  CG Supervisor    There are times when you may need to create a pause screen to entertain the users while you fetch something or do some work in the background  This is probably one of the more interesting times that you can make use of a gradient       This tutorial will show you how to create a screen that slowly turns green as the job is completed  Once the designated pause time is done  the window goes away and returns control to the user           The first step is to create a gradient or ramp node         Create the gradient using a ramp     string  tj tempName    shadingNode  asShader ramp      string  tj rampNode    rename  tj tempName  tj gradientColourTemp         After that  we need to set up colours  Were using a black ramp that fills to green  so we need three colours  A black to fill  a green to go to  and one that makes the transition         setAttr   tj rampNode     colorEntryList 0  color    type double3 0 2 1 0 2    setAttr   tj rampNode     colorEntryList 1  color    type double3 0 2 0 0 2    setAttr   tj rampNode     colorEntryList 2  color    type double3 0 0 0 2      setAttr   tj rampNode     colorEntryList 0  position   0 0     setAttr   tj rampNode     colorEntryList 1  position   0 0     setAttr   tj rampNode     colorEntryList 2  position   1 0       After that  we need to create a window and display the ramp to the user         create window    string  tj winName    tj winName      string  tj winTitle    TJ Fun Pause Screen      if    window  exists  tj winName       deleteUI  window  tj winName     string  tj rampWin    window  t  tj winTitle  wh 258 258  tj winName      columnLayout     rampColorPort  node  tj rampNode     showWindow  tj rampWin     Now we need to take control away from the user  and have something happen  As shown above  we achieve this by having our ramp slowly change from black to green and fill in  It can be all done with a simple loop  By slicing the counter smaller and smaller  the pause will increase  As noted in the comments below  were using a slice of 0 005         do timer by filling in ramp with greenfloat     tj i   0 0     while   tj i   1          float  tj newPos    tj i     setAttr   tj rampNode     colorEntryList 1  position    tj newPos     setAttr   tj rampNode     colorEntryList 1  color  0 2  tj newPos 0 2           the smaller this increment  the longer the pause       using 0 005 tends to get us in around 15 seconds     tj i    tj i   0 005     showWindow  tj rampWin            Thats all there is too it  All we have left is to clean up what weve done  Delete the window and ramp nodes                                                   15 seconds passed  all done pausing      kill window      if    window  exists  tj winName       deleteUI  window  tj winName         delete ramp    delete  tj rampNode     print  n          Finished pause screen           n        done      More tutorials also available at our website     http   www tjgalda com

How to make a fun pause screen using mel

From our website: http://www.tjgalda.com How to make a fun pause screen using mel. - TJ Galda, CG Supervisor There are times when you may need to create a pause screen to entertain the users while you fetch something or do some work in the background. This is probably one of the more interesting times that you can make use of a gradient. This tutorial will show you how to create a screen that slowly turns green as the job is completed. Once the designated pause time is done, the window goes away and returns control to the user. The first step is to create a gradient or ramp node: //Create the gradient using a ramp: string $tj_tempName = `shadingNode -asShader ramp`; string $tj_rampNode = `rename $tj_tempName "tj_gradientColourTemp"`; After that, we need to set up colours. Were using a black ramp that fills to green, so we need three colours. A black to fill, a green to go to, and one that makes the transition. setAttr ($tj_rampNode + ".colorEntryList[0].color") -type double3 0.2 1 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[1].color") -type double3 0.2 0 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[2].color") -type double3 0 0 0.2 ; setAttr ($tj_rampNode + ".colorEntryList[0].position") 0.0; setAttr ($tj_rampNode + ".colorEntryList[1].position") 0.0; setAttr ($tj_rampNode + ".colorEntryList[2].position") 1.0; After that, we need to create a window and display the ramp to the user. //create window string $tj_winName = "tj_winName"; string $tj_winTitle = "TJ Fun Pause Screen"; if ( `window -exists $tj_winName` ) deleteUI -window $tj_winName; string $tj_rampWin = `window -t $tj_winTitle -wh 258 258 $tj_winName`; columnLayout; rampColorPort -node $tj_rampNode; showWindow $tj_rampWin; Now we need to take control away from the user, and have something happen. As shown above, we achieve this by having our ramp slowly change from black to green and fill in. It can be all done with a simple loop. By slicing the counter smaller and smaller, the pause will increase. As noted in the comments below, were using a slice of 0.005. //do timer by filling in ramp with greenfloat $tj_i = 0.0; while ($tj_i < 1) { float $tj_newPos = $tj_i; setAttr ($tj_rampNode + ".colorEntryList[1].position") $tj_newPos; setAttr ($tj_rampNode + ".colorEntryList[1].color")0.2 $tj_newPos 0.2 ; // the smaller this increment, the longer the pause // using 0.005 tends to get us in around 15 seconds $tj_i = $tj_i + 0.005; showWindow $tj_rampWin; } Thats all there is too it. All we have left is to clean up what weve done. Delete the window and ramp nodes: ///////////////////////////////////// // 15 seconds passed, all done pausing //kill window if ( `window -exists $tj_winName` ) deleteUI -window $tj_winName; //delete ramp delete $tj_rampNode; print "n -=-=-=-= Finished pause screen. =-=-=-=- n"; //done More tutorials also available at our website: http://www.tjgalda.com .

Rated:*** with 347 hits  Added on: Nov 20, 2007

This article demonstrates five methods to spread objects in maya from author s own experience analysis and some talking boards threads

Object spreading methods using Maya

This article demonstrates five methods to spread objects in maya from author's own experience/analysis and some talking boards threads.

Rated:*** with 764 hits  Added on: Oct 07, 2007

This tutorial will show you how to make simple blizzard in Maya using particle instancer     Before starting this tutorial its good idea to look at mine previous tutorials about particle instancers

Making a Blizzard

This tutorial will show you how to make simple blizzard in Maya using particle instancer. Before starting this tutorial its good idea to look at mine previous tutorials about particle instancers.

Rated:*** with 1492 hits  Added on: Jul 17, 2007

Ever wondered how to make tank treads  There s no easy way  But there is help  and here it is

Making Tank Treads using AS_TreadsCreation script

Ever wondered how to make tank treads? There’s no easy way. But there is help, and here it is.

Rated:*** with 2110 hits  Added on: Jul 02, 2007

This tutorial will show how to make simple puffy explosion using fluids in Maya  It will explode and than give off black smoke

Fast Puffy Type Explosions in Maya

This tutorial will show how to make simple puffy explosion using fluids in Maya. It will explode and than give off black smoke.

Rated:*** with 2500 hits  Added on: Jun 02, 2007

this tutorial is very handy to create  explosions like tank explosion  asteroid explosions

Expressions

this tutorial is very handy to create, explosions like tank explosion, asteroid explosions

Rated:*** with 1908 hits  Added on: Mar 01, 2007

In this tutorial I will go through how I created the final3 multiple shapeEditor

mel ShapeEditor

In this tutorial I will go through how I created the final3 multiple shapeEditor.

Rated:*** with 1455 hits  Added on: May 24, 2006

Maya Expressions 2

Maya Expressions 2

Maya Expressions 2

Rated:*** with 2457 hits  Added on: Apr 14, 2006

An introduction to the basics of using expressions in Maya  This tutorial shows how to make simple wings flap at a controllable speed without setting a single keyframe  Also see Maya Expressions 2

Maya Expressions 1

An introduction to the basics of using expressions in Maya. This tutorial shows how to make simple wings flap at a controllable speed without setting a single keyframe. Also see Maya Expressions 2

Rated:*** with 4682 hits  Added on: Apr 14, 2006

Go to Top

Highest Rated

I am going to show you that is quick and easy way to convert a picture in vector effect  Here we go

Vector Effect - I am going to show you that is quick and easy way to convert a picture in v...

Rated:**** with 21877 hits

In this Photoshop Tutorial we will show you give your type a nice feeling of speed

Speed Type Text - In this Photoshop Tutorial we will show you give your type a nice feeling o...

Rated:**** with 6729 hits

I am going to show you a quick and easy variation on metallic silver text

Silver/Metallic Type Text - I am going to show you a quick and easy variation on metallic/silver text....

Rated:**** with 5200 hits

Free Vue video tutorials   From beginers to advance   Boost up your Creativity

Geekatplay Studio Vue Tutorials - Free Vue video tutorials. From beginers to advance. Boost up your Creativ...

Rated:**** with 201415 hits

Most Popular

Free Vue video tutorials   From beginers to advance   Boost up your Creativity

Geekatplay Studio Vue Tutorials - Free Vue video tutorials. From beginers to advance. Boost up your Creativ...

Rated:**** with 201415 hits

photoshop effect tutorial

wet skin - photoshop effect tutorial...

Rated:*** with 187541 hits

Learn to model the McLaren F1  The fastest car in the world   This tutorial will cover everything you will need to start modelling your 1st car in 3DS MAX  It is one of the best step by step tutorials I have seen

Modelling The McLaren F1 - Learn to model the McLaren F1 (The fastest car in the world). This tutorial...

Rated:**** with 127744 hits

Making of the ns5 robot from I robot movie  by Ajdin Barucija

Making of the NS5 robot from the film I Robot - Making of the ns5 robot from I robot movie, by Ajdin Barucija....

Rated:*** with 121614 hits