Subcategories
Animating (98)
Dynamics and Special FX (65)
Import / Export (6)
Lighting and Rendering (107)
Miscellaneous (148)
Modeling (367)
Scripts (30)
Texturing (49)
Video (33)
Autodesk Maya tutorialsShowing tutorials 540 to 560 out of 943 Autodesk Maya tutorials. | |||
|---|---|---|---|
|
ADVERTISMENT |
ADVERTISMENT |
how to modeling car - new minicooper
Rated: |
![]() 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: |
![]() 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: |
This video tutorial shows you to take your 3D model from Maya and turn it into an active video game prop
Rated: |
||
Making an attractive woman is always a goal for most CG enthusiasts and here are the secrets
Rated: |
modeling human character from head, hand, leg (foot)and body
Rated: |
||
modeling human toon from head until foot ...
Rated: |
This tutorial shows you how to use render layers in maya for composition of the final image. ...
Rated: |
||
![]() Breaking Subsurface Scattering into Render Layers in Maya Method to break Miss_fast_skin_maya subsurface shader into render layer and compositing them in post. ...
Rated: |
In this part 1 tutorial we will learn some tips and tricks on our way to model a volcano from scratch! So enjoy the lesson! ...
Rated: |
||
![]() Model a Rocket with Particle Trail in Maya This tutorial shows you how to create a rocket using NURBS, animate its movement using path curve and make a simple smoke trail. ...
Rated: |
![]() Using Sun and Sky in mental ray with Maya This tutorial will teach you to use Maya8.5 new Sun and Sky system wuith Mental Ray. ...
Rated: |
||
![]() Low Poly Character Series: Modeling the Legs Low Poly Character Series: Modeling the Legs Tutorial by: Ben Mathis...
Rated: |
This article will take you through the various stages I used to create Keith Thompson's Giant character, from initial setup and block-in all the way through to final renders in Unreal3 engine.
Rated: |
||
The tutorial shows how to create the model of a fishing hook, in Maya
Rated: |
![]() using Pelting Tools for uv unwrap The tutorial shows how to use PELTING TOOLS plugin for Maya. this plugin is very useful in unwraping the uv's in Maya texturing process.
Rated: |
||
![]() Jaguar - Panthera Onca - Model/UV/Texture Tutorial This tutorial comes in PDF format (71 pages), with Maya scene files and texture images to supplement the text. It covers Modeling, UV Mapping and Texturing. Brought to you by Chris Harkins @ www.charkins.com
Rated: |
![]() creating a UV map (video tutorial) The tutorial shows the basic steps in creation of a UV map in Maya.
Rated: |
||
![]() extrude the face of a cube using a curve (video tutorial) The tutorial shows how to extrude the face of a polygon using a curve (Maya video tutorial)
Rated: |
modeling detail hand with polygon
Rated: |
||
Categories
- Adobe Photoshop
- Autodesk Maya
- Autodesk 3DS Max
- Blender
- Bryce
- Corel DRAW
- Cycore Cult3D
- Macromedia Flash
- Maxon Bodypaint 3D
- Maxon Cinema 4D
- LightWave 3D
- Pixologic ZBrush
- Rhinoceros
- SoftImage XSI
- Vue d'Esprit
CG Tutorials
- » Add a tutorial (and get rewarded)
- » Login
- » Register (3D Kingdom)
- » About/FAQ/Contact
Highest Rated
![]() |
How to create 3D flash photo gallery - This tutorial shows you how to create 3D flash photo gallery using 3rd flas...
Rated: |
![]() |
Remove Glasses Digitally in Photoshop Retouching Tutorial - Remove Glasses Digitally in Photoshop Retouching Tutorial...
Rated: |
![]() |
Advanced masking and selections with photoshop - Advanced masking in photoshop video tutorial ...
Rated: |
![]() |
Create Water Droplets for your products with photoshop - Create Water Droplets for your products with photoshop...
Rated: |
Most Popular
![]() |
Ten Photoshop Tips and Tricks - In this tutorial, we present ten favorite creative and useful techniques....
Rated: |
![]() |
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: |
![]() |
Speed Type Text - In this Photoshop Tutorial we will show you give your type a nice feeling o...
Rated: |
![]() |
Eyes Color Retouch - In this tutorial, we are going to show you how to change any person's eyes ...
Rated: |



























