Maya: Shader Networks

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  02 February 2003
Maya: Shader Networks

Here is the sticky everyone has been asking for!

Lets see the shaders
  02 February 2003
Let me start off with a simple one

Attached Images
File Type: jpg shader.jpg (25.1 KB, 11241 views)
  02 February 2003
Here's a pretty neat shader i came up with a couple of months ago, i was despeartly trying to make the whater shine when the sun hits it, like small lensflares. An example of that is in the warcraft 3 trailer when the army enters the caste in the beginning.

So anyway, sorry that I don't have so many pictures but i thought that it's better to post one mesage instead of 5 or so.

here's some settings:

color = black (it's up to you, but if you wanto do like the example)

U Ramp
Color = (ramp B on the attatched image)

U Ramp
Color = (ramp A on the attatched image)

shaderGlow1: (I havn't tried what settings that are importait yet, so I write them all to be on the safe side.)
Quality = 5
Threshold = 0.200
Radial Frequency = 0
Star Points = 6.923 (You can edit this if you want more or less "lines" on the stars)
Rotation = 190 (Just edit this to edit the rotation of the stars)
Auto Exposure = unchecked
Glow Color = Grey
Glow Intensity = 0.94
Glow Spread = 0.035
Glow Eccentricity = 0.128
Glow Radial Noice = 0.615
Glow Star Level = 4
Glow Optacy = 0
Glow Ring intensity = 0
Glow Ring Frequency = 0
Glow Filter Width = 1

samplerInfo1.facingRatio - ramp1.uCoord
samplerInfo1.facingRatio - ramp2.uCoord
ramp1.outColor - blinn2.incandescence
ramp2.outColor - blinn2.glowIntensity

If you want more stars you could add some white "Lines" , lines that are as small as posible near the bottom on ramp2.

Just add a light and viola! =)
MSG Me if you find any errors or have any questions.

Here is a better example, but you have to look close on the picture to see the stars:
Attached Images
File Type: jpg shader.jpg (28.6 KB, 9164 views)

Last edited by SPENEN : 02 February 2003 at 04:19 PM.
  02 February 2003
Color editing network


1 File Texture (file1)
4 Ramps (ramp1, ramp2, ramp3, ramp4)
1 RGB to HVS (rgbToHvs1)
1 HVS To RGB (hvsToRgb1)
1 Shader (lambert2)

The Ramps

Make ramp1 white in the Top and Black in bottom
Make ramp2 Red in the Top and Black in bottom
Make ramp3 Blue in the Top and Black in bottom
Make ramp4 Green in the Top and Black in bottom


file1.outColorG > ramp4.vCoord
file1.outColorR > ramp2.vCoord
file1.outColorB > ramp3.vCoord

ramp4.outColorG > rgbToHvs1.inRgbG
ramp2.outColorR > rgbToHvs1.inRgbR
ramp3.outColorB > rgbToHvs1.inRgbB

rgbToHvs1.outHvsH > hvsToRgb1.inHvsR
rgbToHvs1.outHvsS > hvsToRgb1.inHvsG
rgbToHvs1.outHvsV > ramp1.vCoord

hvsToRgb1.outRgb > lambert2.color

How to Use

With this setup you can edit contrast and Color of a image like in Photoshop.
Use Ramp1 to edit light and dark areas of the file like the "Curves" function in Photoshop..
The ramp2,3,4 is used to add or remove color from the Image file.
Attached Images
File Type: jpg hypershade.jpg (28.0 KB, 7968 views)
__________________ - My Scripting Blog!
  02 February 2003
Talking samplerInfo Ramp


since I started learning how to render in Maya Ive created some thousand samplerInfonodes and connected them into the vCoord of a ramp. (very timeconsuming)

But now this is history, cause I learned mel :-)

have fun

// siRamp.mel Script (c) Paul Dreisen 2002
// mailto:
// Version 0.2c
// this Script creates a basic bw-Ramp with a samplerInfoNode connected into the vCoord.

