Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Follow a practical guide to building 3D cityscapes for games. IAuthor Adam Crespi constructs a city block in 3ds Max utilizing low-polygon modeling and advanced texturing techniques. The course shows how to model common city elements such as buildings, intersections, curbs, and roofs and explains how to expand a city quickly and easily by reusing existing geometry in a modular way. The course also sheds light on simulating real-world detail with baking, lighting, and ambient occlusion techniques and offers a series of best practices for exporting to the Unity gaming engine.
Once you've got the geometry in place in a cornice, you can start unwrapping it. In this case what you're seeing, aside from the additional geometry of the windows, is that I've unwrapped it piece by piece. If you notice, I have a lot going on in the Modifier stack on this object. It starts out as an editable poly, but then we see a sequence of UVW Map and Poly Select with the Polygon icon next to the Poly Selects. Here's what this is doing. I'll drop down to this Poly Select as an example. What I've done is to select these two polygons on this cornice element and the next unwrap then only respects the selection.
There is my mapping gizmo. What I have done is to size it at 144.0x144.0. That's the size of one module from this engraved pilaster to the edge of the next where it repeats across the wall and including the height. What this corresponds to then is the texture map for this whole cornice module. What this looks like when I'm all done, when I jump back up to the Unwrap UVW Modifier is part of it is tileable and part of it is not. When I go up to this Poly Select, if you notice, I'm getting this warning.
Max wants to say that because changing topology or changing the mesh will affect the unwrap. We'll get distortion. So it's telling me, would you like to keep going, do I want to hold, which is kind of a temporary save? I'm going to say yes, I'd like to continue because I'm just jumping around in the stack here. Now I've deselected everything, and finally the Unwrap in this case, if I go down and open up the Unwrap Editor. The Unwrap Editor shows me a large spanning polygon over the Normal or 0-1 space in the Unwrap here.
If I turn on my texture sheet called CorniceC for Color, I can see where I've got my repeat. Here's my wall with the window and I'm using the other brick as you remember from before for the other parts. This is the vertical pilaster and here is one square with its engraving and one panel. The pieces up above then will get further detail, egg-and-dart moulding and other fun things in there. And you can see the polygons run right off the edge. That's because of the UVW Map Modifier. In this case I'm using this part of the map as a tilable or repeating map, figuring that based on the reference this cornice detail can just run all the way along here.
And I can just extend out this geometry as far as I need for the other side, tiling that map. Part of the reason to look at this is the difference between a tilable map and a non-tiling one, especially when we get into baked lighting and shadows. In the end, I can actually collapse the stack and the coordinates will still be there for mapping. What I want to look at when I'm dealing in ambient occlusion is where are the adjacent pieces for occlusion, because they may change depending on the geometry.
The mapping will still tile but the darkness caused by ambient occlusion will vary from side to side and cornice elements. The other thing to consider then is we can use multiple mapping coordinates on an object. Right now this is Map Channel 1. That's the default. I'll scroll down to the Channel and show this in the Unwrap dialog. Here we can see this is Map Channel 1. In the Material Editor, pressing M, this image looks to Map Channel 1. We can see it right here under Explicit Map Channel.
I can add on multiple unwrap dialogs and unwrap this again. That's what I'm going to do here, and I'll pull up the unwrap on the second channel for occlusion. In the interest of time, I'll unwrap this and show what it looks like when I'm done as this may take a few minutes to get right. So what I've done is to first collapse the modifier stack down so it's a little less messy, removing the Poly Selects and things, and putting a new Unwrap UVW on. In this case, this unwrap is Map Channel 1. If we open the editor, we see the pieces actually laid out tillable. They span across.
The second unwrap I've put on is Map Channel 2. And we can see this here in the Channel rollout where it says Map Channel 2 and I move the UVs over once I have them. In the Editor here, I've put these cornice elements together at the top. I've saved the rest of the space for another object as part of this light map, trying to maximize my texture space as much as possible. I've used tools such as Stitching here. Stitching To Source, Stitching To Target, and aligning vertices using the Align Vertical and Horizontal where needed to put these back together, where the element seams are shown in green and the seams between faces are done in yellow.
I'm ready to bake my occlusion or render the ambient occlusion out into that UV space so I can use it as a texture, faking lighting essentially. As a side note, what we really want to do is turn off these panel seams. It may make it easier to see in the viewport. We know where they are. I'll scroll down under the Unwrap UVW Modifier, all way down and turn them off. Down here under the Configure rollout, under Display, I can turn off Map and Peel Seams. It may make it just easier to see especially when I'm overlaying Edged Faces by pressing F4.
Now I'm ready for the occlusion. With the object selected, I'll press 0 for Render To Texture. In this case, the Render To Texture shows Plane029. That's this object. If I scroll down here, I'd like to use the existing Map Channel 2 making sure I bake into the proper one. Under the Output I will add and choose Ambient Occlusion. MR stands for mental ray. I'll add the elements. And if I scroll down further, I can choose where is it going to and also a size. Being that I'm going to use this for a light map in Unity, I don't know if I'm going to put it into a target map slot yet.
But I will bake this out at 1024, figuring we can always reduce it later, but I want the detail at the moment. Finally, I'll tell this where to go and give it a name. I'll put this one in Chapter 5 images and a 32-bit target is fine. Really what I care about is the RGB data. Now I'll hit Render and wait for it to process. My ambient occlusion rendered, although it didn't really show in the view that it was just a diffuse texture.
What I need to do is browse over to see it. And when I select it and hit View, I can see the image. There are probably a couple of things to tweak in here. The occlusion has dots in it, the quality is not high enough, and it's also darkening areas possibly too much. This is an artistic choice to make: how much do these pieces darkened. But it is popping out the detail nicely on my cornices. I'll cancel this and test or tweak the ambient occlusion parameters just a little bit.
Upping the Samples to 128 will help the quality. The Spread determines how much darkness clusters in the corners versus spreading on the surface. And a Max Distance determines how far apart in seam units will objects cast occlusion on each other. A Max Distance of zero is a special case, meaning that everything participates no matter how far apart. I'm going to set my Max Distance at 24, so I get nice zones of darkness in the corner without graying and darkening my whole mesh. I'll hit Render again and pull up the final image.
Here's the image when the ambient occlusion finishes. It rendered but it looks like the diffuse texture into that map channel. I don't actually need this view. What I need then is actually the occlusion image which I'll click on the three dots for the file to go browse to. Select it and view it. That's much better. Now I can see right here on the top where the cornice meets the wall below, the occlusion rises and falls because it's adjacent to different geometry. In my cornices then for lighting, I have a nice solid darkness in the corner that will really pick out the details well.
The important thing to remember here is to make the distinction in your mind and in your models between a tiling or repeating map and a non-tiling map that depends on different geometry, such as ambient occlusion. We'll use ambient occlusion as a foundation for dirt and grime and also as faked or baked in lighting in a game where I need things to look more soft and complex in the lighting than they actually are. We can use multiple Unwrap UVW Modifiers using multiple map channels in Max to do this. And many game engines including Unity can respect them.
There are currently no FAQs about Creating Urban Game Environments in 3ds Max.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.