Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UK Essays.

This dissertation is to simplify the ambient light in contact shadow using Maya embedded language (MEL) which can be useful for all lighting artists to get a global illumination effect in simple steps and to reduce process of render time and they can connect and disconnect the ambient shader and adjust using GUI (graphical user inter phase) all the buttons will be in GUI itself. These are simple techniques but if one needs the old fashioned moves he’s got to go to the control set up tools. But these are simplified here and all can be achieved in simple clicks which is easy to navigate. All actions present in the GUI area all are present in my interface and one reason its better as its simple. This has been focused in a manner to anticipate all professional or not its easy to all. This helps all and even helps to navigate better through the GUI controls better.

Chapter 1 INTRODUCTION

Ambient Occlusion is a lighting technique that which is used to cast shadows on objects. This is a technique used in lighting which is misunderstood as this method casts shadows on objects where light does not reach. This method gives out a good render to the object with normal modes in the output. Ambient occlusion creates or casts soft shadows around the object which gives out a molded look.

In technical terms ambient occlusion is a global illumination method and is commonly referred to as a cheap trick for alternative method of global lighting method. To be more specific in answering the above is each person has his means of working and all processes differ from one another. This is where ambient occlusion comes into being as some calculate the intensity of the light setup for every work file but most don’t and the best way to overcome is to use ambient occlusion where this does all the calculation and gives a better quality render more than we can accept.

On aspects to other global illumination methods ambient occlusion does calculate in it manner but regarding other properties in the scene file. Where it has to go according to all shapes in the scene file to calculate the light setup to generate a global light effect which seems less complex than the regular lighting aspect in the software. This specialty makes ambient occlusion very well accepted among game developers and level designers and in various levels of production animation.

Here I am going to simplify the Ambient Occlusion shader to get ambient light in all contacted shadows. Connecting the ambient occlusion to all the shader is a big process as we have a number of shader in a single scene file. I am going to develop a separate user interface in Maya for the user to manipulate my tools. By using my tools all the shader can be connected to the ambient shader with the single click and also can disconnect all the ambient shader in a single click.

1.1.AIM

To simplify the ambient light in contact shadows using Maya embedded language (MEL)

1.2.OBJECTIVES

Study the advantages and disadvantages of ambient occlusion shader

To study about the real world light properties

To implement natural lights using software

Developing a MEL for simplifying ambient occlusion shader

Developing an user interface in Maya for user to manipulate the tool(GUI)

1.3.STATEMENTS OF THE PROBLEM

To connecting the ambient occlusion shader to all the other shader is a big process if there is number of shader are available in single scene file

1.4.RESEARCH QUESTIONS

What is ambient occlusion?

What r the different techniques for creating indirect lighting

How shadows variation in time

what are the advantages and disadvantages in ambient occlusion texture

How to simplify the ambient occlusion texture node

1.5.SIGNIFICANCE OF STUDY

When we are connecting ambient occlusion texture to number of shader most of them are facing the problem like connecting with shader one by one some time we may miss some shader while connecting and also it will take time to connect to lot of shader Here am going to do this dissertation for solving these problems. Here I am going to simplify the ambient occlusion texture by MEL script

1.6.Hypothesis

The hypothesis of this project is to simplify the ambient occlusion texture using Maya embedded language (MEL)

Chapter 2 Literature Review

This book speaks about how ambient occlusion forms form indirect light rays and ambient occlusion effect can bring from Final Gathering and it will take more render time when u create in Final Gathering The above information help to get some knowledge and information about ambient occlusion.

2.2.Literature: Mental ray for Maya 3ds max and XSI Livny Boaz

Ambient occlusion adding realism and produce more details in the output and render will be fast when we compare to Final gathering and Globule illumination how ambient occlusion works and explain detail about ambient occlusion attribute and also tell about what are the different between occlusion and ambient occlusion

2.3.Literature: Introducing Maya 2011 - Dariush Derakhshani

We can take ambient occlusion as separate render pass that to help add more depth in models and later we can adjust in compositing. Ambient occlusion give great contact shadows