global proc siRamp()


// needed nodes

string $ctrlRamp = `shadingNode -at ramp`;
string $si = `shadingNode -au samplerInfo`;

// connections

connectAttr -f ($si + ".facingRatio") ($ctrlRamp + ".vCoord");
removeMultiInstance -break true ($ctrlRamp + ".colorEntryList[1]");

// settings for nodes

setAttr ($ctrlRamp + ".colorEntryList[0].position") 0;
setAttr ($ctrlRamp + ".colorEntryList[1].position") 1;
setAttr ($ctrlRamp + ".colorEntryList[0].color") 0 0 0;
setAttr ($ctrlRamp + ".colorEntryList[1].color") 1 1 1;

select $ctrlRamp;

  02 February 2003
this is all nice and all, but are there any ways that I can learn what I'm actually doing, when tryng to do a shader?
any links would be warmly welcomed
  02 February 2003
try reading the manual =)
  02 February 2003
Using a ramp shader to get a top rim light effect

This thread shows how to use a ramp shader to give the effect of a rim light that always appears only on the top of the object, regardless of it's position or rotation.
Floyd Bishop

YouTube Channel
Char Maya Character Rig
  02 February 2003
Here's a description of how that ramp shader Floyd posted about above works. It's fairly simple!

The end result is basically a shader that has a rim around it's edge (like with a toon outline or rim lighting effect) but you can choose how much (top half in this case) gets the rim effect.

All you need to use is:

1 shader (ie lambert)
2 ramp nodes (not the new ramp shader)
1 SamplerInfo node

The first ramp node is used to control how much of your object (vertically) recieves the rim effect. The second ramp when combined with the SamplerInfo node's much loved 'FacingRatio' attribute, gives you the rim effect in the colour of your choice.

You could of course plug this network into any other shading attribute of a shader to create say, a rim of transparency or a rim of icandescence.

There's an attached image to show the exact construction.
  02 February 2003
i'll try to compile a list of links that helped me to better understand how to write shaders

- leigh's tutorials on texturing

part 1 - introduction -
part 4 - diffusion -
part 5 - specularity/reflectivity -

- metals and reflections (by Neil Blevins) - (specularity, reflectivity, fresnel, ...)

- water links - a collection of links to information regarding rendering of water - quite extensive and not restricted to water

- bill's realitiy clinic

diffusion ->
photorealistic 3d / part 1 ->
photorealistic 3d / part 2 ->
photorealistic 3d / part 3 ->

- Light Measurement Handbook - very thorough book about light and its interaction with surfaces - it describes many light phenomenons (e.g. how light is irradiated from human skin)

- IOR tables

- DVGarage - a lot of tutorials on how to create maps and many other observations

Last edited by stunndman : 02 February 2003 at 05:24 AM.
  03 March 2003
mental-ray related links

Antialiasing and Mental Ray 2.x -

Ed Hariss's mental-ray (in XSI) link collection -

Volume Caustics and Subsurface Scattering Simulation -
  03 March 2003
here's a fairly simple shader for a car surface


Last edited by Norb : 04 April 2003 at 09:01 PM.
  03 March 2003

I made a really simple example of a fake fur shader, and am kind of toying with a tutorial for it, describing what the different nodes and stuff do.

Here's one variation of it..

No really complex stuff.. But if you're not used to working with Hypershade you might find it interesting.

Contribute to the CGWiki!

Any views expressed are my personal opinions and do not represent those of my employer.
  03 March 2003
Carina, thanks alot for taking the time to do one!
I know some simple stuff in the Hypershade.
But when I'm connection different I don't always know what I am doing really :/
so please post something in thise thread when your done with the tut
Highpoly human W.I.P
  03 March 2003
Right I posted the tutorial, this is the thread for it..

Contribute to the CGWiki!

Any views expressed are my personal opinions and do not represent those of my employer.
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 11:34 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.