Jul 14

Recently Ryan Lintott and I went to a VRay training seminar by the man himself Vladimir Koylazo (one of the makers of VRay) who went through a number of facets of VRay including a step by step way of breaking down your render settings into logical steps to get the best combination of quality and speed. I thought this was just too gooder process not to share so have decided to put together the following tutorial taking people through these steps he explained so VRay will hopefully become less complicated, and so you can better critique what is happening within your scenes.

The real core of this is every scene is different and has different requirements in terms of detail resolution and Global Illumination. There are many settings posted on the web (I have done a few myself) outlining suitable settings for VRay, and much debate over which setting is best. The truth is it changes from scene to scene and although there are definitely some standards you could stick to (we have reasonably successfully in the past years at Squint Opera) if you really want quality shadow detail while remaining at a quick render time, it makes sense to progress through a more analytical approach where you can critique each step of the way.

Below I will go over the most common set up of using Irradiance Map and Light Cache, which is recommended most of the time, and then baked out. Remember for animation Brute force and Light Cache is recommended, by both Vladimir and Francesco Legrenzi (wrote the very excellent resource “VRay: The Complete Guide”)

So here are the steps:

BASIC APPROACH

In order to break up your scene use the following approach:

Set a standard DMC value > Test Light Cache > Test Irradiance Map > Customise detail level in DMC

The scene I am using was made by a colleague Nic Hamilton for testing purposes and has a combination of direct/ bounce light and broad/ fine detail. It can be downloaded here. It is set up in linear space, but don’t press sRGB in the VRay frame buffer as the gamma 2.2 is already baked in within the colour mapping.

NOTES on WHOLE PROCESS

- This process is resolution dependant. These settings are quite high as it is only a 720 res image. Same visual principles apply to bigger images, but expect your values to reduce somewhat.

- Many of the settings I have used here are quite high as it is a simple scene in terms of materials and lighting. More complex lighting and materials will mean increased render times and you will have to compromise further on these render settings.

- This scene uses linear workflow. You might to visit the link here to set up so it looks like mine (ignore the EXR stuff in that tutorial).

- This might be a little complicated for beginner users; but see how you go!

SET A STANDARD DMC VALUE

Initially set the defaults of DMC as in the image below.

vray_settings_01

The highlighted value links to these 2 under the settings tab where the adaptive amount controls how adaptively the samples will apply over surfaces, i.e. 1 is fully adaptive and will place the samples as wide as it can across large surafces, and 0 will put samples very close to one another and take longer to render. Leave these as they are below:

vray_settings_02

We will come back later and set this using the colour theshold.

TEST LIGHT CACHE

Next set your primary and secondary bounces to light cache and set subdivs etc and interp samples to the following:

vray_settings_03

Where we set the subdivs fairly low, the sample size to fairly big (for this test 720 res image) and most importantly the interp samples to 1, so there is no blurring between the samples and we can explicitly see what is going on.

Hit render and you should get something like this:

vray_settings_04

So what are you looking for? This is the key! See how the samples are quite big? This means they will miss out detail, and light samples will stretch too far across surfaces, and even bleed right through walls (light leaks). So in this instance they are a bit too small. So why, you ask, don’t we set it really small and catch all the detail? Well because of noise. Try setting the sample size to 0.001 and see what it looks like. You can see how this result, even with move subdivs and blurred with the interp samples will create a noisy solution? Try 0.02 and you should get something like this:

vray_settings_05

This is a fairly good size. It’ll cover most shadow detail in a general way, apart from maybe the shadows on the rear wall, but any smaller and we might introduce more noise. Figure out the compromise.

Now let’s up the subdivs. Each time VRay sends out a “ray” from the camera it hits a surface and makes a sphere of the sample size and subdivides that sphere into a number of ray calculations; the more subdivisions the better quality the solution as it is calculating more samples. See it as also checking out it’s neighbours colouring and then using that to colour itself.

Up the subdivs in 500 increments up to 2000 and see what you get. See the difference in smoothing of the samples colours and the corresponding render times going up? Again pick where you think is good, but 2000 is pretty OK so far.