Ambient occlusion is the easy and quick way to get Global illumination and tell how ambient occlusion note works in texture. Ambient occlusion produce soft shadows as like real world. when two models are placed near certain amount of light will be block and u will get soft shadows at the corner of the object

There are different types of shadow in 3ds max like normal 3ds max shadows and ray trace shadows .but normal shadows wont work in mental ray. If u need to get accurate shadows go for ray trace but render time will be increases when compare to normal shadows. Bounce light gives u realistically feel as like real life lighting. In real life light wont stop travel when its hits the ground it will hit and bounce for certain distance till its die and ambient occlusion also the one form of creating bounce light or indirect lighting for the scene but ambient occlusion wont be physically correct lighting when compare to FG(Final Gathering ) and GI (Globule illumination ). Ambient occlusion give reflective occlusion where we wont get in normal occlusion.

This book tells about how ambient occlusion rays are calculating in the scene and tell about how Technically ambient occlusion works in MEL scrip this book gives me clear idea how to develop my scrip in MEL

Ambient occlusion techniques in production are used in two ways are backing of ambient occlusion texture and taking of ambient occlusion passes in render. In backing of ambient occlusion we cant tweak while compositing but In ambient occlusion render pass we can tweak and bring new effect in compositing.

2.9.DVD:Digital Tutors Mental Ray Nodes Library

This Tutor helps me what are the uses of the ambient occlusion how to connect ambient occlusion texture node in shader and explain clearly about the Attribute Editor of ambient occlusion to get good output.

Chapter3 METHODOLOGY

This document consists of a quantitative and qualitative method by Survey and gathering information from Internet, Books, tutorials , articles, books, paper and videos.

3.1.POPULATION:

The people who are suitable for this population is texturing artist, lighting artist, rendering artist.

They were questioned regarding the ambient occlusion shader and its uses in production field. The population of this research work carries the production experienced person.

3.2.SAMPLING:

Judgment Sampling

3.3.SCOPE AND LIMITATIONS:

This research is limited to the ambient occlusion shader.

Chapter 4 Lights in CG

4.1 Overview

4.2 Types of lighting

Chapter 5 Indirect lighting in CG

5.1Introduction

5.2 Final Gathering (FG) and Global illumination (GI)

Chapter6 Ambient occlusion

6.1 overview

6.2 How it works

6.3 Advantages of ambient occlusion

Chapter 7 Rendering

7.1 Mental Ray rendering

7.2 occlusion render over mental ray

Chapter 8 MEL

8.1 Introduction to MEL

8.2 Creating GUI

Chapter 4 Lights in CG

4.1.Introduction

Lightning in computer graphics (CG) is nothing but giving special effects to the scenes to improve the quality of animation. Lightings available for all kind of occasions, all we need to do is just adjust the parameters. Most of them will not give more importance for lighting while creating there images or animations. Lighting plays very important role in computer graphics (CG), we can easily find the talented and untalented person in computer graphics (CG) by looking at the light effects given in the image or animation .Though we already know something about lightings in photography, film and video. We are just trying to bring the reality to computer graphics (CG). Lighting is used for creating a 3D effect by differentiating the foreground from background or else we can combine both to create 2D effect. This effect (Lighting) is mainly used to impress the viewer. Lighting is the most powerful tool in the computer graphics because this is the only tool which makes the viewer to feel. If your lighting perfectly fits for your image or animation then the final output will be much good to impress the viewer. Lighting can be expressed in two ways by being illuminated and a process of illumination. Lighting is defined globally by means of object which can be visible through the source illuminant application. Bouncing off lights or shiny objects can be made by the manipulation of light. If natural light is unavailable artificial lights can be used instead. Lighting is used everywhere and anywhere. Light is never said to be the same because of its variability, so lighting also changes. The natural sun light that we see in day to day life varies in a short period of time but the quality does not vary. The term state of lighting could in term mean intensity, its direction, its texture and form. This means something emotional. lighting is also a process of purposeful planning and design in which the light is to illuminate in an object. When lighting is necessary, the lighting position and placement are to be in considering, once deciding the intensity. Lighting process also refers in analyzing the light quality as it strikes the subject.

