25
Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers Page 1 http://www.icantbelieveitsnothighpoly.com/Tutorials_New.html To view finished product 360 degrees aroundInstructions // Download: Video (Rotation of Final Mesh)/// (Right click and save) This is an advanced tutorial explaining the workflow necessary to create a low poly rock like seen in the huge hit “Gears of War”. (Rock from Gear of War below) Below is a render of the finished product from this tutorial: (660 tri’s in total; 226 tri’s for just the large rock in the center)

Creating a Realistic Rock

  • Upload
    ye-pai

  • View
    294

  • Download
    5

Embed Size (px)

Citation preview

Page 1: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 1

http://www.icantbelieveitsnothighpoly.com/Tutorials_New.html To view finished product 360 degrees around… Instructions // Download: Video (Rotation of Final Mesh)/// (Right click and save) This is an advanced tutorial explaining the workflow necessary to create a low poly rock like seen in the huge hit “Gears of War”. (Rock from Gear of War below)

Below is a render of the finished product from this tutorial: (660 tri’s in total; 226 tri’s for just the large rock in the center)

Page 2: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 2

Programs Used: · Autodesk 3ds Max 9

-Including plug- in: Chuggnutz Polyboost Splutterfish Brazil RS

· Autodesk Mudbox v1.0 · Adobe Photoshop CS2 · Maxon BodyPaint 3d R3 · Unfold 3d Magic v4 · Crazybump Beta · xNormal (x86) · Autodesk Combustion 4

(3d models always exported and imported as .obj; and textures created as .bmp)

1. Open 3ds max and create a box five segments long, then put a tight chamfer on all edges (this will allow proper subdividing). With the model selected, export it to Mudbox or zbrush (any sculpting program will do) as an .obj.

2. Open your sculpting program, here I used Mudbox. Import your box and subdivide it several times. Use the smoothing tool to soften up the edges on the appropriate subd level (level 1 or 2). Then use a regular soft brush to make some irregularities in the surface by pushing and pulling faces.

Page 3: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 3

3. Bring the model up to subd level 4 or 5 and continue to push and pull on the mesh

and then smooth it out for a more natural look. Use different sized brushes to get different levels of details.

4. Subdivide the mesh until it is at level 6 (between 500,000 to 1,000,000 polys) smooth it out and push it around with the move tool to get a more ridged look. Feel free to now move up and down sub division levels to adjust the smoothing detail and overall form of the rock. When you feel the shape looks right, move back up to level 6 and start adding the tiniest of details like scratches and small bumps. Pinch these details for creases and smooth other areas out for added realism.

Page 4: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 4

4. When satisfied with this high poly version select it and export the mesh. Name

the mesh “High Poly”. After exporting the highest level, move down to subd level 2 (it should have the same silhouette as the high poly) and export the mesh at this sub division level. We will call this subdivision level “Mid Poly” but it will be created into a low poly later on. Once you have exported both the high poly and mid poly then open up 3ds max.

Note: depending on the particular computer system you have, you may need to use a lower subdivision level for export. Most upper level computers can easily import and export over a million poly meshes and this model should be under a million. 5. Import both meshes you have just created in your sculpting program to 3ds max.

Both meshes should overlap each other at this point. Select the mid poly mesh and place it on “x-ray mode”. This will allow you to easily see through the mid poly so that the shape of the high poly is visible.

You may also want to change the level of visibility on the high poly model. Do this by selecting the high poly. Right click on it and select “properties”. Then in the dialogue box, change the visibility on the slider where you want it. This can also be animated using the auto key in 3ds max. This allows you to slide the key for visibility of the high poly. Now go back and select the mid poly once again. You will notice there are many loops on the mid poly that are unnecessary. Using a remove loop tool (there is one in the plug- in “poly boost”, but not standard in 3ds max) delete un-needed loops. If you don’t have a remove loop tool you will have to target weld the verts that are un-needed. This will work in the same fashion only it is far more time intensive then using remove loop. Try to keep the general shape of the model in contact. Generally speaking it is good to keep a couple loops on each main edge, and one loop in the middle.

Page 5: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 5

(Note: the purple is the low poly and the yellow is the high poly overlapping the low poly)

6. Once the mesh is low poly enough (Probably under 300 tri’s) and you have the general shape of the high poly down; you are ready to create the UVW’s. This can be done directly in 3ds max, however; probably the easiest and most efficient way is using a program called Unfold 3d magic. If you are going this route, select the new low poly you created (from the mid poly) and export it to unfold 3d. In Unfold 3d create the seams you want and simply hit the unwrap button. When you are finished unwrapping in unfold 3d import the now unfolded mesh into 3ds max once again.

Page 6: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 6

Above: finished unfolded rock in Unfold 3d magic

7. Once you have re- imported your low poly rock into 3ds max put an Unwrap UVW modifier on the mesh. With this, go into the edit dialogue and adjust the mesh so it is aligned most efficiently. Once you are satisfied with the results collapse the modifier stack.

8. Now that your UVW’s are set for your low poly rock, its time to bake a normal

map! The high poly should still be encompassing the low poly at this point (in the

Page 7: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 7

picture the high poly is hidden). With the low poly version that is unwrapped selected, press the “0” button. This will bring up the render to texture dialogue.

A. (1.): Check Enable under Projection Mapping. B. (2.): Click the “Pick…” button. From here you will have the option of selecting any model that is visible in your scene. Select the high poly rock you created. Note: If your high poly rock (that should be encompassing your lowpoly) is not in the list; then exit the render to texture dialogue and make sure it is visible in your scene. C. (3.): Click the “Options…” button and follow the directions on the next image below. D. (4.): Make sure that the “Use Existing Channel” radio buttons are ticked under Mapping Coordinates. E. (5.): Press the “Add…” button under Output. Another dialogue will come up allowing you to select various types of maps. Choose “Normals Map” and press the “Add Elements” button to close this dialogue. You will now notice that the name of the map, “Normal Map”, and size of the image to be rendered is all listed in the field marked with a red line. This should make it clear that you have it set correctly. F. (6.): Under the “File Name and Type” section you can browse and save the file under the name you want. G. (7.): Here with the various dimension buttons, choose the “2048x2048” button for a large image size to work with. (Note: H. (8.): is below C. continued)

Page 8: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 8

C. (3.): (Continued) You should now have pushed the “Options…” button. The projections Options dialogue should now have opened. Push the “Setup…” button. The Render Scene: Default Scanline Renderer Dialogue should have come up. Go down to the Global SuperSampling section. Make sure you uncheck “Disable all Samplers and check “Enable Global Supersampler” This will give you the option of using the drop down box below. Select “Max 2.5 Star” and then “X” out of (or close) the Render Scene Dialogue. (Don’t worry, it will save your changes). Now that the last dialogue is closed, “X” out of (or close) the “Projection Options” Dialogue. At this point you should only have the “Render to Texture” dialogue open. Continue on with the instructions to point “D. (4.):” above. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ H. (8.): When everything is set and finished you will need to press the “Render” button at the very bottom of the “Render to Texture” dialogue. But before this, on the far right panel, you will notice there is now a projection modifier on your low poly model. The default projection cage, must be adjusted before we continue on by pressing “Render”.

Page 9: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 9

10. (1 and 2): Looking at the Modifier list, click on the “+” next to Projection. This will show Cage, Face, and Element. Select Cage (which is the same as selecting the three dots under the “Selection” tab below). (3.): Check Shaded under the Cage section below. This will make the cage far easier to see. (4.): Press the “Reset” button to get the cage as close to the low poly as possible. (5.): Use the arrows next to amount (under “Push”) to uniform move the cage away from the low poly so that it covers both the low poly and the high poly. When you have the cage mostly covering the high poly, and all of the low, you can now manually select the verts of the cage and move them until the cage is completely covering the high poly and the low poly. Note: It is important that the cage covers the low and high poly completely other wise there will be mapping errors leaving holes in your normal map. If the errors are small enough you can correct them in Photoshop, but if too large it is best to fix the cage and render again. 11. If you now have the cage set, and you followed everything correctly, you can bring up the “Render to Texture” dialogue again by pressing “0”. After the dialogue opens, scroll down to the bottom and press the “Render” button.

Page 10: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 10

Below is what it will look like if you have a cage properly set up around your low and high poly meshes.

Below is what it will look like if you have no errors in your render to texture bake. If you see red any where in the shaded layout this means there are errors, and you should probably fix the cage and do another render to texture bake.

Page 11: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 11

12. You will notice that the render screen will not show you the normal map directly. You need to go to the place where you saved the normal map and open it to see the map normals the baking process just accomplished. Again, if there is any red in your normal map it may be attributed to an error in your cage, and you might want to fix this by adjusting the cage and bake again. Below the resulting normal map is displayed.

13. As nice as these results look, there is still quite a lot of work that is needed to create the final product. For one, we still need a Diffuse or Color map to make this look realistic. Two, we need a specular map and our normal map to interact with this diffuse map appropriately. In this case, the easiest way to generate a diffuse or color map for the rock is to simply slap on a texture found off of the internet. Below is the texture map I chose.

Page 12: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 12

If we place this on our model now by making a material, with its diffuse slot set to bitmap and this texture; the seams on the model will be very clear. This is obviously not good, so we need to edit the map so that it is seamless for our particular UVW layout. Below is an example of the seams this produces.

Page 13: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 13

14. To get rid of the seams we will do it the easiest way which is using a program called Body Paint 3d. But before we open the program, we must first change the image size of the cement texture to 2048x2048 in Photoshop, so that it will match up with the size we are using for the normal map. Once the size is changed in Photoshop, go back to 3ds max and export the latest low poly as an .obj for use in Bodypaint.

15. Getting rid of the seams in Bodypaint is easy. All you do is import your .obj, create a quick material with the cement texture (size 2048x2048), and place it on the low poly. Once this is done you will actively see the texture, and can paint on it in real time. Using the projection button, the clone stamp, and a light pen pressure you can now paint directly over the seams making them totally seamless in a matter of a few minutes.

16. With the seams now gone the diffuse map is pretty much done all except for the gradient we need on the map. To get the appropriate gradient on the diffuse, the easiest way to do this is by generating an ambient occlusion map and overlaying it over the diffuse map. This will produce some nice shades built into the map, and it will get the map interacting properly with the geometry of the original high poly model. To create a great ambient occlusion quick and easy, we can use a program call xNormal, which is free to download. Another important point to mention is that on the xNormals site there are detailed instructions as to how to use the “ambient occlusion generator” tool. To generate the Ambient Occlusion you will need the highpoly model, and the low poly model saved as .obj’s.

Page 14: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 14

Above what xNormals looks like

a. (1. and 2.): Go to “Tools” and click “Simple ambient occlusion generator”. Save the ambient as a high poly mesh (.sbm), and load it in high definition meshes section. Next load in the low poly in the Low definition meshes and make sure to use ambient occlusion. Lastly go to “Baking options” and generate your ambient occlusion map.

17. Now that you have your ambient occlusion map in the size of 2048x2048, open

up Photoshop and your diffuse map from earlier. Take your ambient occlusion map and paste it as a layer over your diffuse map. Choose multiply as your blending option and you should now have a very nice gradient that gives your diffuse a dirty look that properly coincides with your high poly model.

Page 15: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 15

18. Now we have the majority of the work done, its time to take the maps into

Crazybump. Crazybump is another free program available for download and it simply allows you to generate great normals, height maps, specular maps, diffuse maps and displacement maps from 2d textures. It has an array of sliders and options that allow you to customize your maps with little effort. So first, we will generate an ambient occlusion based off the diffuse map to intensify the shadows in the diffuse.

Open up Crazy bump (“click this button to begin”) and load in your diffuse map by choosing “open photograph from file”.

Page 16: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 16

It will automatically generate all the maps for you. Mess around with the sliders in the ambient occlusion section until you are satisfied, and save ambient occlusion map as .bmp. Then open up Photoshop once again.

19. In Photoshop open up both the latest diffuse map and the new ambient occlusion

map you just created. As a layer, paste the ambient occlusion map over the diffuse map and use the multiply blending option. You should now have your final diffuse map!

20. Go back to crazy bump and load your diffuse map once again. This time play

with the options for the normal map. Make sure not to make it too strong, you want a very nice subtle small detail here. You should have something that looks like the image below.

Page 17: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 17

21. After you have saved this normals map, load it into Photoshop. Now, open up

your original normal map. Paste the crazybump generated normals over the original baked normals as a new layer. In the right hand panel go to channels. Highlight the blue channel. From here, press “cntrl + L” to go to the levels panel. You should have something that looks like this…

In the “Output Levels” section substitute “255” for 128 (half of the 255 value). This halves the blue value of the map so that it doesn’t de- normalize the values when you overlay. Once you have halved the blue channel value, click on RGB to show all the channels once again. Once you have done this, go back to the “Layers” tab and choose the blending option of “Overlay”. You should now have a perfect combo of the Baked normals and the new Crazy Bump 2d generated normals like below giving you fine detail.

Page 18: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 18

22. With this you have now completed your Normals! Now we can finish up by creating the specular map (or shine) of the rock. Load up Crazy Bump once again and this time load in your new normals map. As always it will create all the maps for you automatically. In the diffuse section, you also have the option of loading in the diffuse map you created, so load the diffuse map in as well. Using both these maps, you can now generate some pretty awesome specular maps with hardly any effort. Go to the specular map section and start playing with the values. The most important thing is that you generate a color specular map (which will now be based off your diffuse colors).

Page 19: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 19

As you can see, (if you loaded in your diffuse map properly) you now have a “Metallic Color” dial. Set it so you can see the color a decent amount but not too much and play with the other levels so that you get a nice array of specularity. When you are happy with this you can save your specular map as a .bmp and close out Crazybump. You should now have your finished specular map. Note: it is probably a good idea to leave crazy bump open and test the specularity on your model. If you find it too intense, or weak, you can always go back to crazy bump and generate a more appropriate map by tweaking the values.

23. Now you can go back into 3ds max and test out your maps. The best way to do this is to display them similar as to how the game engine would using a “Direct X-Shader”. You can use one of the shaders that comes standard with 3ds max, or search the web for a custom shader. Personally I use Ben Mathis’s shader, which is available for download on his site: www.poopinmymouth.com.

No matter what you choose, set up some lights in your scene and apply your diffuse map, your normal map, and your specular color map. If everything went well, you should have something that looks like this.

Page 20: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 20

24. Congratulation, at this point you have pretty much completed everything in the tutorial. However, you may have noticed several small rocks on the original final rotation video. You can add more rocks to this project with a few minor adjustments, and following the same basic procedure.

As you have probably noticed, there is still a lot of unused UVW map space that can be used.

Page 21: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 21

Further more, the lone rock could have some smaller rocks around it, as it is unlikely to have just one huge rock sitting in one place with no others rocks around. This UVW space can easily be used by creating some more rocks. Start off by following the same procedures (1-8). However in step number 1 you may not want to create 5 segments, instead just a simple chamfered box will do. Once you have finished steps 1-8 for 7 more small stones you will have something like this below.

25. The trick to getting all rocks on one texture is to first attach the smaller rocks to the large rock. Note: this can only be done once you have created your low poly smaller rocks, you have your high poly rocks, and the low poly rocks are all unwrapped. Once everything is attached as a single object, you can now go to the “Unwrap UVW” modifier and click the “Edit” button. You will see that your new low poly rocks UVW’s overlap the High poly. Simply pull them aside and resize them and place them in the empty spots of your map. If done correctly, you will now have all your UVW’s set up properly on a single map like this.

Page 22: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 22

26. Now that you have your UVW’s set, simply follow the same procedure as before (steps 9-23). Now that all your small rock maps finalized, delete all the areas occupied by the previous finished maps (the big rock UVW space) like in the picture below. (This is done so that you don’t mess up the previous finished parts of the large rock).

Page 23: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 23

27. With the previous work deleted out, simply make this as a layer on top of the appropriate finished maps from earlier. By doing this for all of your maps (normal, specular, and diffuse) you will now have the texture maps with the added texture of the small rocks as well. With that, you are only using these three maps for all 8 rocks that are low poly. Finally, now you have both optimized and realistic looking rocks ready to be placed in game, just like those seen in Gears of War!

Page 24: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 24

Final Maps:

Final Rock Image, Real Time Screen Grab in 3ds Max:

Page 25: Creating a Realistic Rock

Rock Tutorial: Creating A Rock Like Seen In Gears Of War With A Focus On Normal Mapping. By, Brad Myers

Page 25

Final Rock Image, Real Time Screen Grab in 3ds Max, displaying Wire frame:

>> End of Tutorial