Category Archives: Render Studio 1

Fruit Bowl – pipeline and trouble-shooting

I developed a set of general settings for lighting, testing and for final renders and wrote them down. This helped to form a checklist for troubleshooting. Here are the 3 lists of important settings I used for various stages of render completion-

Light blocking stage – really base level settings for blocking in initial lighting.
Resolution – 640x 360
Materials – matte white mia-x (no textures)
Shadows – 8 samples only on physical sun
Adaptive sampling – max  0
Trace depth – 0
Final gather accuracy – 12
Final gather point density – .1
Multi-pixel filter – box

Testing with textures – (intermediate)
Resolution – 1280 x 720 (but mostly rendering regions)
Materials – final textured shaders but with any glossy samples set low (around 8)
Shadows – 32 samples on physical sun
Adaptive sampling – max  1
Trace depth – 12
Final gather accuracy – 32
Final gather point density – .5
Multi-pixel filter – Guass

Final Renders – (high quality)
Resolution – 1280 x 720
Materials – final textured shaders but with any glossy samples set as high as they need to be (sometimes as high as 128)
Shadows – 256 samples on physical sun
Adaptive sampling – max  2
Trace depth – 16 (when required)
Final gather accuracy – 100
Final gather point density – 1
Multi-pixel filter – Mitchell
DOF – Bokeh when manageable, otherwise lens blur in post with camera depth channel

Of course this had to be flexible – just a general guideline. I only ever went as high as I needed.


Fruit bowl project – Critical Reflection

Final daylight render without grapes
Final daylight grapes hero render
Alternate lighting setup – ‘moonlight with under-cabinet downlights’

This exercise has reminded me of just how many components you need to get right for a render to look photo-realistic. An image is only as strong as its weakest link and a technically brilliant render can be a failure if it is framed badly, has depth of field that is un-natural, or burnt out highlights. I love this quote from Jeremy Birn, author of the slightly dated but surprisingly still helpful ‘digital lighting and rendering’ – ‘If it smells like fish, it is not good fish…if it looks like computer graphics, it is not good computer graphics’ (2000)
Every texture and model has to be right, because it only takes one CG looking texture or piece of faceted geometry to remove believability from the whole project.
Mental ray makes things a little easier if you know the rules of sticking to a physically accurate workflow. Sticking to quadratic decay on lights and using colour management takes a lot of the guess work out of the rendering workflow so you  can think more about artistic solutions.

I managed to stick to a colour managed pipeline except in times when I was selecting swatch colours based on render feedback, I did not see the point in using gamma correction nodes in these particular cases. An example of this is the case of selecting swatches for SSS colours or the granite cell colours. As I was adjusting colours  based on render test feedback, it seemed counter productive to then go and work out the gamma corrected colour.
I learned a lot about the render settings and what you can get away with to make render times faster.
I am really happy that I had problems with long render times due to mental ray lens shaders – it forced me to learn about the quicker option of rendering a camera depth channel and applying lens blur in post. I had never done this before. There are limitations of course and I found that I could only push the blurs so far but it seemed to fit my requirements.
I also really like the approximation editor, it worked like a dream for tesselating the branches on the grapes with a single click.
Final gather was my ‘go to’ choice for indirect illumination because of it’s ease of use ‘the simplest method of providing illuminition in your scene’ (2010)

As far as the texturing side of things, I REALLY like the mudbox-photoshop-maya-mental ray pipeline.
This kind of pipeline is explained by Owen Demers in ‘Digital texturing and painting’ and the benefits (over just photography alone) are can summarized like this-
• flexibiliy of modification
• you can build your artistic eye and gain confidence
• not becoming a slave to photographing something every time you want to build a texture

I enjoyed using the freedom of photoshops transformation tools to manipulate bits of photos so they could be re-used as stamps. Mike Hill related this process to how we as 3D modellers manipulate geometry with deformers ‘many of you will take some basic geometry and play with modifiers such as stretch, taper bend twist and spherize to generate something original. It is the same principle in photoshop.’ (Sykut & Ragonha  2011,p10)
Apart from wishing I had more time to paint in mudbox to truly get the textures perfect, I really only had 2 problems along the texturing road.

