trainingCourses traininingDVDs trainingArticles clients news diary contact
hoykeyCharts webLinks articlesReviews usefulDocuments futureVFXMovies sphereVFXGear
homeScreen RSS

Training Articles

How do I rename the saved Layout labels from ‘Restore Layout X’ to something more personal?
How do I add a custom menu to the Toolbar and then add a custom .gizmo to it?
How do I connect a Tracker into an individual Bezier point?
How do I replace an existing node with a new one?
How do I remove a node from the Node Graph without deleting it?
How do I create a 'floating' Properties Panel pane for a single node without
messing up my normal Properties Panel layout?
Understanding Nuke's unique Layer and Channel system (including the Shuffle Nodes).
How do I use 'File References' in Nuke so my scripts still work if I move them to another drive or computer? - NEW
How do I create a custom UV pass in Maya?
How do I create a custom Fresnel Render Pass in Maya?
How do I create a custom Point Render Pass in Maya?

 

How do I rename the saved Layout labels from ‘Restore Layout X’ to something more personal?

For this you need to edit your ‘menu.py’ script which is found in…

OSX - /Applications/Nuke 5.1v6/Nuke5.1v6.app/Contents/MacOS/plugins
Windows XP - \Program Files\Nuke 5.1v6\plugins

Scroll down to approximately line 185 and you will find ‘#Layout menu’ and the code shown below…

# Layout menu m = menubar.addMenu("&Layout")
m.addCommand("Restore Layout 1 (startup default)", "nuke.restoreWindowLayout(1)", "+F1")
m.addCommand("Restore Layout 2", "nuke.restoreWindowLayout(2)", "+F2")
m.addCommand("Restore Layout 3", "nuke.restoreWindowLayout(3)", "+F3")
m.addCommand("Restore Layout 4", "nuke.restoreWindowLayout(4)", "+F4")
m.addCommand("Restore Layout 5", "nuke.restoreWindowLayout(5)", "+F5")
m.addCommand("Restore Layout 6", "nuke.restoreWindowLayout(6)", "+F6")

Edit and save as needed, my version is show below as an example.

# Layout menu m = menubar.addMenu("&Layout")
m.addCommand("Restore Sphere VFX Layout (startup default)", "nuke.restoreWindowLayout(1)", "+F1")
m.addCommand("Restore Original Layout", "nuke.restoreWindowLayout(2)", "+F2")
m.addCommand("Restore Layout 3", "nuke.restoreWindowLayout(3)", "+F3")
m.addCommand("Restore Layout 4", "nuke.restoreWindowLayout(4)", "+F4")
m.addCommand("Restore Layout 5", "nuke.restoreWindowLayout(5)", "+F5")
m.addCommand("Restore Layout 6", "nuke.restoreWindowLayout(6)", "+F6")

 

How do I add a custom menu to the Toolbar and then add a custom .gizmo to it?

For this you need to first create a new folder call '.nuke'. I needs to be made in either...

OSX - /Users/your user name
Windows XP - \Documents and Settings\your user name

Next write a text file with the following information in it.

# Custom Nuke Menu on Toolbar

import nuke
import os.path

# Get the top-level toolbar
toolbar = nuke.menu("Nodes")

# FX Share Menu definitions
m = toolbar.addMenu("TestMenu", "testMenu.png")
m.addCommand("depthSlice", "nuke.createNode(\"depthSlice\")",icon="depthSlice.png")
m.addCommand("Reorder", "nuke.createNode(\"reorder\")",icon="reorder.png")
m.addCommand("iDilateErode", "nuke.createNode(\"iDilateErode\")",icon="iDilateErode.png")

The information above in dark blue is what you will need to replace with your own custom information, everything else need to remain the same.

The dark blue lines of code follow a pattern,

m.addCommand("nameOfGizmo"
This part is the name of the Gizmo which you have made and save into the root of .nuke, ie nameOfGizmo.gizmo

, "nuke.createNode(\"depthSlice\")"
This part created the name of the tool you'll see in the Toolbar and put's it into the menu defined above, in our case 'testMenu'.

,icon="depthSlice.png")
This final part adds the icon you will see in the menu of the Toolbar. It needs to be save at a .PNG file, 24 pixels by 24 pixels. Also note that there is also a .PNG file in the line where the new menu on the Toolbar is created. In our example above it's m = toolbar.addMenu("TestMenu", "testMenu.png").

The best order to work in overall is to first create the gizmo and save it in the root of '.nuke'
Secondly create the 32x32 pixel icon you want to use and save that in the root of '.nuke' as a PNG file.
Finally create/edit the file above saving it as menu.py again into the root of '.nuke'

You should end of up was a number of files in '.nuke' such as...

menu.py
nukeMagicTool1.gizmp
nukeMagicTool1.png
nukeSuperTool1.gizmo
nukeSuperTool1.png

For an example of one of our menu.py setups which is slightly more complicated, thanks to Matt Plec (The Foundry), click here...

How do I connect a Tracker into an individual Bezier point?

After completing the Track and drawing the Bezier shape simply drag from the Trackers 'Animation Menu' directly onto the Beziers control point.

 

 

How do I replace an existing node with a new one?

First make the new node which will replace the incorrect one. Next select and drag the new node, while dragging hold down SHIFT + CTRL and then drop the new node over the one being replaced. The incorrect node will pop out and the new one will take it's place.

 

How do I remove a node from the Node Graph without deleting it?

Select the node you want to remove from the Node Graph, then use the hotkey combination SHIFT + CTRL + X and the node will pop out from the graph.

 

How do I create a 'floating' Properties Panel pane for a single node without messing up my normal Properties Panel layout?

With your new node created simply CTRL double click on it and the new floating Properties Panel will appear.

 

Understanding Nuke's unique Layer and Channel system
(including the Shuffle Nodes)


One of Nuke's unique features is its 'Multi-channel, high dynamic range compositing system'. What this means is that Nuke can handle over a thousand 'Channels' of data; red, green, blue and alpha would be counted as 4 'Channels' out of a possible 1024 available. 'Channels' are stored in 'Layers' which may contain up to eight 'Channels' each. To help understand what's happening take a look at the diagrams below.


A SINGLE LAYER CONTAINING 4 CHANNELS



256 LAYERS, EACH HOLDING 4 CHANNELS, MAKES 1024 CHANNELS OF DATA

 

This 'Layer' and 'Channel' system is unique to Nuke and gives the artist huge flexibility both working directly in Nuke and in using multi-pass files rendered from a 3D package. Let's deal with 3D first.

Benefits Coming from 3D
Today many 3D packages and studios support the use of multi-pass rendering. What this means is that instead of rendering your images flattened, you render them in layers based on colour and light information. e.g. a render could be broken down into Ambient, Diffuse, Specular, Reflection and Shadow passes. These are then combined back together in Nuke (or any Compositing package) to create the look of the original flattened version.



FROM TOP LEFT TO BOTTOM RIGHT: BEAUTY (Flattened), EMPTY PASS, DIFFUSE, REFLECTION, SHADOW, SPECULAR

 

This gives the compositor a vast amount of freedom in deciding how the final image should look. A colour correction could be made to the Specular pass, for instance, or a blur added to the reflection before the passes are composited together. This is a much faster and more efficient way of working, saving both time and money because the renders do not have to be returned to 3D for re-rendering which is often a long and expensive process.


ORIGINAL RENDER
COLOUR CORRECTED SPECULAR &
BLURRED REFLECTION PASSES

Nuke's 'Layer' and 'Channel' system gives you the ability to work directly with file formats that can hold all this extra data. Ambient, Diffuse, Specular and Reflection passes are all colour passes which need red, green and blue to make up each pass. Shadow, on the other hand, is often just a single colour and hence needs just a single channel. So, for example, combining together Ambient, Diffuse, Specular and Reflection passes (with 3 channels each) and a single channel Shadow pass would give you a total of 13 channels. Many file formats are unable to handle this many channels, e.g. JPEG supports 3, TARGA supports 4, TIFF only 5 or so. Some file formats though have been specially designed to handle more channels, and the one most companies have now adopted is Industrial Light and Magic's in-house format openEXR (.exr). This file format can support up to 1024 channels of data and has the added benefit of supporting 16-bit floating-point, 32-bit floating-point, and 32-bit integer colour depths.

 


Benefits Inside Nuke
Nuke's unique 'Layer' and 'Channel' system enables us not only to view all these different render passes, but also to reorganise, split-out and work with them in multiple ways. When the above example is loaded into Nuke via the Read node and viewed, the Viewer shows the rgba 'Layer' and RGB 'Channels' as below. In your 3D package this would be your flattened render (Beauty pass).



THE LAYER AND CHANNEL BEING SHOWN IN THE VIEWER
(ie The 'Layer' called RGBA and the collective 'Channels' Red, Green and Blue)


