Hello. Due to upcoming competition and interest in modeling and designing I decided to create a tutorial on modeling workflow. I had already created one long time ago but as time has passed I learned new tricks that I would love to share with the community. Its you who are the real authors of the following tutorial as involvement in this community basically made me a designer. I hope that it will prove to be helpful (even or perhaps ESPECIALLY for my competitors) Before I begin:
Let me begin.
MAP MODEL REFERENCE:
Firstly It's important to know that you can export your map or just a part of it as an .OBJ file and import it to any modeling software. You might ask " Why would I want to do this?" For scale reference and exact matching your model within the environment you are making - visually and structure wise. Obviously some models can be done without that special step.
The option can be found in the build menu and its called "convert to .OBJ for modeling apps". Mind that your map has to be surrounded by caulk cage and has to have info player death match entity (don't ask me why. Nobody knows that)
As you have your .OBJ file saved safe and sound in your data/maps folder you might want to open it with modeling software and create a basic draft of what you want to have in your scene. On the screenshots you can see the tree log and rock basic shapes.
MODELING:
At this point the modeling part comes in where you add vertices to your mesh and sculpt the final asset. During that process you need to adjust the model based on the environment that you had previously imported.
The potential goal is to create two versions of each asset you work on: The high definition and the low definition version. For some models you won't need that. Take for example simple box model made of wood. You will be modeling it low poly and never go into high definition sculpting (unless you want specific effect like cracks, hinges, irregularities that couldn't be achieved in a different way). If that's the case you might want to skip to the next part of this tutorial The reason behind creating two versions is to render the high quality and details of the high poly model onto the low poly one. Take a look at the screenshots:
UNWRAPPING:
Once you have two models prepared unwrap the low poly one. Unwrapping is basically a process of cutting your model into pieces and placing them on flat surface in a way that each polygon is distorted as little as possible. We do that to apply textures which are essentially two-dimensional. This screenshot shows how looks relaxed (unfolded) surface of the cylindrical shaped tree log on the UV space.
THIS MODEL AIN'T YET LOW POLY (its just lower then what it was in sculpting definition). I'm uwrapping it at this point for my workflow allows me to optimize it later on!
While unwrapping keep in mind these things:
Unwrapped faces can't cross the boundaries of the UV space, unless you are using the seamless texture which is going to be tiled.
Save as much texture space as possible. Good for optimization - reduces the amount and sizes of textures and increases texture quality.
Don't overlap faces on the UV space, unless you want them to have exact same texture, I don't know exactly how it affects lightmap in Darkplaces for a model but it might have a negative effect.
Some faces of the model might be in dark or barely visible in game. You can scale them down in UV space (or even remove them entirely) to save some space for "more important" faces.
RENDERING TEXTURES:
Let's say you have unwrapped your low resolution model. Now you can use rendering capabilities of modeling software to produce textures. It might be "render to texture" (hotkey 0) in 3dsmax or "extract texture maps" under the "uvs & maps" in mudbox. There is quite a few programs having this amazing feature, some of them free (like Blender) some not (like ZBrush, Mudbox, 3DsMax)
Once you have your textures generated you might want to throw them into 2D software like Gimp, PS, Paint... If you are using PS I strongly recommend buying cheaply NDo2 for texture generation (If I recall correctly it costs around 50 USD). It allows to create normal, specular, ambient occlusion, height maps as well as convert ones into others. Not only it does that but shows you the REAL TIME PREVIEW which is always a nice feature (we kinda lack it in Netradiant, don't we?).
On this screenshot you can see how I converted normal map that was generated within modelling software into ambient and cavity maps. On the next one you see the model in mudbox with all textures (spec, bump, diffuse...) Surely I could render all maps within 3D sftware, but NDo2 has sliders that allow me to quickly adjust maps and gives much better output. Keep in mind that You need some base map to begin with. Of course you could make normal map from nothing (Ndo2 as well as other software for map creation allows that). If you don't want to pay for this kind of map creation software you can use the free ones like Crazy Bump.
TEXTURING:
For complex models rendering your textures is a very good way to save your time. Having those maps inside your painting software allows you to paint directly on them, use them as a reference, add them as layers with different blending options... For less sophisticated assets I recommend taking time to draw maps inside 2D editor or even directly on your model in 3D editor. Mudbox, 3DsMax, Blender allow you to paint directly on your asset. Cool, huh?
VERTEX PAINTING:
There are dozens of tutorials about vertex painting all around the internet. I want to point out several important points to keep in mind while and before as well as after vertex painting
OPTIMIZING:
Xonotic runs on Darkplaces that can't cope with high definition models. This is why you have to keep in mind vertex management throughout the whole process of creating the asset. Your models HAVE to be low poly to save performance but at the same time good enough to look real. On this screenshot you can see how much I optimized the tree log model (keep in mind that high poly version with bark sculpted on had over 4 million polygons). There are scripts inside meshlab (free), 3DsMax (not free), Zbrush, Mudbox... that let you optimize the model. On the screenshot you can see the result of optimizing script written by Abhishek Subba for 3DsMax called LOD creator. Its advantage is that it preserves UV map unchanged! So you can unwrap the model before optimizing it. It is in fact a golden feature (LOD) which is used by many engines. However in meshlab you can get satisfactory results and give your model parts "weights" that you want to be left almost unchanged.
Not only the geometry can be optimized! I already mentioned how crucial it is to maximize UV texture space while unwrapping your model. It is also possible for you to considering lowering the quality or size of textures. If your texture doesn't have an alpha channel you might save it as .JPG instead of .TGA for instance. There might be a way to tell the engine to use the same normal map for different textures. I didn't find out how yet.
The lightmaps which netradiant generates for your map as you build it might be .jpg instead .tga. The less size of the map the faster it loads and works!
EXPORTING AND SAVING FINAL ASSET:
While doing so keep in mind very important things like:
PLACING YOUR ASSET INSIDE EDITOR:
To do that your model has to be stored in data/models/[map_name_of_your_map]. Once your Models are inside Netradiant they can be scaled, rotated, moved, animated however they cannot be mirrored!
FINAL:
As you can see I decided to add additional branches to my tree. Unfortunately I had to make a new texture for them. The good thing is that you can combine as many textures as you want on the model. So I merged them into already existing log. The only thing is that the more textures you get the bigger size of your map is going to be. Especially if you intend to make gloss and norm for each one of them. Worth mentioning might be the fact I took time to actually go outside with my camera, find the god damn forest and make photos of textures in nature. This way I do have a full control over my asset.
All the best to all designers! Now go and Make your assets!
If anyone need clarification on anything: Pls Let me know.
- I won't be covering usage of advanced software or any software in general. This tutorial contains designing workflow information and serves as guide for every designer who is willing to create their own assets.
- I will mention software titles as it's impossible to write about workflow without that. Don't feel bad if you don't have this or that particular program. Designing and creating graphics in virtual as well as real world has one important feature: Tools are just tools. You can use different ones to achieve same effect. Software developers fight to create ultimate programs and keep on advertising their own masterpieces but the truth is that everybody has their own workflow and preferences as well as budget and having this in mind I don't try to force you to use any software in particular. I am just merely giving you the taste of possible workflow. Any other workflow could work for you too! I checked mine and it works. You have my word on that.
Let me begin.
MAP MODEL REFERENCE:
Firstly It's important to know that you can export your map or just a part of it as an .OBJ file and import it to any modeling software. You might ask " Why would I want to do this?" For scale reference and exact matching your model within the environment you are making - visually and structure wise. Obviously some models can be done without that special step.
The option can be found in the build menu and its called "convert to .OBJ for modeling apps". Mind that your map has to be surrounded by caulk cage and has to have info player death match entity (don't ask me why. Nobody knows that)
As you have your .OBJ file saved safe and sound in your data/maps folder you might want to open it with modeling software and create a basic draft of what you want to have in your scene. On the screenshots you can see the tree log and rock basic shapes.
MODELING:
At this point the modeling part comes in where you add vertices to your mesh and sculpt the final asset. During that process you need to adjust the model based on the environment that you had previously imported.
The potential goal is to create two versions of each asset you work on: The high definition and the low definition version. For some models you won't need that. Take for example simple box model made of wood. You will be modeling it low poly and never go into high definition sculpting (unless you want specific effect like cracks, hinges, irregularities that couldn't be achieved in a different way). If that's the case you might want to skip to the next part of this tutorial The reason behind creating two versions is to render the high quality and details of the high poly model onto the low poly one. Take a look at the screenshots:
UNWRAPPING:
Once you have two models prepared unwrap the low poly one. Unwrapping is basically a process of cutting your model into pieces and placing them on flat surface in a way that each polygon is distorted as little as possible. We do that to apply textures which are essentially two-dimensional. This screenshot shows how looks relaxed (unfolded) surface of the cylindrical shaped tree log on the UV space.
THIS MODEL AIN'T YET LOW POLY (its just lower then what it was in sculpting definition). I'm uwrapping it at this point for my workflow allows me to optimize it later on!
While unwrapping keep in mind these things:
Unwrapped faces can't cross the boundaries of the UV space, unless you are using the seamless texture which is going to be tiled.
Save as much texture space as possible. Good for optimization - reduces the amount and sizes of textures and increases texture quality.
Don't overlap faces on the UV space, unless you want them to have exact same texture, I don't know exactly how it affects lightmap in Darkplaces for a model but it might have a negative effect.
Some faces of the model might be in dark or barely visible in game. You can scale them down in UV space (or even remove them entirely) to save some space for "more important" faces.
RENDERING TEXTURES:
Let's say you have unwrapped your low resolution model. Now you can use rendering capabilities of modeling software to produce textures. It might be "render to texture" (hotkey 0) in 3dsmax or "extract texture maps" under the "uvs & maps" in mudbox. There is quite a few programs having this amazing feature, some of them free (like Blender) some not (like ZBrush, Mudbox, 3DsMax)
Once you have your textures generated you might want to throw them into 2D software like Gimp, PS, Paint... If you are using PS I strongly recommend buying cheaply NDo2 for texture generation (If I recall correctly it costs around 50 USD). It allows to create normal, specular, ambient occlusion, height maps as well as convert ones into others. Not only it does that but shows you the REAL TIME PREVIEW which is always a nice feature (we kinda lack it in Netradiant, don't we?).
On this screenshot you can see how I converted normal map that was generated within modelling software into ambient and cavity maps. On the next one you see the model in mudbox with all textures (spec, bump, diffuse...) Surely I could render all maps within 3D sftware, but NDo2 has sliders that allow me to quickly adjust maps and gives much better output. Keep in mind that You need some base map to begin with. Of course you could make normal map from nothing (Ndo2 as well as other software for map creation allows that). If you don't want to pay for this kind of map creation software you can use the free ones like Crazy Bump.
TEXTURING:
For complex models rendering your textures is a very good way to save your time. Having those maps inside your painting software allows you to paint directly on them, use them as a reference, add them as layers with different blending options... For less sophisticated assets I recommend taking time to draw maps inside 2D editor or even directly on your model in 3D editor. Mudbox, 3DsMax, Blender allow you to paint directly on your asset. Cool, huh?
VERTEX PAINTING:
There are dozens of tutorials about vertex painting all around the internet. I want to point out several important points to keep in mind while and before as well as after vertex painting
- Make sure to have enough vertices you can paint on so the transition of textures look smooth. You can select parts of your model and subdivide them seperatadly to make good surface for painting.
- Obviously textures have to be seamless, Mostly the vertex painted assets will have their UV maps expanded beyond the borders of one texture! If your texture has seams it cannot be rendered repeatedly on a surface without ugly breaks.
- Remember that when you are exporting your model you need to choose "SAVE VERTEX PAINTING INFORMATION". I lost my count how many times I have forgotten about it and was confused when model wouldn't work properly ingame
- Check the COLOR TO ALPHA tickbox inside Netradiant editor!
OPTIMIZING:
Xonotic runs on Darkplaces that can't cope with high definition models. This is why you have to keep in mind vertex management throughout the whole process of creating the asset. Your models HAVE to be low poly to save performance but at the same time good enough to look real. On this screenshot you can see how much I optimized the tree log model (keep in mind that high poly version with bark sculpted on had over 4 million polygons). There are scripts inside meshlab (free), 3DsMax (not free), Zbrush, Mudbox... that let you optimize the model. On the screenshot you can see the result of optimizing script written by Abhishek Subba for 3DsMax called LOD creator. Its advantage is that it preserves UV map unchanged! So you can unwrap the model before optimizing it. It is in fact a golden feature (LOD) which is used by many engines. However in meshlab you can get satisfactory results and give your model parts "weights" that you want to be left almost unchanged.
Not only the geometry can be optimized! I already mentioned how crucial it is to maximize UV texture space while unwrapping your model. It is also possible for you to considering lowering the quality or size of textures. If your texture doesn't have an alpha channel you might save it as .JPG instead of .TGA for instance. There might be a way to tell the engine to use the same normal map for different textures. I didn't find out how yet.
The lightmaps which netradiant generates for your map as you build it might be .jpg instead .tga. The less size of the map the faster it loads and works!
EXPORTING AND SAVING FINAL ASSET:
While doing so keep in mind very important things like:
- Your model has to have the faces facing correct direction. In-game only one side will be rendered (unless you add "cull none" in the shader for the particular texture) This side will gather lighting information so based on the direction of faces you are going to place light entities on your map!
- The pivot point (or origin) has to be set logically (for modular assets like box or a doorway I recommend middle bottom, for lamps that hang out from the ceiling top middle however for specific and unique assets that have to fit just in the right place I suggest placing pivot point based on surrounding geometry (like an edge of the close-by pillar) This way you will make sure your model is placed correctly.
- Keep in mind Smoothing groups and how to apply them to your particular model. They will make your model faces blend smoothly into each other or stand out sharply. Smoothing groups are applied to faces.
- Make sure the texture is unwrapped properly.
PLACING YOUR ASSET INSIDE EDITOR:
To do that your model has to be stored in data/models/[map_name_of_your_map]. Once your Models are inside Netradiant they can be scaled, rotated, moved, animated however they cannot be mirrored!
FINAL:
As you can see I decided to add additional branches to my tree. Unfortunately I had to make a new texture for them. The good thing is that you can combine as many textures as you want on the model. So I merged them into already existing log. The only thing is that the more textures you get the bigger size of your map is going to be. Especially if you intend to make gloss and norm for each one of them. Worth mentioning might be the fact I took time to actually go outside with my camera, find the god damn forest and make photos of textures in nature. This way I do have a full control over my asset.
All the best to all designers! Now go and Make your assets!
If anyone need clarification on anything: Pls Let me know.
My maps:
ErbiumlCrystalCave|Distortion|SilentSiege |Catharsis|Spatium|Imprisoned|Cubes|SpiderCtf
My portfolio: conradjustin.com
ErbiumlCrystalCave|Distortion|SilentSiege |Catharsis|Spatium|Imprisoned|Cubes|SpiderCtf
My portfolio: conradjustin.com