4.1.ADDING LIGHT SOURCES:

Adding lights to the scenes can be done in several ways and also different kinds of lights available in lighting effects. Some kind of lights are used to highlight the background, foreground, character etc., we must choose the light which is highly suitable for the cases so that the people could not able to find which effect is used.

4.2.1POINT(OMMIDERECTIONAL)LIGHTS

Point lights are also called as omni or omnidirectional lights, because it transmit in all directions, like any other lights e.g. bulb, sun etc

The main thing in giving this effect is checking the shadows it should not spread in all directions. In real life, u can see more uniformly omnidirectional lights. Most of the times point lights are similar to real light bulbs for example, bulb lights spread allover the particular empty place, if a opaque thing (metal, wood etc.,) is kept in that place the shade will form behind that thing and side and size of the shade is depend on the location of the bulb.

Though it is likely as omnidirectional we can spread it by using throw-pattern that is uneven. if you want to focus more light on some particular direction then you must do this action texture map to the light else by grouping the light with 3D object that produce shadows

This light rays stimulated out from one infinitely small point in space, Its illumination and shadows passes out form the light in all direction.

It is difficult to find a light which is uniformly omni directional in nature. Many light sources emit some amount of light in some directions. Uneven point lights can be used as a throw pattern, like a real bulb to emit more light in some direction rather than in other direction. This is done by applying a texture to the light or else by grouping the light with the 3d object which will cast shadows.

4.2.2.SPOTLIGHTS:

Spotlights is the major light effect which is commonly used in computer graphics (CG).This light effect is used by major computer graphics (CG) specialist because it can be used to focus on a specific target. Spotlight is also similar to point light sometimes but it slightly differs in pointing the target there are some limitations for spotlights are it should not exceed.we can determine the focus aim by rotating the spotlight. You can also fix a target for your focus so that the focus will always on that particular target.

Spot Lights are the most used light in the lighting design of computer graphics. Most of the popular artist prefer spotlights to light a scene because, this light can be controlled in any times to aim light at a selected target. The emition of spotlight is light radiation from a point, same as like the point light. The illumination in the spotlight is controlled through a cone angle or a beam of the light. The rotation of the spotlight will determine where the beam is aimed. Objects can also be linked to light to stay in the same orientation position. A spotlight has more controls and options which is not found in other type of lights, some options like projecting a image map from the light, creating fog, etc…

With the help of spotlight the falloff which is the softness of the cone, allows the intensity of light diminish more gradually in the edges of the beam.

4.2.3.Directional Lights

Directional light is an infinity source of illumination from a distance. These lights are variously known as distant, direct or infinite light. This light sets a single vector for its entire illumination object from the same angle, doesn’t matter the object’s position. The shadows emitted by the directional light are in same direction and they are orthogonal projections of each 3d object’s shape. The matter in placing the directional light is which way it’s pointed. The directional light is not so easy in aiming to a preferred local area like point and spot light. A set of lights constituting from different angles can be used to produce fill light, even in the individual lights in all angles in a low intensity. These lights can fill very large areas with illumination appearing as ambient, like filling the daylight from the sky giving a quick effective global ambience. it deals with the light position where it is placed and it is all about the direction of the object, shadow and lit falls depend on the light location. However the sunlight is the major source of light we need some more light effects to impress the viewer most probably directional light is used. The directional light which needs some specific angle to present a proper lighting so that the person should concentrate more on angles.

4.2.4.Area Lights

The lights like point and spot emits light from a infinity source into space, which is not simulating the size of physical light source in real life. Point light cannot be scaled in any dimension. To get more accurate simulations of the real light, this area light have definable scale, so the all the rays of light are not emitted exactly from the same point.

If the light is scaled small, the illumination will appear similar to a point light. The larger scale of area light, make the light appear softer, shadows appears to soft and the illumination in nearby objects. The amount of shadows and light achieved with area light makes the scene excellent in realistic rendering.

The source of the light comes from some long gap like windows etc, is said to be area lights. This effect is important when the image or animation dealing with the room setup for example if there is a room there might be some windows so we must implement the area lights. It matches the situation than any other lighting techniques

4.2.5.SPHERICAL AREA LIGHTS:

Spherical area light is also like area light it will spread in all directions. It is also called spherical light, spherical region of space is the source for the spherical light, this is mainly used in the case where the large light source. The spherical light has omni directional so the light does not have effect on our output. you can also replace the spherical light to point light when the illumination needs more concentration on light to cast soft edged shadows

4.2.6.FLAT AREA LIGHTS:

Area light also available in flat shapes such as discs and rectangles. Light emitted from two dimensional areas can use less rendering time than three dimensional areas. The number of samples used to adjustable either approach. A rectangular area light is same as illuminated ceiling panel, a plane width and height that illuminates with naturally soft, diffused light. Light from ceiling is the major use of flat area light simulating the reflected illumination brightly lit walls and ceiling providing a soft. Aiming or rotating light changes your result, light from the edge of the flat area light is same as creating sharper shadow and also dimmer.

4.2.7.LINEAR LIGHTS:

Linear light has same functionality as florescent tube and also scaled in one-dimension.it has a length soften the shadows and extend its illumination in one direction. How linear light affects the output. The shadow objects along the length of the light are very soft, but shadows from the end of the light are focused.

We can use linear lights from fluorescent tubes, laser blasts. Line shape is not specifically needed, linear lights and it is used for general soft lighting scene they will not add as much as you’re rendering time as other types. It is similar as spherical area light .

4.2.8.MODELS SERVING AS LIGHTS:

Light effect by model serving as lights is a 3dimensional model in your scene sort of area light source. By using this model we can make a nontraditional shape of light like neon sign, it is also used as a true light sources, as shown in figure. However, bright looking objects can be made by rendering the neon sign,and also by positioning other kind of light to the surface rounding area.

Chapter 5 Indirect lighting in CG

5.1Introduction

The indirect illumination simulates caustics, global illumination and final gathering.the specification of light energy is required. To allow color the light energy is as a RGB triple. But the values of the RGB are usually much higher than the range for color. In the preprocessing step the number of photons stored from the light source is determined by STORE and the number of photons emitted is determined by EMIT. The photon emission stops when either of the limit is reached. Using the power law of 1/r(exp) energy from the light source decreases as the square of the distance increases from the source. The physical correctness is lost when the exponent is other than 2. During caustics preprocessing The number of caustics photon stored can be specified by the caustic photon value which controls it. Likewise global photon value can be specified for global illumination. The value ranges from 10,000to 100,000.by increasing the value the accuracy increases and the bluriness decreases. In indirect lighting the lights sources are invisible by default. As the number of visible lights are increased the performance is reduces.

5.2 Final Gathering (FG)

The estimation of global illumination is done by a technique called Final gathering. It can be illuminated by either sampling a number of direction over the hemisphere or by averaging the total final gather points nearby. To improve the quality of global illumination final gathering is used. Without final gathering computation on a diffused surface is made by the photon intensity near that point. With final gathering the new rays of light is are made to hit the sample hemisphere for the determination of incident illumination. Using illumination from the globillium photon map and the illumination at the points of diffused surface is computed. Some rays hit a specular surface and their contribution for final gather color is zero. Tracing each ray utilizes lot of time so it is done when it is necessary. For purely diffuse scene final gathering eliminates low frequency noise and dark corners. As the final gather averages over many values of direct illumination fewer photons are needed. Final gathering can support only a single bounce. And multiple effect have far less impact on the image. The final gathering can perform these if the shaders can adjust the trace depth, otherwise it will be performed by photons by default. To control the photons coming from distant source of light final gathering is used and is good for film production. For CAD related applications photon mapping is used. Final gathering can be turned on or off in the options. In each final gathering the number of ray shot can be changed. The maximum distance at which the ray can be used depends on the scene extent. Decreasing the scene extent can reduce the noise but increase the render time.

5.2.1.Global illumination:

Global illumination simulates the light bouncing of an object. It has two steps process. the photon emitting light emits photon in to the scene. A photon map is created to store the intensity and place of the photon in three dimensional space. Then the surfaces are illuminated. It is based on the intensity of the photon. In global illumination diffusive value is a must. In the second part of the image the actual process is rendering of the image. The energy value is averaged and these values are interpolated to get the image as the light is bouncing of the diffused surface. After perfecting the in this method, the photon map can be saved and reused. Thus we can save the time of rendering each frame, provided the scene is static.

This is the calculation of more complete light transfer model said to be global illumination. This accounts for the indirect reflected light transfer in the scene. There are two types of global illumination, one simulates the behavior of the light of perfect specular light, and the second behaves in perfect diffuse light. These are most commonly referred to ideal specular, which hold ray tracing. Perfect diffuse reflections are called an ideal diffuse reflection, which is calculated using radiosity. This technique was developed in enhancing the realism in computer images in mimicking the light transfer. In periods it developed like image synthesis (photorealism) to simulation (photo accuracy). The radiosity is computed first and the ray tracer is computed to calculate the direct illumination the same way the reflection and refraction.

5.2.3.Local Illumination

This is the direct illumination from a light source, this means a method of lighting which come form the direct visible source. This will not take full light in account; it only shows how the light affects the object that it calculates in the scene. Local illumination neglects the reflections and light propagations as its’ bounced around the environment. The light transfer simulation in local illumination computes the light only produced from its light source itself to the object that it illuminates and stops there. In a sense an incomplete light transfer’s model because it computes only the effect of direct light and cheats by the environmental lighting settings as glow to make it as reflected.[9]&[10] Local and Global

5.2.4.Ambient Light

This is a light with constant intensity setting on the scene which serves as the sum of all in the direct illumination reflections in the scene. When describing this in effect ambient light is a kind of self-glowing illumination that mimics the object-to object light reflection. It is an independent intensity for all the objects in the scene. This light was invented to fake the direct illumination interobject reflection so the image will not be dark. This setting is adjusted globally through a scene parameter or per object.

The preferable setting for ambient light in most scenes in set to be zero or low unless the object is producing light. This setting makes the fill light and the secondary lights influence in your scene more visible.