Now both the 'Layer' control and 'Channel' control can be changed to show you different information in the Viewer.



So in the example below the Viewer has been changed to show the 'Layer' Reflection and then only the 1st or Red 'Channel'



Now the reason I say the "1st" 'Channel' as well as "Red" is that the Viewer can only describe the information as Red, Green, Blue or Alpha. For example a file could contain a zDepth pass, a Point Pass, a UV Pass, a Normal Pass, a Motion Vector Pass, or various Mattes, etc. All these utility or AOV (Arbitrary Output Variables) passes are not really colour passes but rather data passes. Unfortunately Nuke does not allow us to view this information using its proper name but always calls it R, G, B and A. So if you had a Motion Vector pass containing U and V information, it would be shown in the Viewer as R and G.


Before we move on from looking at the Viewer, it's worth talking about the middle option between 'Layers' and 'Channels' which by default is set to 'rgba.alpha'. This box only becomes active when the 'Channel' selection box is set to 'Matte Overlay' (Mat). It gives you the ability to specify a matte overlay channel and view it together with your colour channels in one view by showing it as a red semi-transparent shape. Although it would commonly be used to view the alpha channel or any other related Matte over the colour information, the overlay can in fact be any channel you specify in this middle box, giving you the ability to define and view a custom Matte of your choice.

The example below illustrates this. A Bezier node which has been drawn round three tiles on the floor. The output of this Bezier has been assigned to a custom 'Layer' called "floor" and a single custom 'Channel' called "Bezier1" - more about these custom settings later. (Note that in the Viewer, this will be called R not bezier1). In the Viewer, the 'Layer' has been set to rgba and the 'Channel' has been set to the Matte Overlay (Mat) option. The middle box has then been changed from 'rgba.alpha' to 'floor.bezier1' in order to show the Bezier1 custom Matte overlayed with the colour channel.



Shuffle and Shuffle Copy
The Shuffle and Shuffle Copy nodes in Nuke enable you to organise and rearrange the 'Layers' and 'Channels' and to create new custom ones if needed. At first they can appear slightly daunting but once you understand their layout, things are much simpler. The first thing to note is the UI for both Shuffle and Shuffle copy are almost identical, which is one of the confusing things.


SHUFFLE, Single Input
(Note UI change for ease of understanding)

SHUFFLE COPY, Double Input


The main difference between Shuffle and Shuffle Copy nodes are the number of input - single versus double. Shuffle lets you rearrange the channels from a single image and then output the result to the next node in your composite, whereas Shuffle Copy lets you rearrange channels from two images into a single output.

Shuffle
The diagram below shows the flow of data ('Layers' and 'Channels') through the shuffle node.



I find the easiest way to read the Shuffle node is backwards, ie. "What do I want to get OUT in the end and therefore what do I need to feed IN to achieve this?".

In this example the data is not changed. We want to end up with the 'Layer' rgba containing the 'Channels' Red, Green, Blue and Alpha. To do this we first set the output 'Layer' to rgba (pre-set already). We then need to choose which Input 'Channels' are going to be fed into which Output 'Channels'. We want Red into Red, Green into Green, Blue in Blue and Alpha into Alpha. In order to achieve this we simply check the box where the DATA IN meets the DATA OUT as shown above.

Now let's change the order. We'll put the Red input into the Green output, the Green input into the Blue output, and the Blue input into the Red output. We'll leave the Alpha channel where it is for the time being.


ORIGINAL IMAGE

SETTINGS

SHUFFLED IMAGE


Now let's talk about Alpha. You can of course Shuffle any 'Channel' into the Alpha channel as well as Shuffling Alpha into the r, g, b channels, but you also have the option of replacing the Alpha with black (removing the Alpha channel) or with white (making it solid). You do this by using the 0 and 1 columns.


ORIGINAL ALPHA

SHUFFLE SETTINGS

SHUFFLED ALPHA


The bottom section of the Shuffle node works just like the top and enables you to add data into more than the standard four (r, g, b, a) 'Channels' we've so far talked about. Say you have an Alpha channel that you want to make solid but you still want to keep that data, the bottom section of the Shuffle node can help you do this. You can move the Alpha channel data to a new (or existing) 'Channel' and then overwrite the original Alpha with a solid white (1).

In this example we're make a new custom 'Layer' and 'Channel' to hold our existing Alpha data. To do this, make the Alpha channel solid as above. Now in the lower half change the none box to new which brings up a new dialog box.



