This Cyber Monday Envato Tuts+ courses will be reduced to just $3. Don't miss out.
In the seventh and final part of the next-gen boiler series you'll continue work in Photoshop by creating the Specular map. To speed this process up, the Specular map will be created from the existing Diffuse texture. You'll then move back to Maya where you'll setup and tweak the Xoliul shader for realtime rendering in Maya's viewports.
In this tutorial I'll show you how to create a next-gen, game model of an old weathered Boiler, with the help of only one black & white reference image. The tutorial will cover the entire process from Low poly Modeling to High poly Modeling, UV mapping, Textures baking (i.e Normal and Occlusion maps) and Diffuse Texturing. Finally we'll be applying Xoliul's shader in Maya for realtime rendering of the model.
Additional Files/ Plugins:
So now for the Specular map. First press Ctrl+A to get a complete selection, then press Ctrl+Shift+C to make a copy of every visible layer combined into one single layer and finally press Ctrl+V to paste that image. Then select the layer and press Ctrl+G to make a separate group where we'll do all our edits to make the specular map, and also name this group "Specular".
Now with the Marquee tool (M) select the wall area and create a new "Adjustment Layer" for "Hue/Saturation", and then set the Lightness value to -100, as the concrete will have no shine. The whole point of using "Adjustments Layers" is that these are completely indestructible. Any time you feel like changing anything you've done previously, you'll be able to edit easily, and you can also control the intensity using the opacity and flow of the layer.
Now with Marquee tool (M) select the Brown Metal area and create a new "Adjustment Layer" for "Levels", and then set the Mid value to 0.37 and the End value to 143.
Now with the same selection, create a new "Adjustment Layer" for "Hue/Saturation" and then set the "Hue" to +180 and the "Saturation" to -87. That'll give this surface a grungy light bluish subtle shine, as these rough metal surfaces won't have a very shiny surface and the grunge will give it a very used and weathered feel.
Now make a selection of the Grey metal and fill the mask of the "Levels 1" layer with a white color. Repeat the same steps with the "Hue/Saturation 2" layer, and this surface will also have the same surface results.
Now make a selection of the rest of the areas (Main boiler surface) and create a new "Adjustment Layer" for "Levels". Set the "Mid value" to 0.39 and "End value" to 175 and then while keeping the same selection, create a new "Adjustment Layer" for "Hue/Saturation" and set the "Saturation" to -36, to give this surface a light greenish specular color, but not too bright.
And here are some viewport grabs with a high quality renderer. There's a simple Blinn shader assigned with the specular map loaded into the "Specular color" attribute.
A few more screen shots from some other angles to get a fair idea of how the Specular shinnyness affects the surface angles.
And here is a final close up of the small parts.
Now we'll use the Xoliul Shader for real-time rendering in the viewport itself. So for that go to http://www.laurenscorijn.com, or simply do a Google search for "xoliul shader" and download version 1.6 of the Xoliul shader it from there.
Now from the Plug-in Manager, set the "hlslshader.mll" to both Loaded and Auto load. As this is the shader which we need to utilize for our downloaded files.
Now under the Hypershade window, create a new "Hlsl Shader".
Now select the material and under the Attribute editor, browse for a "Shader File".
And choose the "Xoliulshader_1.5_Maya.fx" file, as this is the only one that will work for Maya.
Now in your "Attribute editor" you can see the attribute that starts with all the Light's information first and then if you scroll down, you'll find the "Diffuse map" slot. And so on Specular map and Normal map info henceforth, that we'll discuss as we move forward.
Now first we have to enable the use of a Diffuse map by ticking the "bUseDiffuseMap" option, and then call upon our Diffuse texture. The same procedure goes for our Specular map, first enable "bUseSpecularMap" and then call in the Specular map. And in the case where you need to use the Gloss map, we have the slot for that also. But in this particular case it's not required.
And just the same way also apply our Normal map into the required slot. This is now our basic material setup. Now quickly select the mesh and under the hypershade window, Right-click and Hold over your material, and select "Assign Material to Selection" from the pop up options.
Now after you assign the material you'll get something like this, it's because the viewport is still set to "High Quality" and Xoiul's Material doesn't work with that. So to fix that simply disable the "High Quality" Viewport option. But even then' you'll see something dark and that's because there are no lights set and the material needs some lights to work with.
Now to add some lights to the scene go to Create > Lights > Directional Light (one can use any type of light, as they like), and it will create a new "Directional Light" in the scene. Now simply Move and Scale the light and direct is towards the boiler.
Now even after adding the light you won't see any difference in the scene, for that purpose we need to link the lights to our material. So now inside your "Attributes Editor" Right-click under the "light1_Position" slot and under the options which appear, select Lights > "directionalLight1" (the light which you have just created.)
And you'll notice that the boiler starts to show up under the light, but there are still dark areas where the single light is not affecting the model. So take a copy of the same light and place it facing to the side/bottom area of the boiler, and then add this light to "light2_position" using the same procedure.
One more thing we need to do is set the "numberOfActiveLights" to 2, to enable the 2nd light that we've just added, and we've got our bottom surface lit. Now to add some light from the back, repeat the same procedure of duplicating the light and placing it over the back side. Don't forget to set the "numberOfActiveLights" to 3.
Some final tweaks of the light positions as per my requirement, and the scene is ready.
Now there are a lot of post production attributes in this this material, which we can utilize to get our desired results. I'll give a brief intro to all these attributes, but keep in mind that we may not use all of these attributes for this particular asset. But they may be useful for another asset.
So we'll start with the "HueAdjust" which is set to 0.3 by default (shown in the 1st image below) and in the 2nd image it was set to 1. So we can see the difference between the two, the overall Saturation of the colors went up a bit. But in our case, as our colors are pretty saturated already we don't need this one.
So set the "Hue Adjust" value to the 0.3 default and increase the "HalfLambertPower" to 2.6. As you'll notice it will set the overall brightness to a slightly darker tone.
Now under the "ambientcolor" attribute you have three different slots, these three are the RGB values of color. If you put 1.0 in the first slot, an overall Red tint will appear. And if you try putting 2.0 in the 2nd slot, a very bright tint of green will appear.
And the same goes for the last slot, which will give a Blue tint after setting a value of "1". But as we don't need any color tweaks in our case, we'll keep the values at the default of 0.
So here are the attributes for the IBL (Image Based Lighting), which is used if you have any reflective surfaces, i.e. steel or glass. Here you can use a Cubemap under the "IBLcubemap" slot. The "IBLblur" and "IBLmultiplier" are other options to tweak the IBL settings.
And here are the attributes for the Lightmap. You can call in a baked light map under the "lightMap" slot, and you can also control the strength of the map there.
Now the next attribute is "GlobalOpacity" which does as it says. By default it's set to "1", which means full opacity. If you set it to a lower value, say 0.6. The whole thing will become a little transparent.
And here is the "speclevel", which directly controls the specular power of the asset. If you lower it down to 0.24 the overall specular will be tone down. But we need a high specular, so leave it at 1.
Next is to set the Glossiness attributes, either we can call in a "glossMap", or we can directly control the overall "glossiness" power. It will broaden the spread of the specular, so keep it at the default only.
And here are the attributes for "FresnelPower", which you can use when creating a Glass surface. The last section is the Reflection map, when and if required.
Now finally go to Show > Lights to make the lights invisible in viewport, so that we can take some screengrabs.
And here are a few real-time screen shots from Maya's Viewport with the help of the Xoliul Shader.