Replies: 20 (Who?), Viewed: 40462 times.
Lab Assistant
Original Poster
#1 Old 2nd Feb 2005 at 9:57 AM
Default Tutorial: How to add bump maps (normals) to a genetic nude skin (v1.0)
Tutorial: How to add bump maps (normals) to a genetic nude skin (v1.0)

Below I'll describe the steps to add bump (normals) maps to a genetic skin package created in Bodyshop.

For those of you not familiar with bump maps, or more correctly, normal maps, they are a way of making a 3d object appear to have more dimensional detail than it really has by creating the illusion of minor bumps, holes and crevices in the object. What makes a bump map "bump" more realistic than one simulated by drawing shadows and highlights on a texture is the fact that the shadows and highlights on a mapped bump will move and change according to the light source direction.

You cannot use this technique to create major protrusions or holes, it is suited only to smaller lumps and hollows that would not normally affect how the object looks in profile - don't expect to be creating 3D male genitals or larger breasts, this has to be done by adjusting the mesh.


First of all a few things you should be aware of...
----------------------------------------------------

1.) Any clothing that has a bump map of it's own will override and suppress the skin bump map. This goes for any type of clothing regardless of transparency - swimsuits, everyday, underwear, etc. Usually this is desirable (see 3 below) but if you have put a lot of effort into bump mapping arms and hands it may disappear with some clothing. The good news is that many (perhaps the majority, I haven't counted) of clothes don't have their own bump maps. I am not aware of any way around this except to use a different clothing outfit or create your own clothing that doesn't have a map.

2.) Your system may not be capable of displaying bump maps at all. This is usually a graphics card issue. Any DirectX 9 compliant (note "compliant" not necessarily "capable") video card should be able to display bump maps but some users do have problems getting the game to recognise this fact. This thread might help http://modthesims2.com/showthread.php?t=37807

You might like to verify that you can actually see bump maps by doing some tests to add extreme bumps to some bump mapped clothing before you spend too much time on skins.

3.) In some circumstances, depending on the clothing mesh used and the presence or otherwise of a clothing bump map, your skin bump map may be projected onto parts of the clothing. It can be quite disconcerting to see a belly button (or worse) in the middle of a formal gown! I am not aware of any way around this except to use a different clothing outfit.

4.) Once you have added normal map textures to a clothing package you will not be able to adjust the base textures in Bodyshop without having to manually re-add the normal maps again. Bodyshop will load and export a normal mapped skin package (it will even thoughtfully export the normal map bmp files for you) but it will crash when trying to re-import. There is a way around this however as it is not necessary to use Bodyshop to update your base textures.

5.) This tutorial does not cover in detail how to create a normal map using Photoshop, or how to use the nVidia Photoshop Normal Map authoring plug in. If you have problems with these I won't be able to help you as I am not a Photoshop expert and have never bothered to read any documentation on the nVidia Plugin - it just works for me so I don't question it! You may find some useful info by browsing the forums here at MTS2 but you may also have to go to nVidia or Photoshop based sites for help if you get stuck. Sorry about this but I know my limits and would hate to give anyone incorrect advice.

6.) This tutorial also assumes that you have a basic working knowledge of SimPe. If you are uncomfortable about using SimPE it might be best to browse the MTS2 forums for some of the excellent advice that is already available on how to use this utility.

7.) If you plan on releasing your creations PLEASE point out to potential users/downloaders that you skin uses a beta technique for bump mapping and may cause problems in the game. It would also be useful to make people aware of points 1, 2 and 3 above so that you don't get plagued with “it doesn't work” messages!


OK that's the disclaimers out of the way. Now lets get to the nitty gritty...

Hang on, you're going to need a few things first.


Here's the shopping list;
-------------------------

