15
Lighting in V-Ray for SketchUp Written by Damien Alomar Thursday, 08 March 2007 This tutorial goes over the different types of lighting within V-Ray for SketchUp. These include Global Illumination, HDR (High Dynamic Range) images, point lights, rectangular lights, and emissive geometry. There are several different options for adding light in VfSU. The simplest is GI or Global Illumination. Then we have the built in lights within V-ray, and lastly we have light emitting geometry. So let’s get on with it. For these tests I am using a model of the new Camaro which I downloaded from here http://sketchup.google.com/3dwarehouse/details? mid=a3da1cce792763fd33898df841c4de85 This tutorial was done without the physical camera. The physical camera is enabled by default, so if you haven't actively disabled it then chances are that it is still enabled. If the physical camera is enabled your results will not match the tutorial. So if you find that allot of your lights are showing up black or not effecting the scene, then please check to see if you have the physical camera enabled. The physical camera can still be used, but in order to get comparable results you will have to greatly increase the multipliers on your lighting. Global Illumination Global Illumination (GI) is by far the easiest way to add light to a scene in vfsu. Basically GI simulates a dome around the scene that emits an even light from all directions. The result is a very soft light that does a great job at providing a good lighting basis for a scene. In order to be able to use GI you must enable Indirect Illumination. If you don’t the side of the car facing the camera will be completely black because it isn’t visible to the Sketch Up Sun. After enabling Indirect bounces in Global Switches disable Default Lights. Now go to the Environment Rollout and enable GI, this is what allows us to set the illumination for our scene. For right now you can keep the GI values where they are.

Lighting in VRay

Embed Size (px)

Citation preview

Page 1: Lighting in VRay

Lighting in V-Ray for SketchUp

Written by Damien Alomar    Thursday, 08 March 2007

This tutorial goes over the different types of lighting within V-Ray for SketchUp.  These include Global Illumination, HDR (High Dynamic Range) images, point lights, rectangular lights, and emissive geometry.

There are several different options for adding light in VfSU.  The simplest is GI or Global Illumination.  Then we have the built in lights within V-ray, and lastly we have light emitting geometry. So let’s get on with it.

For these tests I am using a model of the new Camaro which I downloaded from here http://sketchup.google.com/3dwarehouse/details?mid=a3da1cce792763fd33898df841c4de85

This tutorial was done without the physical camera. The physical camera is enabled by default, so if you haven't actively disabled it then chances are that it is still enabled. If the physical camera is enabled your results will not match the tutorial. So if you find that allot of your lights are showing up black or not effecting the scene, then please check to see if you have the physical camera enabled. The physical camera can still be used, but in order to get comparable results you will have to greatly increase the multipliers on your lighting.

 Global Illumination

Global Illumination (GI) is by far the easiest way to add light to a scene in vfsu. Basically GI simulates a dome around the scene that emits an even light from all directions.  The result is a very soft light that does a great job at providing a good lighting basis for a scene.  In order to be able to use GI you must enable Indirect Illumination.  If you don’t the side of the car facing the camera will be completely black because it isn’t visible to the Sketch Up Sun. After enabling Indirect bounces in Global Switches disable Default Lights.  Now go to the Environment Rollout and enable GI, this is what allows us to set the illumination for our scene.  For right now you can keep the GI values where they are.

Page 2: Lighting in VRay

And here is the result.

Page 3: Lighting in VRay

 

You’ll notice the nice soft shadows at the base of the car, and the nice light coverage on the front grill.  This is because the light is coming from all around the model.  GI is very useful for providing quick tests and visualizations because its easy to set up and can give good feedback on how the geometry will react to light.  In this case this is an exterior scene and the model isn’t blocked from its environment, so this is giving us a very even light.

 Using HDRIs

With VRay we also have the option of using an image to light our scene.  Although we could use any image, the types of images that are best suited for lighting are HDR images, or High Dynamic Range Images.  Basically what this means is that the image actually contains information that is brighter than white, and we can use this information to add lighting to our scene.  I have downloaded this image from here (http://gl.ict.usc.edu/Data/HighResProbes/) (this image is not the actual HDR, but a jpeg)

 

So let’s put this HDR to use.  In the Environment rollout click on the little “m” next to the GI multiplier.  This will bring up the Texture Editor.  On the left next to type there is a drop down list.  From the list select bitmap option and all of the image parameters appear on the right.  Now you can add the map by clicking on the “m” towards the bottom of the window and find the image. In order for any image to be used correctly for either GI or environment backgrounds the must be mapped using the Environment option at the top of the texture editor.  Now we need to specify the mapping, and In this case we know that our image is a spherical image, so we will make sure that the spherical option is selected from the list to the right.   Go ahead and repeat the same process for mapping the background and then go ahead and render.

Page 4: Lighting in VRay

 

 Go ahead and repeat the same process for mapping the background and then go ahead and render.

  

You might notice your image is a bit noisier now, which is due to the sampling on the hdri (the example above was done with higher quality settings which are in the frame stamp).  You can also see how the shadows themselves look a bit sharper, as well as looking as if the lighting is a bit more directional.  This is because the illumination from the image is mostly directly above our scene.  You can tell by the sharper shadows along the side of the car, the elongated shadows in the front of the car, and the shadows underneath the side view mirror.  Below is the same rendering with a jpeg version of the same file, and as you can see the image is darker and the shadows aren’t really as distinct as they were in the rendering with the HDR image.

Page 5: Lighting in VRay

 Adding Lights

V-Ray supports both rectangular lights and omni lights (or point lights).  We are going to go over some of the features the omni light first.  In the V-Ray toolbar the yellow ball icon will add an omni light. 

After clicking the icon simply pick a point in your scene then position the light in your scene.  Omni lights will emit light in every direction, so remember that when your placing in you scene.  Also depending on the size of your scene the omni light may be small or large.  The actual size of the light doesn’t affect anything, but it’s a good idea to have it be a size that doesn’t effect moving, viewing, or creating anything in your scene.  After adding the light you need to edit the light properties.  You can do this by either right-clicking on the light and at the bottom of the menu will be an option for VRay for SketchUp.  From that option select edit light.  You can also do this in the main menu bar by going to Edit > VRay for SketchUp >Edit Light. 

Page 6: Lighting in VRay

 

This will bring up the Light properties box, and there are several key parameters that we must go over.   

 

In the intensity section there are parameters for both color and the multiplier.  Color is fairly self explanatory (the color of the light) and the multiplier will control how brightness the light.  Under the Options section is a

Page 7: Lighting in VRay

little option that says Decay with a drop down box to the right.  This option will control how the intensity of the light changes based on how far away the light is from an object. 

 

The default setting is Linear which basically means that the intensity of the light will not change at all.  This is not a very realistic setting because in the real world lights decay.  The second option is Inverse, which decays the light based on the inverse of the distance value.  The third option is Inverse Square, which decays the light based on the inverse of the distance squared.  Inverse Square is how light decays in the real word, so it is recommended that you use this setting.  You don’t really need to know the math of it, but just be aware that each option, from linear to inverse square, will need a progressively higher multiplier to achieve the same amount of brightness.   Here are some sample images to show different decay.  The only thing changed in each image is the type of decay.

Page 8: Lighting in VRay

 The Sampling section allows you to control how V-Ray samples the light.  Unless you are creating caustics or using other features these settings are best left alone, so we will leave them for another tutorial.  The Shadow section has some other helpful features.  First is the option to enable or disable shadow.  The Radius feature will allow you to control the sharpness of the shadow, or in other words blur the shadow edges. Omni lights by their nature create very sharp shadows, so if you would like to minimize this effect then you would use this feature. 

Be careful as this can increase render times and if you set too large of a value your shadows may disappear.  Subdivisions are a way to control the quality of the shadows.  A lower value will allow the render to be quicker, but may have lower quality. A higher value will have better quality, but will take longer.  Only adjust this value if you are not getting the quality that you would like for your blurry shadows.

 

Page 9: Lighting in VRay

Rectangular Lights

 

Rectangular Lights are the other lights supported by V-Ray and have their own distinctive characteristics. 

 

The intensity of a rectangular light is related to their size. For example, a very small light with an intensity of 10 may have just the right effect, but if the size were tripled or quadrupled then the intensity would be greatly increased even though the multiplier is the same.  Here are two images with the light at two different sizes. 

Page 10: Lighting in VRay

 

Page 11: Lighting in VRay

The size of a rectangular light also has an affect on the shadow quality.  A small light will usually have a sharp shadow (not as sharp as the omni light though) compared to a light which is bigger.  Because the blurriness of the shadows are controlled by the size of the light itself we really only have the ability to turn shadows on and off.  Rectangular lights do have many of the same features as the omni lights with several differences.  The Intensity controls are the same, but under Options we find many more choices.  First we’ll skip down to the No Decay option.  This is similar to the decay options of the omni lights.  However, we only have the option for Linear or Inverse Square decay.  Having No Decay check will make the decay linear, while having it unchecked (the default and recommended value) means that the decay will be Inverse Square.

Double-Sided will allow the light to emit light from both sides, not just the front face. Invisible will make the light invisible to both the camera and any reflections in the scene.  Enabling Ignore Light Normals allows for an even distribution from the front face.  Disabling this feature will force the light to be emitted predominantly in the direction normal to the front face.  The Skylight Portal function causes the light intensity and color to be taken from the environment behind it.  This is mostly used in windows for interior scenes, but its use is not entirely effective or accurate.  Store with Irradiance Map allows for the direct light to be calculated with the Irradiance Map which will speed up calculations. In this mode quality is controlled by the IR settings.  Within the Sampling section we do find one value that was not in the omni light settings.  The subdivisions value will control the number of samples that are taken for the rendering.  The default value of 8 is usually sufficient, but with interior scenes more subdivisions may be required.

 Light Emitting Geometry

In V-Ray it is also possible to have objects emit light, which provides a lot of flexibility in how we can add light to our scene.  Effects like neon signs, glowing objects, and other things are now possibilities by using light in this way.  We will actually create these effects via the material editor, so click on the M in the V-Ray toolbar.  This brings up the material editor, and if we look on the left we have a list of all the materials in the scene.  Right click on Scene Materials then Add Material > Add VRay Material.  This will add a standard V-Ray material which is named Default Material.  Right click on this material to rename it if you like.  Now click on the little plus sign next to the name of the material.  This will open the material layer structure.  As you can see there currently there is only a diffuse layer in our material right now.  To add a light emitting layer, right click on Emissive Layer and click Add New Layer.  Now you will see the Emissive rollout over in the material options. 

Page 12: Lighting in VRay

 

There are 3 simple options within the emissive layer; color, intensity, and transparency.  Color and Intensity work in the same way as regular light do.  The transparency will be useful to allow other layers that are underneath the Emissive Layer (like the Diffuse Layer) to be visible in the material.  Keep in mind that making the material more transparent will decrease the intensity of the light. 

 

Page 13: Lighting in VRay

 

Written by Corey Rubadue    Saturday, 06 January 2007

How to make a perforated metal material in SU.

1.Select the geometry with the SU perfmetal material by using the select object by material (in the SU material editor right click and choose Select from the pop up menu).

2. Now we will create a V-Ray Material. Right click over selected geometry choose SketchUp>Create Material>VRayMtl.

3. In the V-Ray Material Editor a new material is created called DefaultMaterial. Rename the material to perf_metal. Caution: The material moves in alphabetical order in the material workspace after you rename the material. Before editing the material be sure you have the perf_metal material selected.

4.Now we need to edit the V-Ray perf_metal material. Select the perf_metal material in the material workspace. Expand the material tree by right clicking on the plus symbol beside the material name.  Expand the diffuse layer and select Diffuse.

4a. We need to add the grating_round.png to both the Diffuse Color Map and the Diffuse Transparency Map.  Do by  clicking on the  "m" icon.  The V-Ray texture editor will appear.  In the V-Ray texture editor in the Common section set the Type to bitmap.  Now in the Bitmap section choose the "m" icon and navigate to and select the grating_round.png bitmap. The hit Apply to close the V-Ray Texture Editor.

4b. Do the same steps as in 4a for the Diffuse Transparency map.

Intermediate perforated metal material