1/ Initially I had a terrible time trying to get alpha working on my own custom stamps. It was only when I realized that your custom stamps have to be painted white in photoshop rather than black that I mastered the pipeline. By this time I had already done quite alot of texture building using the default brushes which also worked quite well but I made sure I re-did the apple and banana with my own custom stamps to make sure I had a handle on it.
The other area where I had a bit of trouble was using normal maps. I hand sculpted detail for the orange in mudbox, extracted a normal map for use in maya. This worked brilliantly until I mapped a hand painted diffuse colour. The combination of the normal map and diffuse produced a highly visible seam on the UV cut which I could not seem to get rid of. I was running out of time to find a fix for the problem so I had 2 easy options-

a/ rotate the geometry so the seam was not visible in the frame or

b/ not use a diffuse colour map

I went for option b because the orange looked really good anyway just using a flat orange swatch and letting the normal map do all the work!

Mostly I found this whole process really relaxing and enjoyable and it has contributed to me seriously thinking about pushing to do rendering 2 and maybe even eventually trying to build a career in texturing, rendering. I am already pretty interested in compositing and I think it might make good triple skillset.
I think I would do more polishing before showing off the fruitbowl in a showreel but I am quite happy with what I achieved given the inevitable time pressure of learning some of the necessary techniques very late in the semester.


Demers, O 2002, Digital texturing and painting, New Riders, USA
Sykut, A & Ragonha M 2011, Photoshop for 3D artists, 3D total publishing, UK
Birn, J 2000, Digital lighting and rendering, New Riders, USA
O’Connor, J 2010, Mastering Mental Ray: Rendering techniques for 3D and CAD professionals, Wiley, Indianna USA

Fruit Bowl Progress Reports

Stage 1- lighting

• I have decided on my lighting setup and framing. I want the fruit mostly top lit, and given that we are indoors and I want to use natural light, there is only one solution- mimic a skylight.

• First I created a physical sun and sky system, then cut a skylight size hole in the ceiling geo.
• Next I place a mental ray area light in the gap and map a portal light to collect the rays and bounce them down into the room –

• I am very fussy with the rotation of the sun, -72 degrees in X gives me just the right shadow falling across the fruit to creating a nice shadow. This will be the only light casting shadows

• I apply a matte white mia-x shader to all the objects for lighting evaluation

• I need some fill light for the tile wall so I decide for 2 spotlights, one either side –
For each fill, I map a seperate gobo that I have hand painted in photoshop. I want it to feel like there is more than one window in the room and hint that there might be some venetian blinds on them. Here is how this looks –
Lighting done for now, time to sort out all the shaders.

Stage 2  – shader building

Final daylight render – no grapes

I wont talk too much about the fruit textures or the basket because that is in a separate texturing post but its worth mentioning the other background stuff as I experiment alot with procedurals.
• For the benchtop, I use an mia-x and map a 3D granite procedural to the diffuse colour. The granite has basic swatches for the cell colours but for the filler colour I map in a grungy scatches image to break it up a bit. I use variations of this grungy image for the bump and spec also.
• For the glass bottle, I use the ‘interfaces’ technique from the mia-x manual but it gets its slight blueish look from a ‘use colour at max distance’ swatch. I achieved the soft specular highlights on the bottle by mapping a cloudy texture to the gloss on the air-glass interface shader.

• for the caustics through the bottle, I make a new spotlight just dedicated to caustics and light link it to just the benchtop, the tiles and the bottle.
I focused this light quite tightly in on the bottle from the same position as the right fill light. I then set it as a photon emitter.

Up until now I have avoided building a grapes shader, I have placed them on their own display layer and hid them out of the render. The grapes tend to hide everything else and I wanted the above hero render to show off all the other fruit shaders. This meant adjusting some of the fruit positions so that were not floating in mid-air.
DOF – I use a bokeh lens shader for depth of field using a locator to measure the focus distance. This has a HEAVY impact on render times when using high enough samples to achieve a clean enough result. In fact, the render time on this frame went from 12 odd minutes to over 10 hours! My render machine is a 3 year old imac with a 2.8 Ghz processor with 4 cores.
I will need to find a DOF workaround because I need to do more renders and nobody has that kind of time.  This is the only render that will have genuine DOF.

Stage 3 – SSS, more shader tweaking and alternate lighting scenario

Final Daylight render- Grapes Hero

As I said above, until now I have avoided the grapes. It is time to set up a shader for them.