Site accessed on 19th oct [http://:jmsoler.free.fr/.../tutor/lumiere_cornell_en.htm]

Chapter 6 Ambient occlusion

6.1.Overview:

Ambient Occlusion is a lighting technique that which is used to cast shadows on objects. This is a technique used in lighting which is misunderstood as this method casts shadows on objects where light does not reach. Ambient occlusion creates or casts soft shadows around the object which gives out a molded look.

In technical terms ambient occlusion is a global illumination method and is commonly referred to as a cheap trick for alternative method of global lighting method. This technique is to get ambient light in all contacted shadows. This is where ambient occlusion comes into being as some calculate the intensity of the light setup for every work file but most don’t and the best way to overcome is to use ambient occlusion where this does all the calculation and gives a better quality render more than we can accept.

6.2.How ambient occlusion works:

Ambient occlusion is a technique which adds visual realism to the image without being physically correct. The ambient occlusion result can be used to darken concave areas, which human eye perceives as indirect illumination shadows, or contact shadows. The advantage of ambient occlusion is its computational speed. As it may be computed with very short rays and as no additional shader evaluations are required, the performance may be significantly higher than for final gathering.

6.3.Ambient occlusion gains render time:

Ambient occlusion is enabled by default. However, no actual computations will happen until requested by further settings or by shaders. The ambient occlusion cache is set off by default. In this mode, only shaders which call for ambient occlusion values will initiate computation on demand. If no such shaders exist in the scene, there is no overhead compared scenes rendered with ambient occlusion turned off. In case the ambient occlusion caching is enabled then mental ray will perform some computations before rendering starts, to fill the cache.

The global defaults for ambient occlusion settings can be specified as scene options or on the mental ray command line. Most of these values can be overwritten by a shader.

The ambient occlusion caching may be enabled for the current rendering to gain overall speed. In this case, several preprocess passes will be computed. In the first pass, some ambient occlusion points are created on a coarse grid. Subsequent passes refine the grid adaptively. The density of the grid is determined by the "ambient occlusion cache density" setting which gives the upper bound to the number of ambient occlusion points per pixel.

Site accessed on 19th oct http://download.autodesk.com/us/maya/2009help/mr/manual/ao.html

6.4.Results better than indirect light:

Ambient occlusion is the easy and quick way to get Global illumination and tell how ambient occlusion note works in texture. Ambient occlusion produce soft shadows as like real world. when two models are placed near certain amount of light will be block and u will get soft shadows at the corner of the object

Ambient occlusion adding realism and produce more details in the output and render will be fast when we compare to Final gathering and Globule illumination

Ambient occlusion refers to a type of shadowing that occurs when the ambient light in an environment is occluded (blocked) from reaching a surface by other nearby objects or other parts of the same object. You can see ambient occlusion effects in the photograph .The darkness that occurs in the cracks and crevices in the plaster design on an overcast day are a perfect example of ambient occlusion.

Ambient occlusion effects are seen in many renders created using Final Gathering. that the ambient occlusion that occurs in a Final Gathering render lacks a certain amount of detail. Unless you increase the number of Final Gathering rays, detailed ambient occlusion shadows are difficult to achieve,

and the more rays you emit into a scene, the longer the render time will be.

This latter method is the most common approach and offers the most flexibility: the occlusion pass can easily be modified in the compositing software. Eliminating the need to re-render the entire scene if a change needs to be

made. In this way you can use the ambient occlusion texture to augment the shadowing of a render pass that uses Final Gathering or as a substitute for rendering with Final Gathering

Literature: Mental ray for Maya 3ds max and XSI Livny Boaz

Literature: Maya Visual Effects: the innovator’s guide Eric Keller

Literature: Mastering maya 2009- Eric Keller

Chapter 7 Rendering

7.1 Mental Ray rendering

Mental ray rendering is capable of producing a realistic and quality image. It can render just with a single processor machine. It is achieved by advanced and proprietary acceleration technique. It achieves better performance using parallelism on multi processor machine and also on network machines. Mental ray can be used on wide range of application, such as in full length movies, games, architectural design and on virtual models. Mental ray rendering is used as a standalone application for efficient rendering on local machines and as a software library on 3D content creation and CAD systems. Mental ray has a number of standard shaders which range from basic illumination to typical materials for architectural and design, car paint to physical sun and sky lighting. Mental ray has a built-in standard models for best rendering performance and quality cover.

7.2.Rendering

Ray tracing is an option on mental ray. Ray tracing is used for rendering very complex lighting. Ray tracing software is based on ray tracing architecture which allows for the flexible implementation of lighting effect. It includes reflection, global illumination, refraction. To speed up the ray intersection calculation it uses advanced tree algorithms. From an on-demand loading of geometry it can adjust to dynamic scene manipulation. Ray trace is used to produce shadows of an object. Without the ray trace is turned on there will be no shadows. In ray tracing, the light path is traced backwards i.e. the light is not traced from the origin or the source of light, it is traced from the eye or the object. The path of each light ray is defined by the straight line components. As the components vary from each other, each ray component is specified by mathematical equation defining its path as a function of space and time. Ray tracing is used on gaming, television and movie production.

7.3.Ray Tracing [12]

This is a technique used in global illumination which uses rays or photons in order to keep the light path in track in a scene as it is projected on a two dimensional viewing plane (monitor, screen). It computes the visible surfaces only from the perspective of the viewer. The backward ray tracing is set with setting up a 2D viewing plane which is subdivided into fine grid or mesh This is the representative of the mesh of video display.. Each grid represents a picture element. It is the ray tracers’ job to determine the color and brightness of each pixel based on the available scene information

Site accessed on 18th June http://whatis.techtarget.com/definition/0,,sid9_gci1068703,00.html

[12] Site accessed on 18th June [http://www.siggraph.org/edu/materials/]

Cite This Dissertation

To export a reference to this article please select a referencing stye below: