Thread: Maya Shaders...
View Single Post
Old 09-12-2007   #6 (permalink)
agentxi
photoshop ninja
 
agentxi's Avatar
 
Join Date: Oct 2006
Location: Red Deer - ish, Alberta
Posts: 553

here's a quick render for the metal shader i did.

it's a blinn shader, 1 spotlight and mental ray for rendering.


------------------------------Shader Settings ---------------------------
Blinn:
color: black
transparency: black
ambient color: black
incandescence: black
bump: fractal (heavily modified, I'll explain the method of the bump later in the post)
Diffuse: 0.165
Translucence: 0
Translucence Depth: 0
Translucence Focus: 0.500
Eccentricity: 0.099
Specular Roll Off: 0.587
Specular Color: white+overexposure. (very important, value must be above 1 a value of 4 works well)
Reflectivity: simple sampler info node/ramp setup (i will explain it later in this post)
Reflected Color: black

*note: please note that Numeric values can be mapped with colours and textures. Black = zero and White = one.

Reflection Limit: 3
Reflection Specularity: 1 *note: please use the lowest # possible with the Reflection limit. The higher the number, the longer the render times will be.


MENTAL RAY:
just keep scrolling down, there's a mental ray section.

Reflection blur: 0.200
Reflection rays: 2.00 *these make the reflection to blur the further objects are away from your metal shader object.

--------------------- End Shader Settings---------------------------------------

Okay so before we get started. Please open up the hypershade which is located under:
Window>Rendering Editors>Hypershade.
If you haven't used it before. Get acquainted, it's your new best friend.

now for the extra steps in creating the metal blinn shader.
*the next part might be a little confusing, it's getting late for me and i've already spent 2hrs on the shader and writing of this 'tutorial'. If it's too confusing, let me know and i'll slowly clear it up as i have more free time.

-------------------------Extra Shader Steps ----------------------------------
For the bump map, I made the bump value extremely low. With test renders you will see why.
I also turned down the values and contrast of the fractal image.
Inside the place2dtexture node, I also played with the Coverage and UV repeating values. The reason for this is to give it a "scratched" look. So basically I did the same thing you'd do in photoshop for a scratched metal texture.
Steps: Fractal in maya is like the noise in photoshop.
the U and V repeating in maya is to mimic the motion blur step in photoshop.
There's no real reason why i did it this way other than, it was convenient for me.

So with some test renders you should be able to tame down that bump map and figure out what settings to use for the U repeat and V repeat. I used 25 U and 5000 V.


Next for the Specular color setting. you click on the Grey Color Box beside "Specular Color"
Once you get the "color chooser" box popup. You get the HSV settings.
H= hue, S=saturation, V=value. The one we will be using today is Value
You take the number value and change it from 0.5 to 4.0.
This will give the color a brighter than white setting. You can choose any hue you want i stuck with white. the specular highlight will be whatever color you choose. even if you don't see it in the preview. Do a test render and you'll see.


Reflectivity:
The extra steps and reason why I did them are as follows:
If you look at something metal around you, you will notice that the metals reflection changes for the different angles as look at it. if you are interested in the science of things, go here

now back to the "art of things"
I used the following nodes to create this effect.
SamplerInfo node and a ramp texture
When you create a ramp texture it comes with a place2dtexture node.Delete this. in it's place you will use the SamplerInfo node.
Connect the SamplerInfo's facing ratio to the ramp's U ramp.
To do this you hold shift and middle mouse click on the sampler info and drag it onto the ramp texture, now let go and you will get a connection editor. Find the facing ratio for the samplerInfo and click it.
Now find the UV Coord and open the + inside choose the U coordfor the ramp's side at the bottom click close
Now once you have the attribute editor open for the ramp. I want you to delete 1 of the colors there. and change the other 2 to shades of dark grey.

if you go to the color chooser and use the HSV you can change the values. I used 0.1 and 0.3 for the 2 settings.

once you have that done...

Shift+middle mouse button drag the Ramp to the BLINN shader.
once the connection editor is open.
Select "out alpha" for the ramp's side, and select reflectivity for the blinn's side. Now click close on the bottom of the connection editor

That should more or less be the shader.

Maybe in a couple days I'll write up how I did the image based lighting and mental ray settings.
Currently they are far from perfect, but I'm not sure what kind of environment you are going to use.

If this is confusing in any way, I have attached the Complete maya scene included. If you are going to use it, it's for maya 7.0 and up.

And you need mental ray enabled in the plugin manager.
__________________

when evil is afoot, and you don't have any arms, you've gotta use your head. And when evil is ahead and you're behind, you've gotta do the legwork. But when you can't get a leg up, you gotta be hip. You gotta keep your chin up, and kick some-...
agentxi is offline