I have been reading about a technique where you can exploit the sub-surface scattering properties of the fast SSS shader combined with the flexibility of the specular features of the mia-x. This is done be piping the SSS shader into the ‘additional colour’ node of the mia-x.
I set up the SSS as suggested in the mental ray manual, tweaking each SSS layer at a time and tweaking the colour until I achieve the right translucent effect I was after. Running it into an mia-x meant that I could adjust the specular reflective qualities inside the mia-x. I also use a procedural map for breaking up the spec highlights to get a ‘frosted’ result. This method did produce really photo-realistic grapes but making tweaks was very painful due to the expensive render times. I would not use this method again unless I knew I had lots of time to play.
I also added some nurbs sphere water droplets, snapping them to vertices on some of the grapes. I made a transparent shader, but initially they were not showing up enough, I fixed this by overdriving the value on the reflections and dropping the transparency to less than 1. I think I ended up at .98 just to allow a little diffuse to show up. It is still very subtle but worth it.

For the branch on the grapes, I use the approximation editor to tesselate the low res geometry. I am amazed at how quickly and easily this fixes the faceting!
I decide on this camera angle as it not only shows the grapes off nicely, but also all my hard work UV mapping and texturing the wooden basket and the grapes branch.
As I said before, I needed to find a workaround for DOF as the bokeh lens shader has been unmanageable for render times.
I resort back to my class notes on rendering a camera depth pass. The formats and naming conventions and framebuffers confuse me a bit and it takes me a while to figure out that I must use batch render but eventually I get a nice Z-depth mask I can use in photoshop-

In photoshop, I duplicate the RGB layer and load the camera depth alpha as a layer mask, then using the lens blur feature I tell it to use the layer mask and use the blur focus distance to keep the foreground sharp and just throw the background out of focus.
For a ‘cheap’ method, it works OK but I do find that you have to keep the blur radius pretty low or you tend to get some weird edges. I keep it very minimal but just want to avoid that classic CGI look of have infinite sharpness. Having tiny noise setting of 1 is just enough to prevent excess banding.
This DOF does not look anywhere near as good as my first render using bokeh but 10 hour render times are not my thing 🙂

Alternate lighting scenario

Final_MoonlightPlusDownlightFinal Moonlight with downlight

I pushed my daylight scenario pretty far but I wanted to have a go at more of a nighttime lighting solution. Here is a screenshot of my lights labeled so that I can describe their function-
Light A – is the same sun and sky system as the daylight but with the direction at much more acute angle, the colour turning quite blue.
Lights B and C – spotlights mimicking warm under-cabinet lighting. Colour set set to yellow/orange, placed close to the wall. Cone angle and penumbra tuning to show visible soft edges.
Light D – caustic photon caster
Light E – large cone, low intensity spot light-linked just to the benchtop to fill and reduce the dark shadows cast by the basket. I also linked the pear as it was looking a bit dark in the low specular areas. Here is a before and after render of this fix –

Light F and G – blueish coloured ‘moonlight through window’ fills – mapped with same blind shapes gobos as used in the daylight renders.

For this lighting setup, I found that I also had to change some of the shaders slightly. For instance, I strongly reduced the bump on the benchtop because with closer direct lighting it was too artificially bumpy and catching hot spots.
As with my hero grapes render, I rendered a camera depth channel and applied a lens blur in post through the mask –

Custom Shading Attributes

With the information gathered by studying the real world surface properties of 3 materials, I set about creating mia_x shaders to mimic the real objects.

Surface 1/ brushed metal (coffee tamper) –
I chose this material because of the distinct characteristics of how it reacts to light. The very shallow grooves created during the brushing process gives it highlights that stretch out in a direction perpendicular to the brushing direction.
I get some helpful tips on brushed metal creation from the architectural-library document on mental ray.
I build a basic poly model for the shape, set up a basic scene with a key light and a fill light, I give the key light a slightly warm temp and the fill light a slightly cool temp so that I will get some subtle variation across the surface-
I also needed to give some thought to the UV layout of the poly model. There is a change of direction in the brushing angle from the cylindrical plane to the end caps so this how I set up my UVs –
I create an mia_x shader and load the ‘satined metal’ presets. I figure that will be the closest starting point. This screen shot shows the deviations I then made from the preset-
Diffuse – I reduce the diffuse weight – most of the colour in this material comes from reflections.
Reflection – In photoshop, I make a simple texture map for the reflection colour by motion blurring a noise channel in the horizontal direction-
• for the final render, I up the glossy samples to 128 to smooth any noise apparent from the lowish gloss value
• I use the rotation value in the anisotropy tab to get the highlights in the desired direction.
• I render using final gather with accuracy 50
Final render –

Surface 2/ plastic Cap – I decide for the sake of having a broad range of difference, my 3 surfaces should be one metal, one glass and one plastic.
Looking around for an interesting plastic, I noticed the translucent effect that light was having on the cap for a laundry spray.
To mimic this, I modelled a cap. I knew that to create this effect, I would need to model the interior surface, since that is what would be blocking the light. Another key to achieving the effect would be a back-light so I decided to have one ‘front light’ just behind the camera and another spot behind the object to capture the translucence
I create an mia_x shader and load the ‘glossy plastic’ presets. I figure that will be the closest starting point. This screen shot shows the deviations I then made from the preset-
Diffuse – the diffuse weight seemed to work better for me at .8 for tying in with the translucency.
Reflection – I placed some simple poly planes with basic white lambert shaders on them just behind the camera to have something to reflect. There is no way to tell how glossy something is without anything to reflect.
White for reflection colour seemed to work and I dropped reflectivity to .4 and glossiness to .7 so that the surface was not too mirror-like.
Refraction/translucency – I discovered that the refraction and translucency tabs were the key to getting this material right. Research had told me that plastic had an IOR of around 1.5. Since I don’t want any transparency, I set the translucency weight to 1. This tells the shader to use all of the transparency for translucence. Using a warm red as the translucence colour seems to work- helping the material to get slightly warmer as light enters it and it ‘offsets’ the coolness of the pink diffuse colour. Using IPR to update a small section, I make subtle changes the transparency until a value of .17 seems to give me just the right amount of light entering the surface and see the shadowing of the shapes inside. I also discover that reducing the glossiness of refractions gives the illusion of light scattering and breaking up the silhouette shape. I up the gloss samples to 32 to clean this up a bit.
Using final gather at accuracy 50 again seems to be a good balance between render time and quality. Here is the final render

Surface 3/ Glass honey Container – after experimenting in a class lecture with the mental ray suggested method for modelling refracted surfaces in three parts, I wanted to experiment more with this. So I started looking around for something suitable. I was interested in this container of honey-
but I thought a thicker glass container would be more interesting so I found this which I think will be perfect to try to mimic-
So the first step is modelling the surfaces. I follow the section on ‘index of refraction interfaces’ in the mental ray ‘architectural surfaces’ document and create the 3 interfaces-
Air-glass surface – normals pointing outward
Air-liquid surface – normals pointing up –
Glass-liquid surface – normals pointing inward –
I decide that my staging for this will involve
• a front light to capture the detail in the glass with some nice catchlights.
• a back-light/rim-light to show off the translucence of the honey and refractive properties.
• maybe some secondary lighting using an HDRI image based lighting solution.
• some placed reflector cards if nessesary to give the glass some more pleasing highlights.
My initial setup looks like this from the top view –
I set up 3 separate mia_x shaders for the 3 surfaces as per the instruction in the mental ray tips. I base the initial settings on the physical glass preset – here is a screen shot of the final shaders settings with what I found to be the key attributes circled –
Index of refraction settings – based on my research, I decide to go with 1.48 for the honey and 1.5 for the glass so these were my calculations for the IOR settings for the 3 shaders-
 Air-Glass interface (IOR = 1.5/1.0 = 1.5)
 Air-Liquid interface (IOR = 1.48/1.0 = 1.48)
 Glass-Liquid interface (IOR=1.48/1.5=0.986)
The other setting that proved to make vast differences was the max distance setting in the advanced refraction for the glass/liquid interface. Adjusting this value made sweeping changes to the overall look so I would need to get this right. Anyway, here is the first test render using the 2 lights
Its pretty clear that I need to start adding some ‘environment’ for this to work so I add an IBL The image is a 32 bit ‘faked’ studio lighting exr.
A few more tweaks, here is the second test render using the IBL-
This is alot more realistic, so now if I combine the two, I should get the nice environment lighting of the IBL, combined with the back-lighting and specular highlights from the 2 lights –
pretty happy with how this looks now, but I made a few more tweaks
• upped the sampling settings to 0 and 2.
• created some tiny spheres and used a simple yellow blinn shader on them to mimic some bubbles.
• positioned a couple more ‘reflector cards‘ to create some more shapes on the glass.
• changed from test resolution to full resolution
and here is the final render

Real world surface properties

The purpose of this exercise is to observe the properties of 3 real work surfaces and make notes for the next step which will be re-creating these surfaces in maya using MIA_X materials.
I choose 3 surfaces that to me had interesting properties to observe –
One is a metal, one is a plastic and another is a combination of glass and liquid.

Surface 1/ Brushed metal (coffee tamper)
Here is reference photo that I snapped of a coffee tamper (used to pack down coffee for use in an espresso machine)

Colour – this material has an neutral diffuse colour and a low amount of diffuse. Almost all of its perceived ‘colour’ it that of its surroundings reflected.
Refraction – there is refraction of light as it is non-transparent.
Specularity – there is a fairly high amount of specularity. Light sources are visible reflected in the surface.
Gloss – this material has a low glossiness. The light sources diffuse and scatter across the surface due to nature of the brushing. This causes a discontinuous highlight that appears stretched in the direction perpendicular to brushed angle.
The brushing direction loops around the revolved section and changes to straight across on the end caps.
transparency – none
translucency – none
Reflectivity – this material has a high reflectivity.
Surface – the surface is generally smooth but has a very shallow perturbance of the surface from the brushing.
Surface 2/ Plastic cap-

Colour – this material has cool pink/magenta hue in its diffuse colour and a high diffuse weight. Reflected light is white in colour.
Refraction – some research led to the discovery that these types of plastic have an index of refraction of about 1.5.
Specularity – this material has a high specularity. Light sources can clearly be seen reflected in the surface.
Gloss – high glossiness, the surface is very smooth and hence reflects light sources very sharply.
Transparency – the object has a no real transparency. Light can pass through into the object but nothing can be clearly seen through it.
Translucency – the material does have some translucency. It is thin walled and light can pass through it. This is best observed when the object is directly back-lit. Where there are other solid objects i.e the metallic dome and plastic nozzle they block the light and the surface appears darker here than the areas which have a clear path for the light to travel through.
Reflectivity – mid-level of reflectivity i.e about half of the light that hits it is bounced back to the eye.
Surface – the surface is very smooth and unperturbed.


Surface 3/ Glass honey container

Colour – the glass has no actual colour, the honey colour is bounced and refracted through the surface.
Refraction –  The glass has an index of refraction of 1.33. Research has led me to believe that honey bends light slightly more, with an IOR of between 1.48 and 1.51 depending on viscosity and water content. There are complex interactions between the different IORs.
Specularity – this material will have a high specularity. Light sources can clearly be seen reflected in the surface.
Gloss – high glossiness, the surface is very smooth and hence reflects light sources very sharply.
Transparency – this material is highly transparency.
Translucency – the glass is totally transparent, but the honey is more translucent diffusing the light as it passes through.
Reflectivity – Generally a high level of reflectivity with slightly less reflectivity when seen at a direct angle as opposed from the side observing fresnels law.
Surface – the surface is very smooth and unperturbed.

Overview of Mental Ray

Mental ray is a rendering software which combines physically accurate light simulation, with full programmability for use in feature animation, motion pictures, visual effects, CAD, digital content creation and more.

The software was first developed by the Berlin based company Mental Images and was first commercially released in 1989. In 2007, Mental Images was purchased by NVIDIA who own the company today.
Mental ray is available as a standalone product and is also integrated into a number of 3D creation applications including Autodesk Maya. The most current version of is 3.10. (NVIDIA, about)

Here is a summary of the most impressive features –

ray tracing for automatic, accurate simulation of reflections, refractions, shadows, and complex illumination
• Indirect lighting solutions such physical sun and sky and image based lighting
• physically correct simulation of global illumination
photon mapping, simulating all possible light paths
final gathering for efficient and easy to use computation of one or more diffuse indirect light bounces
• computation of reflected or refracted light caustics using dedicated photon maps
• an advanced anti-aliasing system
• full motion blur – including reflections, refractions, light sources, shadows, global illumination, and caustics
depth of field via lens shaders
multipass rendering for compositing of layers including motion and depth output
• Programmable shaders including subsurface scattering and metallic car paint
• advanced ray traced shadows with transparency, colour and variable softness
• support for more than 30 texture image formats
• hierarchical subdivision surfaces support
• precise sub-pixel displacement mapping
multi-threading parallelism for multi-processor machines and network rendering
memory caching for very complex scenes
(NVIDIA, features)
Mental ray enjoys its most passionate support amongst the visual effects community with several user groups committed to supporting its usage, including the ‘Los Angeles mental ray user group’ or LAMRUG who’s mission statement is to “maximize the resources and quality of support in the community, in order to nurture skilled, technically savvy and committed new artists.” (Gawboy 2012)

Barton Gawboy 2012, LAMRUG, about us, accessed 01 April 2013 <;
NVIDIA ARC, about mental ray, NVIDIA, accessed 01 April 2013, <;
NVIDIA ARC, mental ray features, accessed 01 April 2013, <;