WORKING WITH MODULAR ROCKS

Tutorial by Philip Klevestav



< Back to Tutorials Index page


INTRODUCTION

This tutorial will take you through some steps I use when working with more organic type of modular units.
Check out a tutorial I wrote on working with modular sets in general first if you want more basic ideas that can be used when working with these types of units as well.

I will go through the process I tend to use when I create something like a set of rock walls or larger ground parts.
The idea is to show how you can get the most out of using as little material as possible.

You should be able to use a similar workflow even if you want to create something more stylized or less busy than my example.



CREATING THE TEXTURE FIRST

For this example I just went with a photo to start with. It really does not matter if you go with 100% hand painted or mostly photo, the process will be the same when it comes to the modelling part.
I made the red area brighter and the blue a bit more desaturated in order to make it well tilable.


Then offset the texture, just clone over the seams.
I tried to make sure I had a good flow on horizontal and vertical cracks on the rock.
If you try to keep those cracks continue without any major interuptions you will have a much easier task when we start the modelling process.
I quickly painted some main cracks this picture had in blue.



This example will be pretty busy with cracks and such and would not work that well if you get very far from the mesh.
The repetition can be broken up by creating a few more variations, still a good way if you are to see your rocks from a far distance is to keep cracks and stuff in the texture to a minimum.

I simply painted out all the cracks and tried to vary the crack sizes as much as possible throughout the texture.
I decided to bring this one into CrazyBump to get a quick normal out of it, that is why I added a bevel to the cracks to kind of fake "light" in a photo.


And I got an OK result as a base from that.


Here are the texture flats.


Remember that I could just as well have made the texture in a sculpt program like Zbrush or Mudbox. Or even model something in a regular 3D app.
The important things for this tutorial is to have it tilable and have some pretty defined cracks where the mesh can be split up.
When I previously worked with rocks I tend to use a mix of both sculpting up a base, maybe some additional details from a program like CrazyBump and a lot of extra hand painting in Photoshop.


THE MODELING PROCESS

In this example I started out with just a simple subdivided plane and slapped on the texture.


If you want to create more variation, using the same tiling texture for all variations can work well, especially if you offset/flip/rotate the UV or model to really use the most of the texture.



Just like when the texture was made I start cutting out all strong cracks I want to, in 3DS Max I usually just use the cut tool and connect new edges where I need them.
I also made an instance on each side of the same mesh just to have some idea of the tiling already at this point.
It can be a good ide to try and keep the mesh triangle density as even as you can. But I tend to "square" the mesh up as I go on with it, so it is no big deal if it is looking very unevenly distributed at first, it is just a matter of creating new edge loops and connect others.



I tend to extrude edges where strong cracks are early on. After this step I just use one single smoothing group for the whole thing (or in Maya: only smooth edges).



Then I try to keep the cracks as splits for my smoothing. So there will only be hard edges where the cracks are.
This is to get away from a too soft look but not having only hard edges.


To have your edges still sharp, yet not in different smoothing groups I chamfer the edges, sometimes you may want even sharper edges and may then need to add a support edge on each side of the wanted hard edge.
This of course raise the triangle and vertex count so you need to keep optimizing this as soon as you chamfer an edge you can go in and collapse a lot of edges close to each other with no or minimal change in the smoothing.
As you can see in this picture I can easily optimize the vertex count where the blue areas are.


After these steps it is pretty much just to continue as far as you want to take it. Some tips to quickly change larger shapes is to use subtle noise modifiers in 3DS Max on selected edges (there should definitely be a similar tool in Maya).
Also a very effective way of moving chunks of your model without distorting it totally is to use smooth selection in 3DS Max.
As an example I could with that just select a row of vertices/edges/faces and move in or out where the blue color is in this picture.



When you start to feel somewhat closer to being done it can be a good idea to look at how the mesh repeats itself and espcially look at the borders of your mesh.
As I said before it is pretty nice to have a couple of instances of your mesh on each side to keep track on this all the time.
If you want your set of rocks or other similar type of objects to be really usable ingame you will need to "cap" the borders.
In this example I just selected all border edges and extruded them and then pulled them back to create a kind of "box shape" of my whole mesh.



It's easy to unwrap and stitch the newly extruded border faces in max.
I simply split them up in top/down, left/right and relax each piece, then I start stitching the edges and making sure the actual rock UV will not move, because if it does all cracks and such will be offset from where the mesh was split up.



After the capping I will still need to try and get rid of as much ugly intersection (blue painted) as possible when repeating the mesh.
You will not get away from having quite some overdraw ingame working with these kind of meshes. It is simply a matter of how usable the set should be vs. having minimal overdraw.
When you have a pretty nice cap of the borders you can offset your units from each other a lot more ingame which will make the set a lot easier to use and it will be easier to break up repetition.



VERTEX COLORS

Just to give you an idea of how much you can do if the engine you use supports vertex colors I made a variation of the texture with no real crack defenition.



I then really quickly assign vertex colors to my mesh where the cracks are modeled.
This way you can really create any shapes you want and even use a smaller texture which is tiling more often over your mesh.
In 3DS Max you can either select vertices when in Editable Poly mode and then assign the vertex color of your choise to those vertices selected.



Or you can simply add a Vertex Paint modifier and paint directly on your model.
You can also bake out ambient occlusion and assign the result to the vertices. You may get some weird results if your mesh is not quite well tesselated tho.
It can be a good way of getting a base up to render out the ambient occlusion first and then manually paint some extra where you like.



SOME ADDITIONAL THOUGHTS

Whenever I have been working with large chunks of more organic sets I think one of the first questions you should ask yourself is HOW your set will be used and seen.

There is a tremendous difference to create a set of rock walls if the player will only see them from a maximum range of 1-5m.
However if you will be able to see the same rock walls from a distance of 100m+ and heavily repeated next to each other you will also have to base your whole set on that requirement.
I have often, especially when working with rocks, made the mistake of making them way too busy in general.
Something I noticed, when working on a game where the focus point would be around 30m from an object, is to work zoomed out in 3DS Max, Photoshop or whichever application you use.
This way you can quickly concentrate on the right amount of details right from the start instead of spending countless hours on details no one will see.



Here I just added this mesh in Unreal.



And this is the version with a flat texture and vertex colors assigned.





These are some more examples where I have used various ideas and techniques brought up in this tutorial.











< Back to Tutorials Index page