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

Top: Autodesk Maya: Scripts : 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

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 .

ADVERTISMENT

Looking for Job?

3DK.org is hiring 3ds max tutorial writers! If you're interested, please send your resume to info@NO-SPAMcgtutorials.com (remove NO-SPAM). Please include few examples of your previous tutorials and/or articles.

Comments

No comments at this moment

Highest Rated

Made most realistic water drop effect in Photoshop

Water drops on leaf - Made most realistic water drop effect in Photoshop....

Rated:**** with 488 hits

Draw Exploding planet earth in photoshop using tool and filters

Exploding planet earth in photoshop - Draw Exploding planet earth in photoshop using tool and filters....

Rated:**** with 2474 hits

Learn how to change color of objects in Flash  Choose which colors you  8217 ll use  and change colors in your Flash Movie

Changing color in Flash - Learn how to change color of objects in Flash. Choose which colors you̵...

Rated:**** with 151 hits

Corel Draw can do more then u expect    Check it

Draw 3D earth in Corel Draw. - Corel Draw can do more then u expect. Check it....

Rated:**** with 295 hits

Most Popular

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 425728 hits

In this tutorial  we present ten favorite creative and useful techniques

Ten Photoshop Tips and Tricks - In this tutorial, we present ten favorite creative and useful techniques....

Rated:*** with 411325 hits

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

Metallic Type Text Effect - I am going to show you a quick and easy variation on metallic text effect....

Rated:*** with 395899 hits

How to draw custom arrows in photoshop with the pen tool with a final 3 D embossing effect

How to draw custom arrows in photoshop with the pen tool with a final 3-D embossing effect. - How to draw custom arrows in photoshop with the pen tool with a final 3-D e...

Rated:*** with 354860 hits