This New Layer dialog box enables you to create a new 'Layer' with up to eight 'Channels'. First add the name of the new 'Layer' you want to create, then add one or more 'Channel' names. If you click the Auto: rgba button Nuke will fill in the first four 'Channels' automatically for you. Once complete, click OK to return to the Shuffle node.


NEW LAYER DIALOG BOX
Name = oldAlpha
Channels = alphaShape

SHUFFLE SETTINGS
Note alphaShape is in the first 'Channel' of the new 'Layer' which is the R 'Channel', out of rgba

VIEWER
'Layers' and 'Channels' changed to show newly Shuffled Alpha.
Note alphaShape is labeled R


Now simply check the box where alphaShape (oldAlpha) and a (rgba) meet, so that your original Alpha channel is shuffled into your new custom 'Layer' and 'Channel'. Please note that, as discussed earlier, when you view this new custom 'Layer' and 'Channel' in the Viewer it will come up under the 'R' label instead of 'alphaShape'.

Shuffle Copy
Once you've got the hang of Shuffle, Shuffle Copy is very straightforward. Let's assume you have two images, one contains the Beauty pass and the other the zDepth pass. You need both of these passes brought together in the same stream so you can use the ZBlur tool which creates a Depth of Field blur.

The first thing to note with the Shuffle Copy node is that whereas the Merge node's inputs are labelled A and B, for some reason the Shuffle Copy inputs are labelled 1 and 2. You can assume 1 is A and 2 is B. In Nuke the B input is always the main direction of the stream and the A input adds something into that existing stream. This works the same way for the Shuffle Copy, 2 is the main stream and 1 brings in the extra data.

In the diagram below the Beauty Pass is coming in on the 2 input and the extra zDepth pass is coming in on 1. If you look at the Shuffle Copy properties you'll see that we have both "1 in" and "2 in" column inputs. Do not panic! It works just the same as the Shuffle node. The red, green, blue and alpha values all need to come from "2 in" which is being fed by the Beauty Pass. We then utilise an existing 'Layer' and 'Channel' in Nuke called 'depth' and 'Z' which we open up in the lower section. Into this we feed the red 'channel' from the rgba 'Layer' of the zDepth Pass (coming in on "1 in").



More Information on Shuffle and Shuffle Copy
Up until now we have only been using the 'Layer' rgba with the Shuffle and Shuffle Copy nodes, but there is no reason why you can't change the 'Layer' and Shuffle other passes around. A common use of the Shuffle node is to split out a multipass openEXR back into individual layers so they can be composited together.



Other CHANNEL Nodes

Some other useful nodes for working with 'Channels' are COPY, CHANNEL MERGE, ADD and REMOVE.

COPY
Replaces 'Channels' in the B input with 'Channels' from the A input.

CHANNEL MERGE
Does simple maths between one 'Channel' from each input and puts the result in the output 'Channel'.

ADD
Adds new 'Channels' to the image and stream.

REMOVE
Removes 'Channels' from the image and stream.

 

How do I use 'File References' in Nuke so my scripts still work if I move them from one drive or computer?

A common issue that happens with many compositing systems is that the files being read in are referenced from a specific place on a drive, but when the script is moved to another location the files can no longer be found and the script errors out. This can be fixed in Nuke by the use of a special command which replaces the first part of the file location.

The key is that the script is saved in a 'root' folder with the footage, fbx and other files saved in subFolders within that root. ie.

c:\projects\nukeComp01\testScript.nk
c:\projects\nukeComp01\footage
c:\projects\nukeComp01\fbx

In the past your Read node would have looked like this: File c:/projects/nukeComp01/footage/MD_050_FG01_PLT.%04d.dpx

This would mean that if you moved your footage or the whole project to a different location the script would error out looking for the original location of the files.

BUT if you save the script in the root with the folders structures as mentioned above and change
File c:/projects/nukeComp01/footage/MD_050_FG01_PLT.%04d.dpx

to
File [file dirname [value root.name]]/footage/MD_050_FG01_PLT.%04d.dpx
the project structure can now be moved about without the fear of nodes erroring out due to missing locations


 

How do I create a custom UV pass in Maya?

When exporting a 3D model out of Maya (or your favorite 3D package) as either an .fbx or .obj the UV data which controls how the textures are applied to the object are baked into the geometry and are available to you inside Nuke. However for some tools such as the STMap you need the UV's as a render pass and this tip is designed to show you one way to achieve this inside of Maya.

First of all create a new 'Render Layer' and add your objects.

