Hi guys! After finishing the previous five lessons for modeling and texturing the futuristic weapon, we'll start the six and final chapter which covers the lighting and compositing of the model. So let’s get started!
Additional Files/ Plugins:
Open Maya and open the last saved file from the previous part of the tutorial.
Now click on the ‘Texture Visibility’ option (marked by red rectangle.) It gives us the facility to see the applied texture on the model in the viewport.
Go to Window > Setting / Preference > Plug-in Manager to call the Mental Ray plug-in.
Open the render settings tab in Maya to change the renderer from ‘Software Renderer’ to ‘Mental Ray Renderer’. Go to Window >Rendering Editors > Render Settings.
Change the renderer to Mental Ray.
Now let’s move to the basic lighting setup. We will try to make our best render using only a fundamental, basic lighting setup. Before creating the light setup, we have to choose a good camera angle.
It’s better to use ‘Bookmarks’ here. The best thing about Bookmarks is that we get our pre-defined camera angle back even after scrolling or changing the angle in the perspective view. Bookmarks can call back the last view and camera angle again, which you have already considered. Now let’s set the Perspective view. I like this view so I choose this Perspective view as my preferred render view.
Now go to View > Bookmarks > Edit Bookmarks.
In the Bookmark Editor, I give it the name ‘render_view’.
Now hit ENTER , and you will see the name ‘render_view’ is added into the Bookmarks list.
Now we have to start lighting. So first we'll create some basic lights. Go to Create > Lights > Spot Light.
The position of the light will take place automatically in it's default position, the grid.
Select the light and change it's translation and rotation values as you see in the figure below. Though it totally depends upon you, how and where you want to put the light. In my case I have chosen these values.
After adding the values, you will see the position of the light has changed to something like this.
Press CTRL+A to open the Attribute Editor. Let’s play with the values of the light’s intensity, cone angle, penumbra angle and drop off.
Also change the Shadow Attributes. So turn on the Use Depth Map Shadow option. Change the Resolution to 1024 (Higher is better) and change the Filter Size value too.
Now render the scene to check see what it looks like!
It seems that we need a Fill light. So let’s create another spot light in the scene.
Set the position of the second light (spotLight2) opposite to the primary light (spotLight1.)
Set the spotLightShape2 attributes. We have to change its Intensity, Cone angle, Penumbra angle and Drop off values.
Set the shadow attributes too, just like we did in the previous step for the Key light.
Now hit the Render option and check the rendered image. This time the rendered image looks quite a bit better. However we need to tweak the lighting options and parameters more to make it look much better.
Now we need to add a Back light to illuminate the remaining parts of the gun. So create another Spot light (SpotLightShape3.)
Now change the light position. This light helps to illuminate the gun from the back.
Now render the scene once again to check the quality. It looks something like shown in the image below.
For spotLightShape3, change its Intensity, Cone Angle, Penumbra Angle too. Just like we did with other lights.
Also change it's Shadow Attributes. Just like before, change the values of Resolution and Filter Size.
Also change it's Shadow Attributes. Just like before, change the values of Resolution and Filter Size.
Go to Window > Rendering Editors > Render Settings. With the Render Settings window opened, click on the tab for Indirect Lighting and check on the Final Gathering option.
When you turn on the Final Gathering option, your rendered image will illuminate more and look more real. But it also increases the rendering time. Right now the value of the FG attribute is set to default and we do not need to change it.
Image Based Lighting:- In an Image Based Lighting system, we use an HDR image for a more effective lighting experience. With the help of HDRI, we do not need as much light because the HDRI itself generates enough illumination to be projected onto the model, and hence it becomes much more real looking.
For image based lighting you need a good HDRI, something like an environment. A sunset or sunrise HDRI will be quite good. You can download such HDR images from the internet as there are several websites which give away these HDR images as freebies. www.hdrmill.com is such a website where you can download several high quality HDR images, free of cost.
In Image Based Lighting, we will use the HDRI as a dome which will cover our scene and act as the environment, the dome will act as the source of environmental light. Go to Render Settings > Indirect Lighting > Image based lighting and click on the Create option for Image Based Lighting.
Clicking on Create option opens an Attribute Editor (mentalrayiblshape1.)
Now browse to the HDRI. Any kind of HDRI will do here, but I prefer to use something like a sunset or sunrise type HDR image.
The browser opens and there you can select the HDR image saved on your local hard disk. I am using an HDRI here which I use quite often in my projects. Though you can choose your own HDRI.
After selecting the HDRI, you will see an image dome which will look like a transparent circle. That is the HDR image which creates such an environment or a dome . And this dome helps you in lighting and defines the mood of the lighting as well.
Now your background view port will look like this (with an HDRI environment.)
Now expand the Render Stats rollout, and turn off the Primary Visibility. This means the dome image will not be visible at render time.
And now render the image to check and see how it looks. It certainly looks much better than before having greater details with the lighting.
The render is looking nice. However there are some points to rectify, as there is to much reflection on the model. So select the gun mesh.
Then Right-Click and select Material Attributes.
Reduce the ‘Reflectivity’ value to 0.100.
Also I noticed that the ‘Specularity’ is a bit flat . We need a sharp Specular level. So let’s change the Eccentricity value and increase the Specular Roll Off value (as shown.)
Now render the scene once again and check whether everything is looking fine or not. In my case it looks fine, but let’s see how to make it more attractive.
Right now the gun polygons are not smooth, so we need to smooth the entire gun mesh. Earlier I didn't do it, because then I wanted to be able to render the gun scene fast. But now the time has come to smooth the mesh. So go to Window > Outliner.
After opening the outliner tab, select group11. Actually, group 11 contains all the mesh parts, I didn’t really give it a proper name while making the tutorial. But when you open the project file (which has been provided with this tutorial,) you will know it clearly.
Deselect ploysurface61 and ploysurface62. These are the two polysurfaces we don’t want to be smoothed.
Now press 3 on the keyboard, and you'll see that the gun faces are now smooth. Hit the Render button and as you can see, the render looks much better and smoother.
Now let’s create an Ambient Occlusion pass. To prepare an ambient occlusion pass, we need to follow a few steps. First we'll create a new render layer. So open the Outliner and again, select group 11 (which includes all the mesh parts.)
Now go to the Channel Box/ Layer Editor, and then to the Render Layer editor. You'll see a master Layer here. This is the main layer where we are currently working with the light setup and everything.
Now make sure that group 11 is selected, and click on the option marked in the figure with a red frame. This is the Create a new layer and assign selected objects option.
When you click that option, you'll find a new layer has been added. But this layer only contains the gun mesh (group 11), not the rest of the parts.
You can see the difference when I select layer1 (normal).
With layer1 (normal) selected, Right-Click and select Attributes.
After clicking on attributes, the Attribute Editor enables the layer attributes, which helps you render things individually. Now click the Presets option.
And now select the Occlusion option. This means that Occlusion is now enabled to be rendered as a separate pass.
And now the surfaceshader2 attribute is opened. This shader is automatically assigned to the gun.
Here you can see the Out Color browser tab is locked.
When you click there, the mib_amb_occlusion shader option is enabled.
Higher samples will give you less noise in the render, but will increase render time. So set it according to your wishes.
Now your AO (ambient occlusion) pass is ready. Turn off the Final Gathering option (here we do not need any light and will not use any.) Hit Render and wait for the AO pass to finish. It should render in a couple of seconds/minutes. An AO pass helps in adding depth and detail to the model. Finally Save the AO pass image in .PNG format.
After rendering the AO pass, we need to render the main Beauty Pass (Diffuse Pass). Select again the masterLayer(normal), and turn Final Gathering On again. Hit render and save the rendered image in .PNG format as well.
Now Save the file and close Maya. And open any compositing software you like. I'm going to use Photoshop here (but you can also work in After Effects too.) Open Photoshop and import both PNG images.
Bring both of the images into a new document. Here Layer 0 is the Beauty/Diffuse Pass and the Layer 1 is the AO Pass.
Change the Blending option of Layer 1 (AO Pass) to Multiply. Also add a Black background beneath all the layers.
Make a copy of Layer 2 and place it under Layer 0.
With the duplicated layer selected, go to Filter > Render > Clouds. Change the Opacity to 16 and the Layer Blending Mode to Lighter Color.
Now this is the final image after all compositing. You can always play with the settings and options to get a much better or different result.
So here I finished the Futuristic Gun tutorial series. I hope you have enjoyed this!
- Modelling a Luger P08 using Subdivision Surfaces in Maya
- Model a High-Poly RPG Rocket Launcher in 3ds Max
- Next-Gen Weapon Creation
- Model, Texture, and Render the Legendary Katana in Maya
- ‘The Civil War Cannon’ – Tuts+ Content
- Model, UV, and Texture a Mac 10 Sub-Machine Gun – Tuts+ Content
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post