Now try changing the light cache from “screen” to “world” and change the sample size to 0.2m (keeping 200 subdivs). You should get the following result:

vray_settings_08

See how I am now getting more samples on the back wall, as it is now dividing up the samples into 0.2 metre samples. For this scene this might be a better solution as I don’t have much in the background, it’s an interior scene, and it also might bring out some shadow detail in the pool at the back of the image.

Now we have this solution, save it out so we don’t have to calculate it when testing other things and save a huge amount of render time. Do this by hitting “save” and save as say LC:

vray_settings_06

Then change this to

vray_settings_07

Just remember to change it back to single frame if you change any of the light cache settings or move the camera. The only exception to this is the interp samples.

Interp samples essentially blurs this solution. So you can change this after you’ve saved out as above. Change it to about 40, or whatever looks good. Remember this does come at slight cost, the more you blur it the more you lose shadow detail. Again it’s up to you to decide.

NOTES on LIGHT CACHE

- The other thing to consider is the difference between light cache “screen” and “world”. As Vladimir said “world” is good for interior type scenes with little background detail, but is bad for massive exterior scenes as the light cache will try and sample hundreds of objects into say 0.1m (whatever you set the sample size to) in the background. This will give a noisy result and take a long time.

- Number of passes refers to the number of cores you have, and VRay will use this to send individual calculations to. Set it to the maximum number. So if you have 8 cores, then 8, or if you have hyperthreading enabled set this to 16 (like I have done). If you’re using a render farm, set it to their maximum. A simple way to tell is open task manager and click on the performance tab and see how many cpu meters you have (goto view> CPU history> one graph per CPU to see).

TEST IRRADIANCE MAP

Now change the primary to irradiance map and keep the secondary as light cache, still loading the pre-calculated map as above with 40 interp samples.

Also change the irradiance map from a preset of high initially, then to custom, and change the values like the image below. Remember set the interp samples to 1 so we can see what’s happening with the samples:

vray_settings_09

Changing the “max rate” to the same as the “min rate” lets us have a look at where the min rate is putting samples. Do a render and you should get something like this, with a blackened image with obvious white samples across the image:

vray_settings_10

Now down the max and min rates to -4 and see what happens. See how the samples move further apart? You are basically telling the irradiance map to, on areas that it can be fully adaptive, use that spacing as the minimum. Now up the max rate to -1, keeping the min rate at -4 and you should get this:

vray_settings_11

Now what are we looking for? Well now that we’ve put the max rate up, see how it’s putting samples around the areas of detail? (detail is defined by pixel contrast or threshold difference in colours) So what we want to see is it putting samples on areas of shadow/ GI detail that we want. i.e. at the bottom of chair legs, on window surrounds or perhaps grout detail on the floors.

Now try min -3 and max 0. This looks pretty good, as seen below, as I now have a good number of samples around areas I want to see shadow detail, like the bottom of the chairs, grout lines, and the samples in the open areas I’ve brought together to get a nice even spread. Look at the difference between render times as well; still acceptable at 35 seconds.

vray_settings_12

Now let’s look at what happens when we change the value “clr thresh” in the next column of numbers. This stands for colour threshhold, and tells VRay how finely to look for contrasts in colour between pixels. So at 0.1 (show as 1st image below) it will look at extremely fine/ small contrast between colours in pixels and sample up to it’s maximum rate there. You can see this is too fine, as it’s plastered the whole image with samples, and will cost us a lot of time in rendering and cause noise.

A value of 0.9 is the 2nd image. At the opposite end of the scale it is looking for high contrast of colours in pixels to put it’s samples, and is not very sensitive. You can see how it picks out major details, but detail is lost in the areas between details, or there is not very good blending between fine and course details in shadows.

vray_settings_13 vray_settings_14

Let’s stick with a value of 0.3 (default), as this is usually a good compromise, and seems to be putting the samples where we want them. Leave “nrm thresh” and “dist thresh” alone. Vladimir admitted these are kind of unnecessary levels of control.

Now turn “show samples” off, and change the “HSph subdivs” to 20. This stands for hemispherical subdivisions, and relates to (again) the rays sent out by the camera hitting and then subdividing into a number of rays off a surface. The higher the number the more rays are sent out and the higher quality the sample. So this is to do with the quality of the irradiance sample.  Hit render and we get something like this:

vray_settings_15

Now try 50:

vray_settings_16

Now try 100:

vray_settings_17

What are we looking for? Well render time vs noise. The 1st was 20 secs, 2nd 30 secs and 3rd 75 secs. The 1st will probably cause a noisy result, even if we blur (interp amount) it, so clearly this is unsuitable. At 50 the samples look like a fairly even spread of colour and there are a few blothes, but these will probably even out. 100 isn’t massively better than 50, and comes with a huge cost in render time, so somewhere around 50 looks likely.

Compromises again! You decide on render time vs quality; but now you know what to look for and how to change it.

Now save out like you did with the light cache, but name it IR:

vray_settings_06

vray_settings_07

Then change the interp samples to 20 (default). More will cost you in render time, and like light cache will blur the solution more and more and might lose you some shadow detail.

So this is our final image. It’s got good shadow/ GI detail around the chair legs on the floor and good depth throughout. Perhaps the only thing that is noticeable is the noise from the sun on the back wall. This is to do with the light quality though (and related to size multiplier) and we can get rid of this by increasing the subdivs on the sun to 16. Give it a go.

vray_settings_19

Now we have a solution to our GI.

NOTES on IRRADIANCE MAP

- This will probably be quite a high quality result (slow to render possibly for drafts), so these would be our production settings. But now we can go back to the adaptive DMC and use the colour threshold to control our quality and render time overall in the next step.

- You can use this method in animation by incrementally saving the irradiance map and light cache to files every, say 10 frames, rather than sending out single passes (use “fly-through” for light cache and “multi-frame incremental” for irradiance map). This will eliminate flicker and save you massive amounts of render time. As long as nothing moves within the scene this is the best way.

Customise detail level in DMC

The last part of this tutorial is how to set detail levels in terms of antialiasing, and use the DMC colour threshold as a global slider for quality.

If you click back into your Adaptive DMC settings you locked it using the DMC sampler. Now you could keep this as is and adjust the noise and adaptive amount in the settings tab, but you can essentially do a similiar job with the colour threshold:

vray_settings_01

So start by unticking the box above and change the “Clr thresh” to 0.1.

Also go into your render elements and add the following VRaySampleRate so you can see what is happening with the samples while also looking at your image:

vray_settings_20

Now in the VRay frame buffer you can view either the RGB image (beauty pass) or the Sample rate by changing this. We’ll be clicking backwards and forwards in this to see the relation between the samples and the quality of the image:

vray_settings_21

So now hit render using the settings above and you should get something that looks like this:

vray_settings_22
vray_settings_23

What you’re seeing in the VRaySampleRate is where it is putting samples to do the antialiasing. The lighter the blue the more samples it is putting in place. You can see this is super quick to render, so great for telling what is happening in the image overall for a draft, but we need to up the quality.

Now try a value of 0.01 in the colour threshold:

vray_settings_24

You can see there are more samples now, and the image is fairly clean. This is pretty much the default values we had before. But to get more detail in the foreground chairs we might need more samples. Put the max subdivs up to 6 and see what happens. We get something like this:

vray_settings_25

So if we keep on turning this max subdivs up then you’ll find it won’t make much of a difference to the samples. This is because the colour threshold is capping it off at a certain value. It will get to a certain quality and decide “that’s good enough” and within the colour contrast threshold between pixels.

Change the colour threshold to 0.001 and you’ll get a result like below. We can see that now it is picking up detail across the flat surfaces, and if we had a high resolution and more complex materials you would find this would make a huge difference to render times, but it would be able to pick out this type of super fine detail. So in theory we could run the max subdivs pretty high and just use this colour threshold as like a global slider of quality that slides between the min and max values.

vray_settings_26

