Cheap preshading with MeshMapper tutorial
Moderators: MR.D, Moderators
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Cheap preshading with MeshMapper tutorial
(Please note: Yeah, this is for a HL2 model, but the practise applies and is still handy for Spring stuff. Figured people would find it handy)
Aka 'pre-shading for lazy people'.
Firstly, download GPU MeshMapper here. It's a free tool (yay!) for generating normal, displacement and AO maps for low poly models, from high poly models.
Which is not what we're going to be using it for.
(Not that you can't, this is just assuming you haven't got a high-poly model ready-made).
Firstly, export your (UV'd and smooth'd) model to .obj format. If you're using 3dsmax, be sure to have these settings on the export:
Having exported your model (I'm using a cylindrical carrying case thingie for this tutorial), fire up GPU Mesh mapper.
(Note: I get a warning about Tesselation and Displacement maps not being supported; if this comes up, you can safely ignore it.)
Ignoring my scribbling, this is what the interface will look like when you first load it.
Step 1: Load the model into mesh mapper. Load it into both the low and high resolution mesh options.
(Note: If you actually have a higher poly version of the mesh with more details on, then obviously load that into 'High Res' instead. It doesn't have to be UV mapped, but the low res model does)
Step 2: Having loaded in the model(s), switch to the Maps tab as highlighted. You should see this:
(click for the full-size version)
First things first, expand the Common Settings box and up the Texture Dimensions to be the same resolution as your texture / uv map render (256x256 in my case). Then expand the Ambient Occlusion Map box and make sure the 'Generate Ambient Occlusion Map' flag is checked.
If you loaded the same mesh into both options, then go into the Normal Map and Displacement Map tabs and uncheck them (as you won't need them). If you do have a high-res model, then you might want to generate a normal map as well; up to you.
(Note: MeshMapper remembers the settings for these, so you won't have to change this the next time you run it, except occasionally the Texture Resolution)
All that done, go back to the Common Settings box and click the surprisingly easy to miss 'Generate' button. (Seriously, someone had to point it out for me the first time I used it )
(Note: if you get an error about the UV map being 'out of range', it's because there's something wrong with the UV map; some of the mapped geometry is outside the boundaries of the template and you need to bring it further in)
Meshmapper will automatically save the Map as a dds file called 'MostRecentAmbientOcclusionMap' it the location of the meshes (not sure which one if they're in different directories), but you can go back to the Ambient Occlusion Map box and save it under a different name to prevent confusion / it getting overwritten (I prefer to do this).
AO map generated, you can use it to easily preshade your model in Photoshop by setting it up as a layer above the rest of the texture, set to multiply
(Note: because I haven't actually made the texture for this model yet, there's nothing for it to actually shade in the first place, so you can see it in it's 'pure' form. The lines are form the UV map template, also set to Multiply at 20% opacity so I can see the geometry, but that layer will be hidden on final texture export)
To see the effect of an AO map / vs not having an AO map, compare these:
(Left has AO map, Right does not)
AO maps add quick-and-easy depth to textures. Obviously, using a high-res model for this will allow the shading of extra details onto the texture, and it can help give an idea of what's recessed and what's not (useful when deciding where to add scratches to a texture). And, of course, you can also use MeshMapper for what it's primarily intended for as well (generating normal maps from high res models).
A further little note applies on mirrored / overlapping UVs. The cylinder thingie used as the basis for this tutorial, and the little system hob above all had shared UVs. This can occassionally result in errors in the AO map you'll have to fix. Because in both cases I didn't use a high-res model, the issues this can cause were reduced, but be careful when adding high-res details to mirrored sections.
Aka 'pre-shading for lazy people'.
Firstly, download GPU MeshMapper here. It's a free tool (yay!) for generating normal, displacement and AO maps for low poly models, from high poly models.
Which is not what we're going to be using it for.
(Not that you can't, this is just assuming you haven't got a high-poly model ready-made).
Firstly, export your (UV'd and smooth'd) model to .obj format. If you're using 3dsmax, be sure to have these settings on the export:
Having exported your model (I'm using a cylindrical carrying case thingie for this tutorial), fire up GPU Mesh mapper.
(Note: I get a warning about Tesselation and Displacement maps not being supported; if this comes up, you can safely ignore it.)
Ignoring my scribbling, this is what the interface will look like when you first load it.
Step 1: Load the model into mesh mapper. Load it into both the low and high resolution mesh options.
(Note: If you actually have a higher poly version of the mesh with more details on, then obviously load that into 'High Res' instead. It doesn't have to be UV mapped, but the low res model does)
Step 2: Having loaded in the model(s), switch to the Maps tab as highlighted. You should see this:
(click for the full-size version)
First things first, expand the Common Settings box and up the Texture Dimensions to be the same resolution as your texture / uv map render (256x256 in my case). Then expand the Ambient Occlusion Map box and make sure the 'Generate Ambient Occlusion Map' flag is checked.
If you loaded the same mesh into both options, then go into the Normal Map and Displacement Map tabs and uncheck them (as you won't need them). If you do have a high-res model, then you might want to generate a normal map as well; up to you.
(Note: MeshMapper remembers the settings for these, so you won't have to change this the next time you run it, except occasionally the Texture Resolution)
All that done, go back to the Common Settings box and click the surprisingly easy to miss 'Generate' button. (Seriously, someone had to point it out for me the first time I used it )
(Note: if you get an error about the UV map being 'out of range', it's because there's something wrong with the UV map; some of the mapped geometry is outside the boundaries of the template and you need to bring it further in)
Meshmapper will automatically save the Map as a dds file called 'MostRecentAmbientOcclusionMap' it the location of the meshes (not sure which one if they're in different directories), but you can go back to the Ambient Occlusion Map box and save it under a different name to prevent confusion / it getting overwritten (I prefer to do this).
AO map generated, you can use it to easily preshade your model in Photoshop by setting it up as a layer above the rest of the texture, set to multiply
(Note: because I haven't actually made the texture for this model yet, there's nothing for it to actually shade in the first place, so you can see it in it's 'pure' form. The lines are form the UV map template, also set to Multiply at 20% opacity so I can see the geometry, but that layer will be hidden on final texture export)
To see the effect of an AO map / vs not having an AO map, compare these:
(Left has AO map, Right does not)
AO maps add quick-and-easy depth to textures. Obviously, using a high-res model for this will allow the shading of extra details onto the texture, and it can help give an idea of what's recessed and what's not (useful when deciding where to add scratches to a texture). And, of course, you can also use MeshMapper for what it's primarily intended for as well (generating normal maps from high res models).
A further little note applies on mirrored / overlapping UVs. The cylinder thingie used as the basis for this tutorial, and the little system hob above all had shared UVs. This can occassionally result in errors in the AO map you'll have to fix. Because in both cases I didn't use a high-res model, the issues this can cause were reduced, but be careful when adding high-res details to mirrored sections.
Re: Cheap preshading with MeshMapper tutorial
hm seams nice it adds more details and contrasted areas easy to use
but i do think that one can do that easyly with photoshop takes some learning yes but it still is the best way imo.....it is as you called it cheap preshading
anyway nice program it is nice to know these things =)
normal preshading on photoshop takes longer its interesting
but i do think that one can do that easyly with photoshop takes some learning yes but it still is the best way imo.....it is as you called it cheap preshading
anyway nice program it is nice to know these things =)
normal preshading on photoshop takes longer its interesting
Re: Cheap preshading with MeshMapper tutorial
Remember that animated models with intersecting objects require heavy editing. It is a good idea to get rid of all intersections for baking only.
If you encounter any visual glitches make sure to get rid of all overlapping UV coords on the low res model that you load in MeshMapper.
If you encounter any visual glitches make sure to get rid of all overlapping UV coords on the low res model that you load in MeshMapper.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Cheap preshading with MeshMapper tutorial
If you're itching to do starwars related modelling work, there's plenty to do *cough cough*
Re: Cheap preshading with MeshMapper tutorial
I just noticed that MeshMapper does not bake UVs that are out of the 0...1 area, i.e. offset your duplicated UVs by 1 to prevent it from baking the same faces twice.If you encounter any visual glitches make sure to get rid of all overlapping UV coords on the low res model that you load in MeshMapper.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: Cheap preshading with MeshMapper tutorial
Is there actually a download for Mesh Mapper you don't have to register for?
Re: Cheap preshading with MeshMapper tutorial
Where did the images go?
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2700
- Joined: 25 Aug 2004, 13:31
Re: Cheap preshading with MeshMapper tutorial
hosting went dead?
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Re: Cheap preshading with MeshMapper tutorial
uh... whoops, looks like I removed the images by accident
Re: Cheap preshading with MeshMapper tutorial
can you fix them?
Re: Cheap preshading with MeshMapper tutorial
Please?d-gun wrote:can you fix them?