Wednesday, 27 March 2013

Mental Ray Contour Shader

I need to start rendering again and realised that I'd pretty much forgotton how to render contours so here are some notes to myself for the rest of the shots :)

1) In render settings enable contour rendering. For my specific purposes I've also gone for hide source (I don't want any other textures, lighting etc visible in my contour layer - I'll comp those together later), flood colour is white (it could be anything, I'm going to key it out in the comp), over sample value of 30 (I need it this high to get reasonable quality and the render times are fine), gaussian filter and filter support of 2.


2) Pipe in "contour_contrast_function_levels" to Contrast Shader and "contour_store_function" into Store shader. (See below for where to find these in the hypershader.)


3) The settings I used for the contour_contrast utilitiy are below. To make sure I got the outlines I needed and to prevent broken lines, contours flickering on and off etc etc I went for diff mat which draws a countour line between different materials. This meant that I had to apply multiple materials to a single object, by applying individual shaders to the faces that I wanted to be outlined


4) For contours which get narrower with distance from the camera plug the "contour_shader_depthfade" utility into the shading group for the material


5) Starter settings for the depthfade utility are below. These need to be tweaked on a shot-by-shot basis depending on camera / lens etc.


I used tons of different resources to get this right but here's one that was pretty clear :) http://wiki.bk.tudelft.nl/toi-pedia/Mental_Ray_Contour_Shader_tutorial 

Tuesday, 12 February 2013

Paper Textures

So, after a long break I'm back to working on my short film and I've started with some texturing of Margarita



Wednesday, 22 August 2012

The Writer: Trailer

Here's the trailer for the film in the form of the first shots . . . now just the rest to make :)


Environment: final look

Here are some stills showing the textured environment with contour outlines comped on and integrated with background artwork from David Fleck



Friday, 10 August 2012

LRC - some images from my comped shots

An update on lighting, rendering and compositing . . . here are some stills from my comps:






Saturday, 4 August 2012

Lighting: Lighting Sandbox, nighttime scene

Some early tests for the lighting in my night time shots . . .





. . . and here's what you tube had to say about my lighting skills!



Friday, 3 August 2012

Photon Colour

This is not so much a tech tip as a tech question. I've found that with one point light and one area light in my scene if I set them both to emit photons I can't get them to emit photons of different colours.

They either default back to white, or back to the colour that I set for the first light.

In the attribute editor I'm able to edit the colour and it looks as though it's changed - but the next time I go into the AO for the relevant light the colour has defaulted back to one of the scenarios described above.

Either I'm missing something really obvious or it's a bug in maya so if anyone has any answers please let me know.

Thursday, 2 August 2012

Tech Tips: frame offset with mental ray mv2DToxik pass

I've been having all sorts of problems whereby passes from any render layers which aren't my "main" layer (in this case AO and mattes) didn't line up with the passes from my main layer. They appeared to have a temporal offset of a fraction of a frame.

I've read a few forum threads and this is what I think was happening . . . 

In order to calculate vector information the motion vector pass renders with a 1/2 frame shutter offset (I think it's 1/2 a frame but don't quote me on that - I'm going to read up on the maths behind this when I have more time). All the other passes in that layer are rendered with the same offset (in my case that was beauty, spec, reflection, shadow etc etc). However, any layers without an MV pass associated still render on whole frames (my AO and matte passes). Hence the offset in my comp!

The solution:

Number 1:
In render globals under the Quality Tab turn on Motion Blur (temporarily). Go to the "Motion Offsets" tab. Check "Custom Motion Offsets" ON. From there set the "Motion Back Offset" to 0.00. Finally, just turn off Motion Blur. This disables the 1/2 frame offset on any layers with the mv2d render pass.

Number 2:
Under the Options Tab, expand the "Mental Ray Overrides" tab. Scroll down to the "Performance" Tab. If you check "Force Motion Vector Computation" ON, it forces that offset on all your render layers, even if you don't have that mv2d pass associated with that render layer.

Thanks to the following for helping me figure this one out:

http://forums.cgsociety.org/archive/index.php/t-971568.html
http://aloedesign.com/2008/12/maya-2d-motion-vectors-tutorial/3/

Wednesday, 1 August 2012

Comping: sample Nuke script

Now that I've finally fixed my rendering problems and have some frames to play with I'm LOVING using Nuke.

With less than two weeks to learn Nuke from scratch and comp my shots I've (obviously) barely scratched the surface, but it's clearly a genius software (and whoever thought of the tab function deserves a knighthood, or at least a pint).

Really all I've had time for in Nuke is to realise how much functionality there is which I'm not going to get my head around in time for my masters hand-in ;) but below is a sample script from one of my shots which has the basics (grades, colour correction, depth, DoF, motion blur etc) plus a few dust particles, god rays and a contour line overlay for good measure.


Saturday, 28 July 2012

Ahhhh - don't combine referencing and rendering in maya . . .

So having done lots of lighting tests, played with GI and Final Gather settings days to optimise render times etc etc I've now just spent the best part of two week not rendering a single frame!

My scene has been behaving really strangely. Amongst other things lighting updates weren't rippling through from my referenced files, materials were mysteriously falling off assets and after painstakingly setting up render layers I was then getting locked out of them with error messages about missing nodes.

However, I finally know what was causing the problem. Maya's not very robust when it comes to combining referencing and render layers. After much googling I came across this post - appropriately titled "why your render layers break" which was an absolute saviour

http://www.toadstorm.com/blog/?p=26

Because the problems I was encountering were so various I didn't realise at first that they had a common source. Great to know what the problem is now though.

Fortunately my project is simple enough that I can just import the environments and rigs into my anim scenes, redo the lighting in situ, and use this as my final render scene.

Gah, why is it that I hit my worst technical problem so close to the final deadline? :)