Next change your 'Render Settings' to use mental ray as the Renderer and under the 'Passes' tab create a 'Custom Colour' pass and move it from Scene Passes down into Associated Passes. This way it's assigned to the 'Render Layer' you just made.

Now in your 'Hyper Shader' create three new nodes, firstly from the Maya Nodes 'surfaceShader', secondly from under the mental ray section a 'mib_texture_vector' node and also a 'writeToColorBuffer' node.

From here we need to wire this together so firstly, via the 'Connection Editor' (it will pop up if you drag one node onto the other via the middle mouse button), connect the 'surfaceShader.outColor' to the 'writeToColorBuffer.evaluationPassThrough'.

Next connect the 'mib_texture_vector.outValue' to the 'writeToColorBuffer.color'.

Next double click on the 'writeToColorBuffer' node to open up it's parameters in the 'Attribute Editor'. At the top in the 'Frame Buffer Options' change the 'Custom Color Pass' to 'customColor' and you will notice in the 'HyperShader' the nodes are now connected.

Now double click on the 'mib_texture_vector' node and in the 'Attribute Editor' under 'Parameters' change the Project section to 'UV'.

By default the shader will extract the first UV (0), but if you have multiple UVs, you may need to increase the 'Select' attribute to 1, 2, or more.

Also and very importantly make sure you apply the 'surfaceShader' to your geometry.

The final this you must do before rendering is change your colour bit depth from the standard 8bits per channel to 32bit (full float). To do this again open up your 'Render Settings' and at the bottom of the 'Quality' tab change the 'Date Type' to 'RGBA (Float) 4x32 Bit).

In order to see your render pass you must 'Batch Render' your scene.

Click here to download the Maya 2010 ASCII file...

(Thanks to Dave Lajoie, Autodesk and Tahl Niran, Double Negative).

 

How do I create a custom Fresnel Render Pass?

First off what is a 'Fresnel' render pass? At it's most basic form a Fresnel pass in a matte which can be used to remove or reduce other render passes based on camera angle. For example if you where to stand front of a clean shinny car the side panels looks more reflective than the roof, this is because you are looking directly at the side where as the roof appears less reflective. Another example is the way water in a swimming pool looks dependant on whether you look direction down into the water or look across it. One way appears pretty much transparent where as the latter look more opaque. In order to fully grasp what's going on where need to understand a bit of physics.

Reflection
Reflection is the change in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves. The law of reflection says that for specular reflection the angle at which the wave is incident on the surface equals the angle at which it is reflected. Mirrors exhibit specular reflection.

In acoustics, reflection causes echoes and is used in sonar. In geology, it is important in the study of seismic waves. Reflection is observed with surface waves in bodies of water. Reflection is observed with many types of electromagnetic wave, besides visible light. Reflection of VHF and higher frequencies is important for radio transmission and for radar. Even hard X-rays and gamma rays can be reflected at shallow angles with special "grazing" mirrors.

Reflection of light is either specular (mirror-like) or diffuse (retaining the energy, but losing the image) depending on the nature of the interface. Furthermore, if the interface is between a dielectric and a conductor, the phase of the reflected wave is retained, otherwise if the interface is between two dielectrics, the phase may be retained or inverted, depending on the indices of refraction.

A mirror provides the most common model for specular light reflection, and typically consists of a glass sheet with a metallic coating where the reflection actually occurs. Reflection is enhanced in metals by suppression of wave propagation beyond their skin depths. Reflection also occurs at the surface of transparent media, such as water or glass.

In the diagram a light ray PO strikes a vertical mirror at point O, and the reflected ray is OQ. By projecting an imaginary line through point O perpendicular to the mirror, known as the normal, we can measure the angle of incidence, θi and the angle of reflection, θr. The law of reflection states that θi = θr, or in other words, the angle of incidence equals the angle of reflection.

Refraction
Refraction is the change in direction of a wave due to a change in its velocity. This is most commonly observed when a wave passes from one medium to another. Refraction of light is the most commonly observed phenomenon, but any type of wave can refract when it interacts with a medium, for example when sound waves pass from one medium into another or when water waves move into water of a different depth.

