Replies: 12 (Who?), Viewed: 27914 times.
world renowned whogivesafuckologist
retired moderator
Original Poster
#1 Old 14th Jan 2008 at 11:43 PM Last edited by HystericalParoxysm : 15th Jan 2008 at 3:28 AM.
Default Tiptorial: Bump Maps
What this tiptorial is for:

This tiptorial (yes, I really like that word - and it's fitting as this is more tips and illustrative examples than showing you a full project) will teach you what bump maps are, as well as basic info on how to make them for your own clothing - or how to make neutral non-bump-mapped clothing if you don't want to bother with bump maps, or your graphics card can't view them.


What are bump maps?

In making clothing, you may have heard of bump maps, but don't really know what they are. So... what are they?

Bump maps are a graphics effect that creates the illusion of more depth and detail on certain items like clothing, walls, etc. and can add a great deal of realism if done properly. Bump maps make it look like an item has 3D detail even though the 3D model or mesh doesn't actually contain that 3D shape. It's great for adding a bit of added shape to buttons, seams, bricks, etc. - anything that could deal with a little more dimension can benefit from the use of bump maps.

Normally bump maps are a very subtle effect if done properly. It may be hard to tell that an outfit even has bump maps when it's done right. You probably won't even notice they're there unless they're done wrong - which often happens with custom outfits (but even with some Maxis outfits). Sometimes creators don't have bump maps enabled or can't view them so they leave the original Maxis bump maps for whatever outfit they've made, and you'll see the outline or bumps for the original outfit on the wrong texture.

If you take a look at the image below of the Maxis chef's outfit, you can see some nice, properly-done, subtle bump mapping - there's a little more dimension added to the buttons and the edge on the front, and to the bow on the back. The effect is not dramatic, and it's not meant to be, but it does create a nice look on this outfit as it's done right.


Bump maps don't always work on all graphics cards, though - for people with integrated graphics or lower-end graphics cards, it may not be possible for you to view bump maps.

They may also be disabled by default for people with cards capable of viewing them, and you will need to enable them by changing certain settings in your game's files.


How to tell if you can view bump maps:

Because the effect of bump maps is so subtle, semloh has created a bump map tester, an outfit that you can put in your game that will show you without a doubt whether or not you have bump maps working. Get it here (attached to the bottom of the first post): http://www.modthesims2.com/showthread.php?t=43273


How to enable bump maps:

If bump maps are not enabled in your game and you think you have a good enough graphics card to handle them, you can change your game's settings to enable bump maps.

Just because you have a new computer does not necessarily mean you have a good enough graphics card to view bump maps. Especially if you have integrated graphics, your card simply may not be capable of rendering them. However, it's not too hard to try to enable them to check. There are instructions here: http://www.sims2wiki.info/wiki.php?...aps_and_Shaders


Does the mesh I'm recolouring use bump maps?

Some meshes use bump maps, and some don't. It's really easy to tell when you make your new project whether you have a bump map or not...

Texture: stdMatBaseTextureName.bmp - This is, of course, your main texture - gives the colours, patterns, shading and highlighting, etc.

Alpha: stdMatBaseTextureName_alpha.bmp - This is the alpha, and will generally be black and white... Where it's black, it will "cutout" or not apply the texture. Where it's white it will apply the texture. Where it has shades of grey (if applicable) it will make the texture semi-transparent.

Bump Map: stdMatNormalMapTextureName.bmp - This is the bump map, if you have one, and applies the illusion of a 3D effect if your graphics card can view bump maps.


Good Bump Mapping:

I've whipped up a simple shirt (mostly using Maxis textures) that illustrates good and bad bump maps.

Here's my texture for it, just so you can see what I've done: I've basically just recoloured the Maxis tank top and left the alpha the same, changing the base texture to a nice lavender, and I've added a little pink glitter heart to the front:


To start with... here's examples of bump maps for this top done well, or not at all (and not at all is better than done poorly!):


The effect is subtle - and it's meant to be! But you can see the difference between the bumped and non-bumped shirts...

Proper Bump Mapping: On the one with bump mapping, you can see a bit more of a 3D effect around the neckline and edges for the armholes - and, though it really isn't that obvious, the wrinkles under the breasts are a bit more pronounced on the bumped version.

And here's what the bump map looks like for that (this is the original Maxis bump map for this mesh). As you can see, it's a low-contrast greyscale, with lighter areas where the texture should appear higher or "bumped out" and darker areas where the texture should appear lower or "bumped in."


No Bump Mapping: The non-bumped version has a completely neutral bump map - i.e. none whatsoever, and so it doesn't have that 3D effect around the edges and the wrinkles. However, it has a good texture anyway in those areas, so it's still okay like that.

Here's what its bump map looks like. As you can see, it's a completely solid bucket fill of 50% grey (RGB 128.128.128) which creates neutral/no bump mapping whatsoever.


Bad Bump Mapping:

Just as important as knowing what good bump maps look like, you need to know what not to do!


Over-Contrasted Bump Mapping: The shirt on the left uses the same base bump map texture as the properly-bumped outfit done above, but the bump map has way too much contrast. This results in an over-bumped effect - the 3D effect from the bump maps looks patchy and pebbly, and makes the shirt look worse than if it had no bump map at all.

Here's its texture... compare it to the proper bump map texture shown above: same basic pattern of lights and darks, but here, there's a much bigger difference between the light and dark areas, so it creates a much more dramatic bumpy effect - too dramatic.


Desaturated Bump Mapping: The shirt on the right in the above examples shows what many beginners do when they start creating bump maps... they get their texture all finished, they copy it over to the bump map texture, and then just desaturate it, making a greyscale version of their texture, and save it just like that... and you can see that on most of the shirt, that's fine, and you do still get the 3D effect around the edges of the neckline... but where the glitter heart is on the original, well, that's just all wrong: you end up with a bumpy mess there, when in a real shirt with a logo or image on it like that, it generally wouldn't have any 3D effect in that area at all. If it did have any 3D effect via bump map, the whole heart would be ever so slightly raised from the shirt texture to give the appearance of a decal or patch - so you would just have the whole heart area -very- slightly lighter than the rest of the shirt in that area, a bucket filled heart, if at all.

For band pictures, text, prints in fabric, etc., you would not have any difference in the bump map in those areas as they would not truly be raised off the surface of the shirt, but printed on.

Here's that bump map... as you can see it's just a straight copy of the texture, in greyscale... which would probably work okay for this shirt if there were no heart, but because of the heart, it makes the bump map look very wrong. The dark edge around it makes it appear there's a "trench" around the whole thing, and where the glitter is light, it looks higher than the areas where the glitter is darker, creating a bumpy mess which just looks plain bad.



So how do I make a good bump map for a new texture?

If you're made a completely new texture (you're not modifying a Maxis or custom one) and you want to make a new bump map to match... The very first thing you need to do is THINK about it!

Put your brain to work examining your texture. Look at things like pockets, buttons, zippers, seams, wrinkles, pleats, belt buckles, ties, overlapping edges of fabric, etc... Anything that his higher or on top of things should be lighter on your bump map, and anything that's lower or underneath other things should be darker.

You really don't have to get fancy: your bump map doesn't need as much detail as your texture, and you can basically make it a 50% grey (again, RGB 128.128.128) bucket fill with a few areas of light and dark for the things you want to have bumped up or down.

You can always copy your texture to your stdMatNormalMapTextureName.bmp file and basically trace over it, selecting areas that need detail on the bump map and adding their light or dark colour to new layers, then backing the whole thing in 50% grey for the neutral areas.

You may be able to combine the (usually wrong) technique of desaturating your texture with that tracing technique, depending on what your texture looks like... Make a copy of your texture, desaturate it, and then lower the contrast until it's a bit "fuzzy" looking - it shouldn't be as clear and crisp as it was originally. Then, in any areas that would be made wrong in bump mapping (like, say, an area that has a plaid fabric print), you can select those using your graphics editor's polygon select tool and simply bucket fill them with 50% grey.

Remember, though - a good bump map can't make up for a bad texture, and many people cannot view bump maps anyway - so your outfit should look good, with proper shading and highlighting, without bump maps... the bump mapping should add to the effect created by your texturing, not rely on bump mapping where your texture falls short.

What do I do with the bump maps if I can't view them?

Simple: don't make any bump maps. Trying to make bump maps when you can't view them is like painting blind: you may think you're doing okay but you really have no idea whether you are or not. An outfit should look properly shaded and highlighted without bump maps - and indeed, if you do your texturing right, you shouldn't really need them!

So just do the neutral/no bump maps method: bucket fill the stdMatNormalMapTextureName.bmp texture with 50% grey (RGB 128.128.128) to create a neutral/no bump map, so you don't have to worry about your bumps being wrong or weird looking for those that can view them. Just remember to do this with each project - if you can't view them it's easy to forget!

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Advertisement
Lab Assistant
#2 Old 30th Jan 2008 at 8:29 PM
Wow, thank you so much! I always wondered how people made their clothing so detailed, while mine looked a lot like clay that was carelessly stuck onto a grey doll! Thank you so much!!!!!

P.S. I think this is the very first comment Yay!
Test Subject
#3 Old 2nd Feb 2008 at 4:37 AM
Thank you, for another easy to follow well written tutorial.

Love comforteth like sunshine after the rain.

William Shakespeare
Forum Resident
#4 Old 15th Feb 2008 at 12:16 PM
a couple of question, please
thank you HP for this exaustive tutorial
I have a couple of questions, to understand better why and when it is used (I am playing with bodyshop, SimPE and milkshape these days to see if I am able to do something using new textures ):
1. most important thing is using a good texture: how do I understand if it's good, from fabric details? I download from web quite a lot, trying to choose, but it is not always so immediate.
2. for a new recolour I create my stdMatNormalMapTextureName.bmp with my texture, adding shadows and highlights to give her depth
3. and then do I create bumpmap only if I want to add more depth or always?
I've seen, and you wrote it, that some clothes have no bumpmaps at all: why this? is it because the stdMatNormalMapTextureName.bmp was already good?
I ask you also because if I create a new mesh (I was able to create a new mesh thanks to yours and Tig's tuts at last! ) and then the stdMatNormalMapTextureName.bmp, I do not know if/when I have to create also bumpmap (and, maybe, the envcube too): may you make me understand better?
thank you very much
Test Subject
#5 Old 22nd Feb 2008 at 12:29 AM
"10Q", Hysterical, for a wonderful and in depth tutorial. My machine displays bumps but I didnt realized it. I've read some of the other tuts on bump's but yours is the best.
1 question I'd like to ask, how do you get the bump maps in a package that doesn't have one? If there is a tut on it already could you give us the link.

So where DO you put the postage stamp on these E-'MAIL' thingies
world renowned whogivesafuckologist
retired moderator
Original Poster
#6 Old 22nd Feb 2008 at 8:47 AM
Alisar - Thanks for the questions... I'll do my best to answer...

1. most important thing is using a good texture: how do I understand if it's good, from fabric details? I download from web quite a lot, trying to choose, but it is not always so immediate.

Well, I personally prefer to not photoskin most outfits - I may use bits of textures from photos but usually that's just for the fabric texture itself - the print on the fabric, or a few details like buttons or something like that, rather than the whole texture itself. The idea with starting with a good texture is that your outfit should look good without bump mapping because many people can't view bump maps at all, so you should make something that will look good for everyone. Make your texturing first, and then decide whether it looks good - proper shading and highlighting, all the details in the right place, folds and things should look correct even when you turn the model to the side, etc... looking at some of the later Maxis clothing like from H&M is a good reference for what one should be going for in terms of "good" with textures - zooming in on those details and then comparing how much detail they've added to your own textures.

2. for a new recolour I create my stdMatNormalMapTextureName.bmp with my texture, adding shadows and highlights to give her depth
3. and then do I create bumpmap only if I want to add more depth or always?


You don't absolutely have to create a bumpmap for your outfit if it doesn't need it. If it looks really good as it is with just your texturing, a bumpmap may be unnecessary - I've seen several custom outfits that were beautifully done that looked bumpmapped because of their excellent texturing but really weren't - it was just all texture shading that produced the effect. If your outfit doesn't need bumpmapping and it looks right with just texture, you don't need to bother with a bump map - or you might want to do a very very simple bump map, just dumping 50% grey in the bumpmap and adding a bit of lighter spots on only a few areas, like a few dots where the buttons are on a shirt, for instance, just to add a little more depth. It's certainly not absolutely necessary, and as stated above, your outfit should look good without it anyway.

I've seen, and you wrote it, that some clothes have no bumpmaps at all: why this? is it because the stdMatNormalMapTextureName.bmp was already good?

Well, some Maxis meshes simply didn't include bumpmapping to begin with - either due to lack of time to add that additional detail, or for the reason you state - because the texture already looked good and they thought they didn't need it.

When it comes to new meshes, because we have the newest version of Unimesh, our new meshes can always support bump mapping. Personally, I just clone from a mesh that has bump mapping so it's enabled from the start, but you can add bump maps to your new meshes if they don't have it automatically, or to Maxis meshes that don't already have them by using this tutorial: http://www.modthesims2.com/showthread.php?t=47109 - it says it only works for Maxis meshes but it actually works for Maxis meshes -and- any custom meshes made with Unimesh - it's just an old tutorial.

The envcube stuff is a bit different - for stuff like that you would want to clone from a mesh that already has it for sure (and there's not many, I think mostly from Nightlife, and there's a base game one for teens with it) so it's properly enabled in your custom package.

selrebnor: Check out the last bit of my answer to Alisar above for info on that and a link to the tutorial to do it.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Scholar
#7 Old 22nd Feb 2008 at 9:59 AM
Great tiptorial ! HP, you're a Good Guru. An insignificant detail, though : isn't the complete neutral grey R:127 G:127 B:127 ? as we start to count at 0

Understand Material definition-TXMT and customize the look of your objects ! This way

"The longer something exists in this world, the more wear and tear it will have."
world renowned whogivesafuckologist
retired moderator
Original Poster
#8 Old 22nd Feb 2008 at 5:11 PM
pixelhate - The neutral grey used in Maxis bumps is 128.128.128 - while Photoshop tells me 50% grey is 149.149.149 - oi, so confusing. I don't think it'd matter too much if you used 127.127.127 instead, and actually bump mapping seems to be relative - if you notice on the example I used above under "Proper Bump Mapping" the actual relevant parts of the garment are much lighter than 128.128.128 but the whole thing doesn't look significantly bumped-up. Since Maxis uses 128.128.128, that's what I use - and I like even numbers, so we'll go with that.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Scholar
#9 Old 23rd Feb 2008 at 7:32 PM
Thanks for the precision, probably not the same grey if you work in 32 or 24 bits. It's all relative ... and insignificant.

Understand Material definition-TXMT and customize the look of your objects ! This way

"The longer something exists in this world, the more wear and tear it will have."
Forum Resident
#10 Old 24th Feb 2008 at 1:30 AM
Default Thank you
Thank you HP. I will try and do my best to have a good work with highlights and shadows so to avoid bumpmapping, in view of the fact that many people cannot read it. thank you also for suggestion about what can be a good texture and what material downloaded from the web is worth be taken. bye, Alisar
Test Subject
#11 Old 10th Jun 2008 at 10:47 PM
^.^ I love this. Helps a lot. Much thanks.
Test Subject
#12 Old 3rd Feb 2009 at 8:15 PM
I have a question. Can a bump map be made for a texture that doesn's already have one? I made a full face makeup (modifying the Maxis "mime" texture) halloween mask recently and I need some parts to look a little less flat. My shading is pretty good but I think it would look better with a bump map. I'm trying to make a zipper look more 3D. Do I need to use SimPE or something? Or is it even possible?
Forum Resident
#13 Old 1st Jun 2011 at 4:10 PM
Thanks for this tutorial Hp. I've been trying to know more about bumpmapping& you cleared up some of my questions ,Thank you.. However, I just wonder, you mention the lighter grey raises & the darker lowers but in my experiment ,I get the oppsite results. I sometimes use dark greyline along withalighter greyalong side of it to highlight a contour for eg. swimsuit& it shows a raised edge on the contour. In another instance a lighter color did show a raised surface when I was trying to make a seam on some tights behind legs. Upon trying to recolor it,I found out the same lighter seam had lowered those seams so I made it mach darker to raise the seam. Strange right? How is this possible.
Back to top