discover
discover
Main Discover Page
Product News
Press Releases
Research
bot_drop_down
connect
top_drop_down
Main Connect Page
Contact Us
Events
Job Postings
Industry Links
Listserv
User Groups
bot_drop_down
support
support
Main Support Page
Support Programs
Customer Services
eSupport
Support News
Support Contact Info
bot_drop_down
learn
learn
Students
Schools
Learning Tools
Training
bot_drop_down
download
download
Main Download Page
Shaders
Source Images
Props
MEL Scripts
Paint Effects
Sample Projects
Plug-ins

Screen Savers
Desktop Pictures
bot_drop_down






clear.gifDiscoverConnectSupportLearnDownload
Maya NT
Plug-ins
Download Home
Community Home
Diffraction Shader

Host Product:
Maya 4.5

Operating System:
NT


[download Maya 4.0 version]

[download Maya 3.0 version]


By using this site or by downloading any material from this site, you expressly agree to be bound by the most current version of the Terms and Conditions of Use.

Description:

The Diffraction Shader Plugin provides artists with a specialised shader that can be used to create realistic diffraction effects like the rainbow reflections created by a CD.

For installation instructions, refer to the README.txt file included with the download.

About the Diffraction Shader

The shader computes the reflections from a metallic surface comprised of tiny bumps coated with a transparent layer. The amount of bending is modeled using the Index attribute on the shader. This is the index of refraction of the transparent layer and can accept values from 1.0 to 2.0. When Index is set to 1.0, no bending occurs. A typical value for plastic is roughly an Index value of 1.5.

The distribution of the bumps is assumed to be periodic in the U direction and random in the V direction. The size of each bump is given by the attributes Height, Width and Length. Width corresponds to the U direction while Length stands for the V direction. The sizes are in microns and are typically in the range [0.05-5] so that they interfere with the wavelengths of the incoming light which are in the range [0.38-0.78] microns. The fixed separation between the bumps in the U-direction is modeled by the attribute Separation. 

You can switch between two types of bump using the Method attribute. The Highlight attribute controls the size of the principal highlight on the surface (or the principal "line" in the case of the compact disk). This attribute varies between 0 and 1. For Highlight=0 you have no highlight, while for Highlight=1 the highlight covers the entire surface. The shader becomes more computationally expensive when setting values of the Highlight parameter higher The remaining attributes have meanings similar to the ones in the anisotropic shader of MAYA. 

The attributes are summarized in the following table
Parameter Name Description Range
Color Can be used to change the global colour of the surface R, G, B
Ambient multiplies the ambient light 0.0-1.0
Method Shading method: either CD-like bumps or diffraction grating-like wedges. two choices
Index Index of refraction of the plastic cover on top of the diffraction grating/CD 1.0-2.0
Height Height of each bump 0.0-1.0
Width Width of each bump (in the U-direction) 0.0-10.0
Length Length of each bump (in the V-direction) 0.0-10.0
Separation Separation between the bumps (in the U-direction) 0.0-10.0
Highlight Size of the main highlight 0.0-1.0
Twist Rotation angle of the (U,V,N) local coordinates 0.0-1.0
Brightness Multiplies the intensity coming off of the surface 0.0-10.0
Glow Can be used to make the shader glow 0.0-10.0
Transparency Transparency of the surface R, G, B
Reflectivity Multiplies the reflected color below 0.0-2.0
Reflected Color Light coming from the mirror direction R, G, B

What is Diffraction ?

Diffraction effects exhibit the wave-like properties of visible light. In computer graphics the interaction of light with surfaces and volumes has traditionally been modeled using the "ray theory" of light propagation. The ray theory assumes that light travels in straight lines between surfaces and that the radiant power flows along the geometrical rays. This theory is fine for most computer graphics applications. In general, whenever the size of the surface detail is much larger than the wavelength of light (roughly 0.5 microns) the ray theory should be  a very good approximation.

Diffraction can be loosely defined as all light-effects that cannot be modeled according to the "ray theory" of light. Instead, the "wave theory" must be considered. For example, when an incident planar wave hits a "rough surface", the reflected wave is a very complicated wave which in genral cannot be modeled by a set of rays. Figure 1 illustrates this point.
 

Figure 1: Diffraction of Waves by a rough surface 

An Example: the compact disk

Diffraction effects can easily be observed by looking at a compact disk. By rotating the disk one can observe many different colours appearing and disappearing. The colours are a result of both the wave nature of light and the micro-structure of the compact disc's surface. The surface of a compact disk is comprised of tiny little "bumps" of size that is roughly 1.0x0.5x0.15 microns (10-6 meters). The size of the bumps is comparable to the wavelength of visible light, 0.3-0.8 microns, hence diffraction effects occur. Figure 2 shows a zoomed in picture of the micro-geomtry of a compact disk. Notice that the separation between the tracks is constant while the distribution of the bumps on each track is more random.

Figure 2 : micro-geometry of the surface of a CD

The compact disk is not the only example of a surface that causes diffraction effects. The advent of the laser allows many different microstructures to be created very cheaply. In fact diffraction gratings are usd nowadays in wrapping paper, bumper stickers, etc...  Diffraction effects have also been observed on certain insects, whose "skin" has a tiny periodic-like micro structure. With this shader you'll be able to create diffraction effects on many different objects.  

(click here for QuickTime animation- 660k)
 

Further Examples:

These are some examples of "diffraction gratings". The different patterns are obtained by texture mapping the "twist" angle in the plugin shader.
Uses MAYA's "bulge" texture.

(click here for QuickTime animation - 1.8MB)

Uses MAYA's "cloth" texture.

(click here for QuickTime animation - 1.8MB)

Uses custom file texture.

(click here for QuickTime animation - 1.2MB)

 

 

Contact Us | Site Map

Copyright (c) 2000-2002 Alias|Wavefront, a division of Silicon Graphics Limited. All rights reserved.
Your use of this website confirms your agreement to the Terms and Conditions of Use.
Legal | Terms and Conditions of Use | Privacy Policy | Customer Survey



clear.gif clear.gif clear.gif