Lighting in V-Ray for SketchUp
Wednesday, December 26, 2007 12:34:13 PM
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 (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 area.
And here is the result.
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
Tutorial from Asgvis.com