Cheap preshading with MeshMapper tutorial

Cheap preshading with MeshMapper tutorial

Tutorials & Resources For Modellers & Skinners

Moderators: MR.D, Moderators

Post Reply
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Cheap preshading with MeshMapper tutorial

Post by Guessmyname »

(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:
Image

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.)

Image

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:
Image
(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 :oops: )
Image
(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
Image
(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:
Image
(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.
User avatar
scifi
Posts: 848
Joined: 10 May 2009, 12:27

Re: Cheap preshading with MeshMapper tutorial

Post by scifi »

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
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Cheap preshading with MeshMapper tutorial

Post by rattle »

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.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Cheap preshading with MeshMapper tutorial

Post by Warlord Zsinj »

If you're itching to do starwars related modelling work, there's plenty to do ;) *cough cough*
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Cheap preshading with MeshMapper tutorial

Post by rattle »

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.
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.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Cheap preshading with MeshMapper tutorial

Post by Master-Athmos »

Is there actually a download for Mesh Mapper you don't have to register for?
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Cheap preshading with MeshMapper tutorial

Post by MidKnight »

Where did the images go?
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2700
Joined: 25 Aug 2004, 13:31

Re: Cheap preshading with MeshMapper tutorial

Post by bobthedinosaur »

hosting went dead?
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Re: Cheap preshading with MeshMapper tutorial

Post by Guessmyname »

uh... whoops, looks like I removed the images by accident
User avatar
d-gun
Posts: 126
Joined: 03 Jan 2010, 18:32

Re: Cheap preshading with MeshMapper tutorial

Post by d-gun »

can you fix them?
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Cheap preshading with MeshMapper tutorial

Post by MidKnight »

d-gun wrote:can you fix them?
Please? :wink:
Post Reply

Return to “Modelling & Texturing Tutorials & Resources”