A mon avis, celui-la vous l’attendez depuis longtemps! Le Vray Lens Effect fait parti des sujets à traiter impérativement depuis la sortie de V-ray 2.0. C’est donc Alfa Smyrna, plus connu sous le pseudo Pixela, qui nous propose un tuto complet sur son utilisation.
Ce tuto est publié en anglais, vous pouvez utiliser la fonction traduire du blog ->
Histoire de quand même vous présenter un peu Alfa avant d’attaquer, sachez qu’elle a déjà fait une apparition sur ce blog à l’occasion du tuto sur l’utilisation du Clamp Output et depuis cette première discussion, nous continuons de résoudre ensemble ces petites galères techniques et graphiques qui font notre quotidien. Niveau boulot, pas grand chose à dire si ce n’est que ses images parlent d’elles mêmes! Je vous invite egalement à lire le sujet “Rosso by Alfa Smyrna” sur le blog ainsi que sur le forum de Ronen Bekerman.
During the last few days, I was playing around with Vray Lens Effects, which is a new feature that arrived with V-ray 2.0.
I prepared this tutorial for my friend Matt Guetta’s blog to share my experiments with this new creative and fun tool. First of all, I must say that V-ray produces very nice results with few seconds and you can play around with parameters to get the effect as you like.
Vray Lens Effects produces glare and bloom effects which are artifacts of real life cameras, when shooting bright objects. In real life photgraphy, bright objects can cause the light passing through the camera get scattered inside the lens and can produce internal reflections. Another thing that can happen is that these objects can change the emulsion of the film to bleed and can cause some bleeds. In V-ray 2.0, the new Lens Effects are introduced to produce these artifacts.
Activate the VrayLensEffects
It is activated from the Environement & Effects menu (which is 8 in keyboard ). On the Effects Rollout, add “Vray Lens Effects” and select “active”.
At this stage, both gloom and flare is disabled. Now we need to make our render. Click “update the scene” button and the render will start.
Applying the VrayLensEffects
When our render is ready, it only takes few seconds to apply the effects and watch the results which is rare in Computer Graphics 🙂 So I must say, it was fun to play around with this tool. Now enable Glare and click “Update Effect”. We will be using this button to see the result when we make a change on any parameters.
As you see, in just a few seconds we can see the effect on our render.
“Update scene” option is to be used only when you make a change in the scene. For all the setting changes in VrayLensEffects window, click the Click “update effect” button.
Mode parameter determines if the bloom will be applied to the RGB image or stored in a separate render element, or both. I selected Image and Render Element parameter as the mode setting. When you choose this, V-ray puts the Lens Effect in a separate Render Element as well as it applies it directly on the image. So When you look at the VFB, you will see 2 new render elements : LensEffectSource, Glare ( and the third one Bloom if you enable this too.)
LensEffectSource is a helper element which V-ray uses to calculate these effects and in Bloom and Glare pass we see our effects as separate passes.
Under parameters of glare, first one is the camera. We can use directly our render camera and necessary parameters such as f-stop and blades will be taken from render camera to calculate the glare. Here in this tutorial I selected “from camera parameters”, which takes camera parameters specified in VrayLensEffects window. By this way, we can assign different values and test different settings. for the f-number and the number of blades. (On this rollout at the bottom.)
Adjust the VrayLensEffects
First let’s change the number of blades in our camera and see the effect.
Click “update effect”:
As you see, we get a very different effect as the blades as this parameter controls the rays in glare. Now change the f-stop. Click “update effect”, Larger values cause a stronger glare.
Bitmap parameter is enabled only if we choose “From image” and the glare is filtered according to this image specified. Here you can specify any aperture image and the effect will be calculated considering this. Here are some aperture images and one example created with one of these images :
You can create these bitmap filters using Filter generator which comes with V-Ray for 3ds Max installation. Weight parameter specifies the strength of the interpolation between the filtered image and the original image.
Size parameter specifies the size of the effect. Now let’s enable bloom and Click “update effect”:
- The weight parameter specifies the strength of the interpolation between the filtered image and the original image
- The size parameter specifies the size of the filter as percentage of the image’s width.
You can adjust settings and each time click “update effect” to see the result on your frame buffer.
Now please notice how the effect changes evidently when we change the number of blades again.
There is also another parameter which you can apply a bitmap as an obstacle image. In real life, there can be dirt or dust on the lens or any type of obstacle you can think of such as filters or anything you can think of. Here is the same image with a bitmap applied as an obstacle image. Notice the big difference between the previous and this one, achieved with the use of an obstacle image.
And here is the final image with some curves and color adjustment.
Glare and Bloom effects are artifacts caused by the lens in real life photography and VrayLensEffects lets you produce these effects and produce very realistic results within few clicks and adjustments.
I hope this tutorial is useful for you.
Cheers for everyone 🙂
Je vous invite à retrouver Alfa Smyrna: