Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

EffectHub.com: Your Best Source for Gaming
Login    or

Create a Game Ready Fire Extinguisher with 3D Studio Max: Part 4

Final product image
What You'll Be Creating

In this tutorial, we are going to learn how to bake the Normal and AO (Ambient Occlusion) maps from the high-res model. In next-gengaming, Normal and AO maps are a very major part of the pipeline and we have to generate these maps before texturing, because the texturing process depends on it.

So let’s learn how we can bake a Normal and AO map using 3ds Max.

Correct placement of the high and low-res meshes is the most important thing.Here we start by arranging some layers, because it’s always better to work using a proper naming convention and layers.

You can see I have placed the high-res mesh in a Hi_Mesh layer, and the low-res mesh in a LO_Mesh layer. Once done, position both meshes in the same place so they perfectly overlap each other. You can use the Align tool for the best fit.

Image

The smoothing groups of the mesh should be separated according to how the mesh is unwrapped. There are two ways to assign smoothing groups to an object. The first way is to manually select the polygons you want to smooth and choose a different smoothing group number.

The second way is to use a good script for this purpose. I prefer the Textools script. It’s a free to download, easy to use and very helpful script. You can download it from here.

It’s also very easy to install. Just drag and drop it onto the 3ds Max interface and choose Quick Install when prompted. Once installed, you will see a floating tool bar just like what's shown below.

Image

With the Low-Res model selected, go to Tools > Smoothing Groups from UV shells.

Image

This automatically applies several modifiers to the object as shown in the following image. Collapse all the modifiers, or Convert the mesh into an Editable Poly.

Image


Sometimes you may face problems with your Normal and AO (Ambient Occlusion) map, if you have overlapping UV faces. So you should always move any overlapping parts out of the UV box.

Most of the time, I use the Absolute Relative Type Ins for this. With the overlapping parts selected, enter a value of -1 or 1 in U or V box and hit Enter. The selected unwrapped faces will be moved outside of the UV box.

Image

You can also achieve the same task with the help of the Tex Tools script. It’s very easy and quick. First click on the Open UV Editor option.

Image

You will get several new tools along the top of the UV editor window. Just click on the Shift Overlap button and all the overlapped parts will be moved out of the UV box.

Image

After this, collapse the UVW Modifier by Right Clicking on it and choosing Collapse All.

Image

Now press the 0 (zero) key, or go to Rendering > Render To Texture...

Image

This opens the Render To Texture dialogue box.

Image

First, we need to define the Output path or folder, so the generated maps can be stored there. Here I have made a new folder named Fire Extinguisher.

Image

Now select the Low-Res mesh and click on the Pick... option.

Image

Here select the High Res mesh, or "Target" mesh which will be projected onto the low-res mesh.

Image

After adding the target mesh, you will see there is now a Projection modifier applied on the low-res mesh and a blue colored wireframe around the meshes. This is called the Cage.

Image

Next click on the Cage roll-out tab to expand it.

Image

Click on the Reset button, so the cage will be reset and firmly applied onto the mesh.

Image

You can see the cage is now wrapped firmly around the mesh, so enable the Shaded and Point to Point options. When you enable the Shaded option, the cage turns into a face display mode.

Image

Look at this! This is not the low-res mesh, but the cage has been turned into faces because we've turned on the shaded display option. However you canturn it back into wireframe mode again by switching off Shaded mode.

Push is an option which will help in covering the high res mesh with the cage. You can manually edit the vertices of the cage, or you can  increase or decrease the overall size of the cage using the Push Amount and Percent options.

Note: The low-res mesh and high-res mesh should fit together and the cage should not intersect with either the high or low-res mesh. It should always be a little bigger than the mesh. For the best results, keep your meshes as close together as possible.

Image

Once you have set the cage properly, move back to the Render To Texture window.

Here you will see is an option for Padding. This depends on the pixel gap between the UV seams. We need some extra pixels on the baked map outside of the seams, as they protect the seams during compression or mip mapping.

I prefer to use a Padding value of 3 to 6 for a 2048 map, though it may vary from engine to engine based on compression and the specifications. Follow the same Mapping Coordinates settings as shown in the image below, and then click on the Add button.

Image

This opens the Add Texture Elements window. Here you can choose the desired elements like Normal, Ambient Occlusion, Shadow etc.

I prefer to use the Lighting Map option for Ambient Occlusion, so I have selected the NormalMap and LightingMap elements. Once you have made your selections, click on the Add Elements button.

Image

You can see these two maps have been added to the Output table. Now click on the File Name and Type button.

Image

Let’s define the proper file name and type. You can see that the file name is a combination of the mesh name and element type. Set the file type as .TGA and click on the Save button.

Image

A confirmation window opens. Here choose the 32 Bit option and then click on OK.

Image

Let’s go back to the Render To Texture dialog and select the Ambient Color option in the Target Map Slot.

Image

Now select both elements one by one and define the map size. (I will select 2048x2048 for both.) To define the map size, first select the LightingMap and then click on the 2048x2048 option.

Image

With the NormalMap selected, choose Bump in the Target Map Slot. Click on 2048x2048 and enable the Output into Normal Bump option.

Image

Now it’s time to add lighting to the scene. So click on the Lights tab in the Create panel.

Image

Select the Standard lights option instead of Photometric using the drop-down menu.

Image

Add a Skylight into the scene.

Image

Let’s go back to the Render To Texture window and click on the Options... button.

Image

This opens the Projection Options window. Click on the Ray Miss Color check box. The default RGB value for the Ray Miss Color is 255,0,0. We have to change it to 127, 127, 255 as this is the base color of a Normal map.

Image

Now click on the Global Supersampler, Setup... option.

Image

Here we can setup the quality of the maps. We have to adjust the global super sampling and filters for better Antialiasing.

Image

Enable the Global Supersampler option and choose Hammersley from the list. Then choose Mitchell-Netravali as the Filter.

There are many filters for antialiasing, but I prefer Mitchell-Netravali (for smooth results) and Catmull Rom (for a sharp arrangement of pixels).

For Global Super Sampling, there are two major samplers – Adaptive Halton and Hammersly. Both have 4 to 40 samples in the X and Y axis, but there is a big difference in the quality and output time.

Adaptive Halton is lesser in quality than Hammersly, but faster in rendering, so I prefer Adaptive Halton. But if you want a quality bake then choose Hammersley.

Image

Next click on the Advanced Lighting tab.

Image

Select the Light Tracer option from the drop-down menu.

Image

Now let’s adjust the samples. For a standard output, the value could be 250-300, and for a quality output, 500-600 samples are fine. After setting the samples, click on the X button to close the window.

Image


Now it’s time to bake the maps. Inside the Render To Texture box, go to the Baked Material roll-out and click on Render.

Image

Here is the final rendered result.

Image
Image

Additional Notes: If the Normal and Ambient maps are not working well or show some artifacts after rendering, these may be the possible reasons:

  1. The smoothing groups are not setup correctly according to the UV Map seams.

  2. The high-res and low-res meshes are not aligned correctly.

  3. You are choosing the wrong mesh for the projection.

  4. The Cage is overlapping the projection mesh, or intersecting.

  5. There are some overlapping elements inside the UV box.

  6. You may have chosen the wrong UV Channel.

  7. The mesh normals are flipped.

  8. You have not added a Sky Light for the AO (Light Map).

  9. If the light map is looking flat, you should check the Light Tracer option.

  10. You are choosing an incorrect map or element for baking.

Suggestions:

  1. Always use proper names for objects, so that you can be assured what you are selecting is correct.

  2. Bake smaller sized maps for testing and once you are assured the result is correct, make them larger.

  3. Bake the Normal Map first without using the skylight and Light Tracer option, because it takes a lot of time to render.

  4. You can sometimes paint out artifacts in Photoshop. So always rely on Photoshop for some post production work, and don’t hesitate at all to use it.

  5. If you find you're getting the same error again and again, try to Export the mesh as an .OBJ, and then re-import it and try again.


From: http://cgi.tutsplus.com/tutorials/create-a-game-ready-fire-extinguisher-with-3d-studio-max-part-4--cms-20275


...

You must Sign up as a member of Effecthub to view the content.

2988 views    9 comments

You must Sign up as a member of Effecthub to join the conversation.

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character