This comes with a WARNING though! These are VERY sensitive values. Look extremely carefully at the visible quality vs render time. If the max rate is too high it might spend too long on some extremely fine details that you’ll never see. Run this as low as you can, and then you can run your colour threshold at a lower (high quality) setting. Open up these renders and have a look at the render times. The difference between the 2 above is 12 and 46 secs! And that is with little, or no visible difference, so be sensible and er on the side of speed otherwise you’ll be waiting forever for renders.

I found with this scene that 6 for the max subdivs and 0.008 for the colour threshold was about right. All compromises considered.

Apr 09

As well as the original movie that we were all wowed by (found here http://vimeo.com/7809605 or here http://www.jamesshaw.co.nz/blog/?p=285 with teasers), by Jorge Seva, aka Alex Roman I found some of the making off which have some interesting shot breakdowns including compositing below and the 2nd, more interestingly, the original sourcing, modeling, texturing, lighting and finals etc on his Kahn’s Exeter short film.

Very interesting stuff. I love the comments online that he must be doing something amazing technically, and am pleased to see he likes to keep things simple. So less about the technicality of it all and more on the artistry. The approach of visualization as a photographer is one I can relate to, but one that is all to often forgotten in archviz work.

Compositing Breakdown (T&S) from Alex Roman on Vimeo.

Exeter Shot — Making Of from Alex Roman on Vimeo.

Granted this is an existing building he visualizes so easier to identify compositions that work, as these are the ones that have already been photographed by professional photographers. Often it is hard given a sketch by architects to visualize where the good compositions might lie.

We have some great debates at work whether this type of work is creative given it is an existing space and it is a facsimile of what already exists, or whether creativity lies in visualizing the non-built to this level. Is it a technical exercise in bringing archviz work in line with photography? Many architectural colleagues I have shown it to fail to see the point with the comment “why wouldn’t you just go there and photograph it?”, which is a good point. The technical brilliance is lost on them.

To this end there is a really interesting aspect of CG work evolving that we will see juxtaposed over the coming years (although has run through many creative industries over many centuries). Creativity and technical brilliance working hand in hand, and splitting of some awards in this manner (Avatar and 2012 spring to mind; dubious stories, but awarded technical marvels). I’m going to sit on the fence on this one as I can see valid points for either side. Needless to say I find Alex Roman’s work inspiring on a number of fronts, which is surely a part of artistry in itself?

Apr 09

Great little clip with, I assume, After Effects motion graphics over the top. Lovely idea!

“This video was created for the Earth Day. A ode to the work of Jacques Languirand. The video will take part of the Globo Logos event that will take place in differents festivals all around the world.”

Globo Logos from Julien Vallée on Vimeo.

Mar 24

This is quite a good rundown of how 3D is done… for dummies. I would love to show this to many of our clients! So funny!

Originally sourced from www.cgchannel.com/2010/03/what-you-dont-understand-about-3d/

Nov 02

This post originally sourced from our website; www.squintopera.com/blog/?p=363

The recently completed Green Lighthouse, the first public CO2 neutral building in Denmark, will be showcased at the forthcoming UN Climate Conference (COP15) being held in Copenhagen in December. Our film, commissioned by Velux, will be played to demonstrate the building’s excellent intelligent and sustainable design.

Or view here www.jamesshaw.co.nz/#/content/Film/Velux.flv

Sep 25

Here are a few pictures that Andrew put on the blog (www.squintopera.com/blog/?p=302) from the making of the Moon project. We took the footage in an adjoining warehouse space using bags of concrete as moon dust and a hired space suit that Andrew wore for the shoot.

Andrew taking his first steps.

Green screen.

Andrew fidling with the camera and showing the green screen visor that was later comped out by tracking and replaced with a CG reflection.

Ollie our director (wearing mask) taking Andrew through his first steps.

Final Comp.

Comping in the moon lander with live action.

Close up showing comped in visor reflection, tracked and added in Shake.

Live action with comped in 3D elements surrounding and in reflections. Modelled in 3DS Max by my workmate Nic Hamilton.

View the final movie here: www.squintopera.com/#/projects/?id=121

Sep 14

Autodesk in their infinite wisdom have changed the “select by name” dialog box to a “new and improved” version that is incredibly frustrating to use.

If you want to change this back to the original select by name dialog box then follow the following steps:

  1. Turn off hide hidden files in windows explorer (tools> folder options> view> show hidden folders)
  2. Go here:
    C:\Documents and Settings\yourusername\Local Settings\Application Data\Autodesk\3dsmax\2009 – 64bit\enu\defaults\MAX\CurrentDefaults.ini
    and change:
    [Scene Explorer]
    SelectByNameUsesSceneExplorer=1

    to
    [Scene Explorer]
    SelectByNameUsesSceneExplorer=0

And now you should have the standard selection dialog box like before! Enjoy.

Sep 07

Here is a tutorial on how to make grass within Max, based of Peter Guthrie’s excellent example (www.peterguthrie.net/blog/2009/03/vray-grass-tutorial-part-1/), but taking it a little further and applying this idea in bulk with Max’s built in tools.

The basic work flow is to model a very simple grass blade, make a cluster of grass and scatter across any object. Here is a example we (www.squintopera.com)used this technique in to give you an idea of the finished effect; www.jamesshaw.co.nz/#/content/Film/Cairo.flv/

Here is a couple of base CG beauty passes to give you an idea of the raw result before any post work has been done on it;

shot080 shot110


MAKING GRASS STRANDS

As previously mentioned this is based off Peter Guthrie’s tutorial with a few variations or notes to expand on this idea.

Firstly make a plane with 1 segment across and several in the length direction. Then add a length-ways UVW mapping, taper and using an edit mesh above this with soft select on vertex warp to a shape you like or several variations you can make into a group.

grass_01


MATERIALS

Collapse the stack into an edit mesh. Then rotate the 4 strands into different directions by selecting and rotating the different elements. Then randomly set 4 id’s for them. This is so you can subtly change the colour with a colour correction within you multi-sub material.

grass_02

Then make a multi-sub object material with 4 vray materials.

grass_03

And within each multi sub make a VRay2SidedMtl like the following. You can also use the following grass textures by clicking on them and right click and save image. There’s a black and white one that you can use as an option for the translucency channel. But you can just leave this blank if the grass is at a distance and leave it grey.

The VRay2SidedMtl really is one of the most important things to use to get the light illuminating through the blades. Otherwise your grass will tend to look very flat.

grass_04 grass_blade grass_blade_opacity

Inside this VRay2SidedMtl sits a pretty simple vray material with the above grass blade in the diffuse channel (thank you Peter Guthrie for originally making this), with reflect set to white and Fresnel checked so it doesn’t look like chrome. Then adjust the Hilight glossiness to 0.6 which will help to spread the specular light you get off the grass. Again this is another very important part to make the grass look convincing. And unlike Refl. glossiness it will not be costly in render time and look almost identical, especially at typical grass distance.

grass_05

To get variation in the grass tone change the bitmap diffuse channel to “Colour Correction” with the grass blade jpeg as the map, then shift the hue and saturation as follows differently for each of the 4 material id’s.

grass_colour_correct


MAKING AN AREA OF GRASS

Now you have your clump of grass you can use this to populate surface. I found using individual strands was difficult, as the scatter we will use only really does up to around 70,000 instances before becoming a bit unstable. So if you use a clump of grass then you can spread further with less. Other options of scattering grass include pFlow and vray scatter; which I’ll go over later.

So now make a plane or use splines to create a free form extruded shape, or even detach a polygon from a surface to make a start. Remember when you extrude though to extrude 0 amount and only cap one end otherwise the grass will go underground as well. Also watch with way your normals go.

To make a scatter object of grass do the following:

  • Make a compound object (on the create tab) with the grass selected and choose scatter.
  • Then pick the plane as the distribution object.
  • Change the duplicates to 1000
  • Distribute using area
  • Change rotation to 360 in the Z to mix up the direction. You can just limit this to 180 or 90 to simulate wind in a particular direction depending on the way your grass clump faces.
  • Change scaling to 25% for all XYZ to give some variation
  • Show Mesh with 100% to see exactly what will render, and when happy with the result change this to 10% and proxy to speed up your viewport.

Now you have a grass patch. The following is an example of how you can change the grass size on the sub-object scale and even add other simple plane flowers etc to add detail (click on it to enlarge). You can even mix grasses and flowers by using the same distribution object. Simple and no money spent… apart from Max of course.

grass_varieties


ALTERNATIVES TO SCATTER

There are other ways of distributing grass. Peter Guthrie mentions the excellent VRay Scatter (www.rendering.ru/index.php/plugins/vrayscatter/), which has the advantage of varying colours more randomly then a multi-sub will do, and also varies the scale by a greyscale bitmap. The scatter method above has no method like this for varying and blending heights. The only problem is it’s a bit buggy (as if Max isn’t!), and it costs.

You could also use PFlow. I’ve had a quick go with this, but haven’t managed to vary the scale by a bitmap yet like VRay Scatter will do, just done density by material.

You will need a group of different grasses and some type of mesh as a distribution object. And obviously create a PF source and click on Particle View to get the following image.

Here’s how you might do this…

grass_pflow

  • Birth 3000
  • Add a Position object, and add distribution object and you can use a greyscale image on a standard material to drive the density of the plants. You will have to view this standard material in a shaded viewport then activate. Weird I know.
  • Rotation random horizontal, divergence at 180 and tick restrict diverg. to axis Z (1.0)
  • Add Shape Instance and pick the group and tick “group members”. Scale variation 50%, and if animated tick animated shape and offset the timing by random 7 frames or whatever suits your animation.

Hope that may help someone out there! Enjoy.

Sep 01

ARTIFICIAL PARADISE, Inc from Jp Frenay on Vimeo.

Pretty slick piece of animation this. I always love the ambient occlusion style renders, there’s just something purely 3D about them; such a great descriptor of form. To be harsh it is a little matrix like and the font my workmates insist is looking a little dated. The storyline resolution is a little lacking as well, almost trailer like in it’s “there’s more” message at the end. But hey it’s pretty nice none the less!

Especially like the end sequence with the introduction of colour bleeding through as a collection of memories. Nice subtle gradients of colour in this when the “machine” is introduced back. Be great to make some time to work on something like this.

Here’s more info…

Artificial Paradise, Inc is an experimental film anticipating a future where a major corporation has developed an unique software, based on organic virtual reality, which holds all the lost memories of humankind. A user connects to this database of the forgotten…what is he searching for?

Selected at the ONEDOTZERO festival in the WOW+FLUTTER 09 category onedotzero.com/programme.php?id=373&event=31216

Selected for the Autodesk 2009 Siggraph Show Reel
youtube.com/watch?v=Gj5tLOMxLOU&feature=player_embedded :

Production : Condor
Director / editor / compositing : Jean-Paul Frenay
Main 3D artist / compositing : Sandro Paoli
3D artists : Sylvain Jorget and Sébastien Desmet
Additional 3D operators : Otto Heinen and Okke Voerman
Sound Design : Seal Phüric feat. Neptunian8

Jul 28

Kahn’s Exeter Short Film from Alex Roman on Vimeo.

A great little video that Alex Roman put together. I have seen the stills before, but seeing it as a moving image is great. I’ve been an admirer of his work for a while now; great use of high res materials and lighting within scenes.

We’ve been discussing whether this is possible with a client led project, as often these types of beautiful renders are compromised by relentless client changes and clients wanting to show every detail possible in every shot of the film. It would be nice to work on a project where detail, atmosphere and experience are key rather than explaining an architectural project like the documentation process does.

Below are some teasers Alex did beforehand. Some extremely nice stuff. Enjoy:

T&S Teaser 3 from Alex Roman on Vimeo.

T&S Teaser2 from Alex Roman on Vimeo.

T&S Teaser 1 from Alex Roman on Vimeo.