In optics, refraction occurs when light waves travel from a medium with a given refractive index to a medium with another. At the boundary between the media, the wave's phase velocity is altered, usually causing a change in direction. Its wavelength increases or decreases but its frequency remains constant. For example, a light ray will refract as it enters and leaves glass, assuming there is a change in refractive index. A ray traveling along the normal (perpendicular to the boundary) will change speed, but not direction. Refraction still occurs in this case. Understanding of this concept led to the invention of lenses and the refracting telescope. Refraction can be seen when looking into a bowl of water. Air has a refractive index of about 1.0003, and water has a refractive index of about 1.33. If a person looks at a straight object, such as a pencil or straw, which is placed at a slant, partially in the water, the object appears to bend at the water's surface. This is due to the bending of light rays as they move from the water to the air. Once the rays reach the eye, the eye traces them back as straight lines (lines of sight). The lines of sight (shown as dashed lines) intersect at a higher position than where the actual rays originated. This causes the pencil to appear higher and the water to appear shallower than it really is. The depth that the water appears to be when viewed from above is known as the apparent depth. This is an important consideration for spearfishing from the surface because it will make the target fish appear to be in a different place, and the fisher must aim lower to catch the fish.

The diagram on the left shows an example of refraction in water waves. Ripples travel from the left and pass over a shallower region inclined at an angle to the wavefront. The waves travel more slowly in the shallower water, so the wavelength decreases and the wave bends at the boundary. The dotted line represents the normal to the boundary. The dashed line represents the original direction of the waves. This phenomenon explains why waves on a shoreline tend to strike the shore close to a perpendicular angle. As the waves travel from deep water into shallower water near the shore, they are refracted from their original direction of travel to an angle more normal to the shoreline. Refraction is also responsible for rainbows and for the splitting of white light into a rainbow-spectrum as it passes through a glass prism. Glass has a higher refractive index than air. When a beam of white light passes from air into a material having an index of refraction that varies with frequency, a phenomenon known as dispersion occurs, in which different coloured components of the white light are refracted at different angles, i.e., they bend by different amounts at the interface, so that they become separated. The different colors correspond to different frequencies.

So what does a 'Fresnel' pass look like and how do you make one in Maya?

First of all create a new 'Render Layer' and add your objects.

Next change your 'Render Settings' to use mental ray as the Renderer, no need to create a render pass as you just need the standard beauty which you get for free.

Now in your 'Hyper Shader' create three new nodes all from the Maya Nodes section. Firstly a 'surfaceShader', secondly a 'ramp' and lastly a 'sampleInfo' Node

Next edit the 'ramp' Node removing the central colour and then changing the top colour to black and the bottom colour to white. Changing the amount of black and white in this ramp is the way you fine tune the Fresnel effect.

From here we need to wire all the nodes together. Firstly, via the 'Connection Editor' (it will pop up if you drag one node onto the other via the middle mouse button), connect the 'ramp.outColour' to the 'surfaceShader.outColour'. Then connect the samplerInfo.facingRatio' to the 'ramp.vCoord'.

Now making sure you have your new render layer selected, right click on the 'surfaceShader' and select the 'Assign Material Override for (name of your render layer)'.

For this type of render layer there is no need to Batch Render your scene, simply doing a standard 'Render Current Frame' will render your new custom Fresnel pass.

Click here to download the Maya 2010 ASCII file...

(Thanks to Tahl Niran, Double Negative, and Wikipedia).

 

How do I create a custom Point Render Pass in Maya?

A Point Pass is used in conjunction with a Normal Pass for relighting purposes inside of Nuke. Both Point and Normal Pass come in 3 varieties, Object Space, World Space or Camera Space. If the Point pass is rendered using the World Space type then the Normal Pass must be the same or the relighting won't work properly.

First of all create a new 'Render Layer' and add your objects.

Next change your 'Render Settings' to use mental ray as the Renderer, no need to create a render pass as you just need the standard beauty which you get for free.

Now in your 'Hyper Shader' create two new nodes all from the Maya Nodes section. Firstly a 'surfaceShader' and secondly a 'sampleInfo' Node

From here we need to wire the two nodes together. Via the 'Connection Editor' (it will pop up if you drag one node onto the other via the middle mouse button), connect the 'samplerInfo.pointWorld' to the 'surfaceShader.outColour'.

Now making sure you have your new render layer selected, right click on the 'surfaceShader' and select the 'Assign Material Override for (name of your render layer)'.

For this type of render layer there is no need to Batch Render your scene, simply doing a standard 'Render Current Frame' will render your new custom Fresnel pass.

Click here to download the Maya 2010 ASCII file...

(Thanks to Tahl Niran, Double Negative).

© 2010, Sphere VFX Ltd. | All Rights Reserved
homeScreen RSS