Sims2 (duh!)
Sims2 Bodyshop
nVidia DDS utilities (get them here http://developer.nvidia.com/object/...ture_tools.html) SimPE (latest version recommended, this tutorial assumes a version of SimPE that has the "Build DXT" image option)
Adobe PhotoShop Normal Map and DDS Authoring Plug-ins (get them here http://developer.nvidia.com/object/...ture_tools.html)
Photoshop (not sure what the minimum version requirement is, I use version 7)

The nVidia Normal Map Authoring plugin supposedly works with Paint Shop Pro but it always locks up when I try it. Paint Shop Pro is my preferred paint program so I do all my image editing work in PSP and just use Photoshop to run the plugin. I'm just weird that way

Before you start, please make sure that SimPE is configured correctly to locate the nVidia DDS utilities otherwise you won't be able to use the "Build DXT" option when required. Set the path to your DDS utilities library under the "Extra | Options" menu item in SimPe.



Now we've assembled all the bits you are going to need we can get on and do something creative in Part 2 below.
Advertisement
Lab Assistant
Original Poster
#2 Old 2nd Feb 2005 at 9:57 AM
(Part 2)

Here are the steps:
-------------------


1.) Create a new genetic skin project in Bodyshop as usual. There is nothing special you have to do at this stage.

2.) Modify and save the base skin textures for ages and genders in your skin project as you would normally. Once again there is nothing special about this part of the process. Don't worry if your base textures aren't absolutely perfect at this stage, you will be able to replace them later.

3.) Import your new project into the game. Note we still haven't done anything with the bump maps yet but we'll get there next.

4.) Now, create yourself some bump (normals) maps. To give you a basic idea what is involved....

Create a "height map" image in a paint program (such as Photoshop or Paint Shop Pro) which has the same dimensions as the skin image. If you use mid grey as the background colour you can denote raised areas with paler greys with the highest spots being white, while lower areas are darker grey shading to black. The brighter/darker the shading, the higher/lower the bump/hole. Then use the free Photoshop plugin available from the Nvidia developer website to convert this gray height map.
into a normals map. The nVidia plugin will give you a preview of how your bumps will look under different light angles. The normals image created by the plugin can then be saved as a 'bmp' file for use later.

Remember that you can bump map faces as well as bodies.


5.) Open your recently created skin package file in SimPe. You must open the file from your "My Documents\EA Games\The Sims2\SavedSims" directory, NOT the one in your projects directory. Bodyshop assigns meaningless names to the packages it creates which makes it hard to identify the new package, I just sort the windows explorer view by date modified to find the most recently created package.

6.) In SimPE click on 'Material Description' in the Filetypes list at top left. The Packed Files box will show a list of Material Description entries. Now begins a tedious job, you will need to browse each of these material description entries using the plugin view to find the ones that relate to textures you will be applying your bump maps to.

As you browse each entry, look at the plugin view Filename (the second box down). The file name will contain a bunch of meaningless characters followed by a recognisable name. For example "##0x7f5d4a1f!amface~face_txmt" is the material description for the adult male face texture, "##0x7f5d4a1f!afbodynormal~top_txmt" is the adult female normal body texture and so on. As you come across material descriptions for textures that you need to work with you should do the following for each one...

a.) Look in the properties list for the 'stdMatBaseTextureName' entry and note down the value, it will be something like "##0x7f5d4a1f!0x5fb57312' This value will be useful later on when we are trying to find the correct texture entries.

b.) Next you need to add some entries to the material description properties list that will enable your bump (normals) maps and point to the textures we will be using for them. So, with the 'Properties' tab active, click on the word 'add' (which is off to the right of your screen in the 'Property' box) 4 (FOUR) TIMES. If there is anything currently in the 'name' or 'value' fields when you do this it doesn't matter.

c.) Scroll down to the bottom of the Properties list box and you should see the four lines you have just added, they will either appear as ':' if the name and value fields were blank when you pressed 'add' or you will see some other entry duplicated four times.

d.) Click on the first of the added lines and then type or paste the following into the Property Name field on the right hand side of the SimPE window (without the quotes) "stdMatNormalMapTextureAddressingU" and put the word "tile" into the Value field (without quotes).

e.) Click on the second of the added lines and then type or paste the following into the Property Name field on the right hand side of the SimPE window (without the quotes) "stdMatNormalMapTextureAddressingV" and put the word "tile" into the Value field (without quotes).

f.) Click on the third of the added lines and then type or paste the following into the Property Name field on the right hand side of the SimPE window (without the quotes) "stdMatNormalMapTextureEnabled" and put the word "true" into the Value field (without quotes).

g.) Click on the fourth of the added lines and then type or paste the following into the Property Name field on the right hand side of the SimPE window (without the quotes) "stdMatNormalMapTextureName". In the value field you will need to type or paste the texture name from step a. above. Once you have done that insert the word 'bump' into the name so that it looks something like this "##0x7f5d4a1f!bump0x5fb57312"

h.) Double check that you now have 4 property entries that look like this..

stdMatNormalMapTextureAddressingU:tile
stdMatNormalMapTextureAddressingV:tile
stdMatNormalMapTextureEnabled:true
stdMatNormalMapTextureName:##0x7f5d4a1f!bump0x5fb57312

i.) Click the "Commit" button. You can also choose "File | Save" from the menu at this point but if you do SimPE will reposition the material description packed files list back at the beginning and you will lose where you are up to.

j.) Now resume browsing the material descriptions as in step 6 and repeat steps a. thru j. again for each one that you will be applying bump maps to.

7.) OK, that's the material descriptions out of the way. Now would be a great time to select "File | Save" from the menu as we have finished browsing the material descriptions and don't care about losing our place. Hopefully you now also have a list of texture names that you recorded in step 6.a. What we need to do next is clone some texture image entries so that we can import our normals map BMPs.

8.) Click on 'Texture Image' in the Filetypes box at top left. The Packed Files box will now be showing a list of Texture Image (TXTR) entries. Now begins a second slightly less tedious job, you will need to browse each of these texture entries using the plugin view to find the ones that relate to textures you will be applying your bump maps to. As you browse each entry, look at the plugin view Filename (the second box down). The file name will contain a bunch of meaningless characters followed by "_txtr". For example "##0x7f5d4a1f!0x5fb57312_txtr".

You need to check the characters to the left of the "_txtr" part and see if they match any of the texture names on your list from step 6.a. It is fairly easy to tell if they are likely
candidates because SimPE will be showing you a picture of the texture for each one.

For each texture entry that is on your list, right click on it in the packed files list box and choose 'clone' from the pop-up menu. Don't worry about finding the clone or doing anything with it yet, just concentrate on finding textures and cloning them for now.

9.) Now you can import your bump maps into the new texture image entries you created in step 8. Scroll down to the bottom of the packed files list, the bottom entries will be your clones. For each cloned texture in turn do the following;

a.) Make sure the plugin view is active and insert the word "bump" into the Filename field (the second box down) so that it reads the same as in 6.g. For example "##0x7f5d4a1f!bump0x5fb57312"

b.) Press the 'Commit' button

c.) Right click on the displayed image and select "Build DXT..."

d.) In the dialog that appears, click the word 'open' to open your normals map BMP as created by the Photoshop plugin. Make sure you open the correct file that relates to the particular texture you are viewing at present.

e.) Leave all the entries in the 'settings' area as they are and click the 'Build' button.

f.) After a short pause your normals map image should appear in the plugin view replacing the previous texture.

g.) Click on 'Fix TGI' - I am not sure if this is necessary but it doesn't do any harm to be sure.

h.) Click on the 'Commit' button again. You should probably also choose 'File | Save' again at this point but once again SimPE will reset the packed files list to the top so you'll have to scroll back down and find where you were up to.

i.) Move on to your next cloned texture and repeat steps a. thru i.

10.) When you have processed all your cloned texture entries you are done. Select 'File | Save' from the menu again to be sure and exit SimPe.

Continue to Part 3 to read a few useful tips.
Lab Assistant
Original Poster
#3 Old 2nd Feb 2005 at 9:58 AM
(Part 3)

Testing Your Bump Maps:
-----------------------

Your bump maps should now be visible if you select your new skin package on either BodyShop or Sims2. BUT here are a few things to watch out for;

- If you make use of any of the freely available 'nude' outfits floating around the web in order to see your skin in all its glory you might find that your bump maps are not displayed. This is because whoever created the nude outfit in the first place probably used a clothing object that had its own bump map as a basis for the nude clothes. In this case the nude outfit bump map will override your one on the body (see "...a few things you should be aware of..." point 1. above). You may have to make your own 'nude clothes' by cloning existing outfits that have no normals map as a base.

As an alternative to using 'nude clothes' you could make use of a nudist patch which incorporates a 'get nude' option in a Sim's pie menu. I use one of these that I found in a forum thread on this site a few months back although I can't for the life of me remember what the thread was. The file is called "nudist-simple3.package", perhaps someone will recognise this and point you in the right direction.

- Lighting: Bump maps respond to the direction and intensity of lighting so if your sim doesn't appear to have bumps try rotating them to see if anything happens. Usually any bumps will be invisible if the lighting is full on, they show up better when lit from an oblique angle.


Advanced Tips:
--------------

- If you have multiple textures that all use the same bump map you can point all the relevant material description "stdMatNormalMapTextureName" property values to the same texture image. Then just clone one texture, load your map into it insert 'bump' into the file name and you are done.

- As I mentioned previously, once you have added the normals maps to your skin package you cannot recreate the package in Bodyshop without problems. This makes it impossible to update the base textures. The way around this is to import your updated base textures directly into the package file using SimPe. Open the package with SimPE and display the Texture Image list in the packed files box and browse through them using the plugin view until you locate the one you want to update. Then use the "Build DXT.." option as in step 9.c. thru 9.f except you will be loading your base texture rather than a normals map. Once you get used to doing this it is quicker and more efficient than fiddling around with Bodyshop!

- Try not to overdo your bump maps, less is generally more when designing these. It is easy to create some quite horrible results which can easily be corrected by using less height or depth (use less bright/less dark greys in your initial grey height map image).

******************************************************

If you are still reading after all this you are either a glutton for punishment or REALLY keen to do some bump mapping!

I hope you have success and look forward to seeing some of your creations.

In a document this size there are bound to be some mistakes. I apologise for these in advance and please point them out so they can be corrected.

I'm sure some of the expert SimPE users out there will have better/quicker or more efficient ways of doing things. I am not a SimPE expert as you can probably tell so please feel free to suggest improvements to my techniques.

semloh
Administrator of Loverat's Tea and Underpants
#4 Old 2nd Feb 2005 at 10:07 AM Last edited by RGiles : 2nd Feb 2005 at 10:10 AM.
Moving to the Tutorials forum. Thank you semloh.

It seems to me that the original Bodyshop used Normal maps, and thus the name of them still contains the term. But in fact they do not look like normals maps, just plain simple greyscale bump maps. I think that in the release version of the game the switched away from using the normals map format. Or am I way off base here?

RG
Lab Assistant
Original Poster
#5 Old 2nd Feb 2005 at 10:14 AM
Quote:
Originally Posted by RGiles
Moving to the Tutorials forum. Thank you semloh.

It seems to me that the original Bodyshop used Normal maps, and thus the name of them still contains the term. But in fact they do not look like normals maps, just plain simple greyscale bump maps. I think that in the release version of the game the switched away from using the normals map format. Or am I way off base here?

RG


Yes I noticed this too. I should really test to see if the greyscale height maps could be used instead of importing a normals map. It would certianly make the process a bit simpler for people, however I find the 3D preview generated by the nVidia plugin for Photoshop to be quite useful in visualising how the bumps will be rendered.
Administrator of Loverat's Tea and Underpants
#6 Old 2nd Feb 2005 at 10:51 AM
Yes, I agree. That is a nice feature.

RG
Moderator of Camera Models
retired moderator
#7 Old 2nd Feb 2005 at 10:55 AM
GO SEMLOH!!!!

*hugs the thread*
Test Subject
#8 Old 2nd Feb 2005 at 4:14 PM
Is it possible, one way or another, to use similar methods to creating normal mapping on a Sim's hair?
Lab Assistant
#9 Old 2nd Feb 2005 at 6:11 PM
Thanks for this tutorial. :salute:

.
Lab Assistant
Original Poster
#10 Old 2nd Feb 2005 at 7:30 PM
Quote:
Originally Posted by Helper Monkey
Is it possible, one way or another, to use similar methods to creating normal mapping on a Sim's hair?


I have tried this but couldn't get it to work. When we find out how to enable bump mapping on buy mode objects etc. it may be possible to also enable it on hair.
Lab Assistant
#11 Old 2nd Feb 2005 at 8:28 PM
Quote:
Originally Posted by semloh
I have tried this but couldn't get it to work. When we find out how to enable bump mapping on buy mode objects etc. it may be possible to also enable it on hair.


Oops, I was trying to put a bump map on an object. Do you mean its not possible? Are there any game objects that use bump mapping?

Is the 'bump' part of the filename your notation or does the game look for that?


And for those looking for the Photoshop normals tool, its in -Filter- -nvTools-
(it would be nice if you added this to the tutorial, i had problems finding it)

.
Lab Assistant
Original Poster
#12 Old 2nd Feb 2005 at 10:42 PM
fleabay:

I haven't had any success adding bump maps to objects. I think a few others may have tried and failed also. I am not aware of any in game objects that are bump mapped by default but there could be some lurking around in there.

According to Delphy, and I quote, "Bump maps have to have a section in the GMDC (3d mesh) file and a datalist with bump-mapped normals, which explains why it works on some things (Sims, ground textures) but not on others (Walls, Floors). Eventually we will be able to add a bumpmap section to any 3d mesh in the game, just not yet"

Things may have progressed since Delphy posted this on the 6th January but I haven't noticed any posts about bump mapped objects.

The 'bump' in the file name is just my way of giving the normals texture a unique name. The game doesn't care.
Nearly alive
#13 Old 2nd Feb 2005 at 11:31 PM
I haven`t look much at what objects are bump mapped , but there are some.

The cornucopia is one.
Lab Assistant
#14 Old 3rd Feb 2005 at 12:54 AM
Quote:
Originally Posted by Miche
The cornucopia is one.


Thank you, thats just what I was looking for.

.
Guest
DELETED POST
16th Jul 2005 at 3:14 PM
This message has been deleted by tiggerypum. Reason: ask questions about *this tutorial* only here
Guest
DELETED POST
16th Jul 2005 at 3:16 PM
Default how?
This message has been deleted by tiggerypum. Reason: ask questions about *this tutorial* only here
Instructor
DELETED POST
20th Jul 2005 at 1:22 PM
This message has been deleted by tiggerypum. Reason: ask questions about *this tutorial* only here
Guest
DELETED POST
18th Aug 2005 at 3:58 PM
This message has been deleted by tiggerypum. Reason: ask questions about *this tutorial* only here
Guest
DELETED POST
19th Sep 2005 at 12:26 AM
This message has been deleted by tiggerypum. Reason: ask questions about *this tutorial* only here
Lab Assistant
#15 Old 27th Jan 2006 at 11:18 AM
how does that look like?
Admin of Randomness
retired moderator
#16 Old 27th Jan 2006 at 3:47 PM
A bump map is an extra texture that can make outfits look more 3D, and you can see if your game can display them by looking at this thread: http://forums.modthesims2.com/showthread.php?t=43273
Not everyone's game can display them.
Test Subject
#17 Old 22nd Jul 2007 at 3:37 PM
Is this possible on makeup? i tried and failed miserably
Test Subject
#18 Old 22nd Jul 2007 at 5:26 PM
could somebody please post pictures?
Instructor
#19 Old 9th Oct 2007 at 7:25 AM
Just a follow up after a week of experimenting with this process. Obviously something has changed in later versions of the game or in late generation video drivers. Body Shop crashes on trying to make a 2nd generation skintone with normal maps and the game locks up trying to use those that have been made with the latest versions of SimPE and Body Shop. (see this thread at InSIMenator.net)

To recap what I did:
  1. I made a clone of a Maxis dark (s4) skin tone in Body Shop
  2. I made a recolour of the adult male suit, I chose this clothing because it is a known normal-mapped clothing
  3. I made a recolour of the adult male suit, this time resizing the BMPs in the project folder to 512x512 before importing into the game
  4. I opened the suit recolours in SimPE and extracted/exported the normal maps
  5. I opened the skin tone clone in SimPE and imported the normal maps
  6. I changed the material definitions of all the existing skin tone parts to use a single texture based on the size of the original reducing the needed base textures to 2
  7. I changed the Group, Instance (High), and Instance data of the imported normal maps to match two of the no longer needed base textures
  8. I added normal mapping data to the material definitions
  9. I removed all un-necessary textures.
  10. I saved my work and checked it in Body Shop to see if it would display, it did
  11. I tried to clone the skin tone to make a re-colour edit, it exported all the various files for the skin tone including normal map textures as BMPs, then crashed trying to display the newly exported file
  12. I started the game and checked to see if the skin tone would crash the game in CAS, it didn't crash but locked up. I was forced to use the Windows Task Manager to kill the game.

I am uncertain what it is that causes the lock-ups/crashing, but it is apparent that something significant has changed since Semloh's original work with this.

Image credit: Bloom
Screenshots

I have only one God, Choice. If you remove the right to choose from any equation, how have you improved the world?
Test Subject
#20 Old 21st Mar 2008 at 10:24 AM
Did the same as the previous poster, except that I didn't resize anything.
The nude skin now has bump-maps, but the map is totally out of position, and the optical effect is as weird as in the picture above.

Anybody looked into this any further?
Lab Assistant
#21 Old 24th Mar 2013 at 4:03 PM
I hope I'm not too late commenting on this, but I have adapted these instructions or yours, Semloh, and have successfully added a working normal map to a bed. Thank you very much.

PS: I, too, would like to see a picture of a bumped/normaled skin tone. Such a novel idea!
Back to top