Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 7th May 2006 at 10:29 PM Last edited by Echo : 11th Sep 2008 at 12:39 PM.
Default Tutorial on UV mapping and texture baking for 3DS Max
Part 1

This tutorial is meant for 3ds max users 5 and above, although many other applications may have the same ability. Maya, Lightwave..


Introduction;

This is how to show quality textures as they were intended to be displayed using UV 'texture baking' and also through individual polygon applications.

Some of you will have heard of this term being used in accordance with making skins. (UT2003, Doom3, Half-Life2...) Skins are multiple character textures that have been combined into one. Although commonly used for characters, this method can be used with any object you desire.

-------------------------------------------------------------

Overview of texture baking;

Texture baking is a fast and efficient way of displaying many complex textures at once. This can be utilised for producing automatic texture maps (UV maps) without the hassle of seperating all the parts and making seperate maps for the complex parts of an object.

Texture baking is just like standard UV mapping and can include many levels like glossiness, specularity etc. All these levels if some of them are present in your scene can be included into one UV map or they can be seperated if needed.

Usually only the alpha texture 'silhouette' is kept in a seperate 'channel' or map.

--------------------------------------------------------

Overview of polygonal application;

Texturing individual polygons is used as a stand-alone procedure or in combination with texture baking/UV mapping.

This method involves picking a polygon, triangle or face depending if you are working in edit-poly or edit-mesh then applying a texture to it by dropping or assigning one from the material editor onto a specific polygon that has been selected.

Every single polygon or visible face on an object can have a different texture with different parameters. Although this would be time consuming, processor intensive and not really required it is possible.

Usually a mesh consists of a few different textures although polygons in the same region will share mostly the same texture which allows for better rendering speed and a predictable outcome.


--------------------------------------------------


Now we have a basic understanding of these procedures lets get started!

Texturing and rendering a car mesh;

With many different seperate parts it would be major hassle making individual maps for each part then editing them in a graphics program for the final touch.

Instead we are going to use polygonal texturing, UV mapping and texture baking to provide us with a good quality result

Before diving in and plastering textures around your model just sit back and have a good look at your model and make sure firstly that you are finished modelling!! Then select all the polygons and apply a basic level 1 smooth to the surface. Note whether there are any dark patches on your model as these areas will not reflect light or appear correctly when finally rendered. To remove dark patches and areas of unconsistent smoothing requires making polygons planar (flat). It is essential that you prepare the surface correctly as these faults are not as visible after textures have been applied.

If you are unsure, see attactment 'Planar Polygons'.

Once you are satisfied with the smoothed look of your model at all angles it is time to proceed to texturing...

Texturing parts (groups)

Please see the attatchment 'Grouping' to give you an idea of how many groups and what should be seperate on your car model.

The best method and surest way to do this is to work with the big parts first like the chassis. Go to the material editor and choose a colour in the diffuse slot. Do not use a texture on the chassis as this will not look right.

Choose a plain colour and increase specularity and glossiness until it appears like gloss paint. Remember to keep looking from different angles in your perpsective or shaded view and do quick renders to see the outcome.
Once satisfied with your first material assign it to the chassis part of your mesh object and do some more quick renders, looking at different angles.

Proceed texturing all your vehicle from the largest part to the smallest, if you are running out of space and need more texture orbs in the material editor you can go to utilites and reset the material editor slots. Don't worry, 3ds will keep the materials that have been applied, they will not dissapear
Once you have covered all the main parts Chassis, doors, wheels, lights mirrors, seats etc it is time to move onto the finer details...

End of Part 1, Part 2 to follow.




----------
Tutorials:Tutorial_on_UV_mapping_and_texture_baking_for_3DS_Maxwiki
Attached files:
File Type: zip  Part1.zip (815.3 KB, 683 downloads)
Advertisement
Part-time Hermit
#2 Old 8th May 2006 at 4:27 AM
Moved to the tutorial forum (and clarified the title to mention that this was written for 3DS Max)
Lab Assistant
Original Poster
#3 Old 8th May 2006 at 8:09 AM
Hi thanks, did try to post this in the tutorial section several times but I was unable to, the site denied me those privleges.
Part-time Hermit
#4 Old 8th May 2006 at 9:26 AM
Yes, tutorials have to be posted on the general forums and moved to the tutorial section by moderators .
Lab Assistant
Original Poster
#5 Old 8th May 2006 at 10:39 AM
No probs, thought someone didn't like me!
Lab Assistant
Original Poster
#6 Old 8th May 2006 at 10:41 AM Last edited by simsfan3ds : 9th May 2006 at 4:59 PM.
Default Tutorial on UV mapping and texture baking for 3DS Max
Intro;

For this tutorial you will only need a very basic understanding of 3ds max or similar 3d software. The idea is to select a polygon (face) from the same object and make it a seperate one to ease the process of texturing. This technique can be adapted to texturing even the most complex geometry.

---------------------------------------------------------------------------------------------------------------------------------------------------

Part 2

Mapping a car stereo;


First extract the file from the .zip you downloaded named "stereo.bmp" and place it somewhere handy.
Next open 3ds or your fav. 3d app and create a box in any viewport, any size with 1x3x3 segments.
Name this box "dashboard".

Right click the box and convert it to an "Editable Poly".
Go into polygon mode by expanding the rollout for "Editable Poly" and clicking "Polygon"
Select a polygon on one side of the box, make sure it is highlighted red.

Go to the "Editable Poly" rollout and click the button named "Detach" (see picture "Detach.bmp" included).
When the dialouge box comes up "Detach as" rename the polygon "stereo" and hit ok, don't click anything else.
Now your polygon is a seperate object!

Open the material editor and select an empty slot.
Click the diffuse button in the rollout of the material editor and double click "bitmap" from the top of the list.
If the diffuse button is not visible you will have to click the "Parent" button to go to the main rollout for the new material.
Navigate to the file included in the .zip you downloaded named "Stereo.bmp" and hit open.
Confirm that the new stereo material is now loaded into the empty slot and that it it visible on the orb.
Select your object named "stereo" with the material editor still open and click the "assign material to selection" button.
Now click the "Show Map In Viewport" button and check in the perspective viewport to see that your new material has been applied to the object.
Once this is confirmed close the material editor and go to the top of the screen and click the "select by name" button.
A list will pop up, there should only be two objects "dashboard" and "stereo". Select "stereo" from the list.
Make sure that you have selected the object only and you are not in sub-selection mode (polygon ,edge, vertices)
Confirm this by looking under the modify rollout tab on the right for the piece selected and see that "Editable Poly" is greyed out.

Now go to the modifier drop down list land select "Unwrap UVW"
The new modifier has appeared above the "Editable Poly" one.
Click the + sign to the left of the new "UnwrapUVW" modifier and expand the selection.
There will be three sub selections here "Vertex", "Edge" and "Face". We only want to use the "Face" function so click "Face" and make sure it is highlighted in yellow.
Once this has been confirmed click the + symbol again (which is now a - symbol) and close the rollout for this modifier do the same with the "Editable Poly" modifier and close that too. Note that even though closed, the selection you made "Face" is still active and the "UnwrapUVW" modifier is highlighted in yellow.
Now go to the rollout for the "UnwrapUVW modifier" and look under the 2nd section called "Parameters".
In "Parameters" make sure that the map channel is set to 1, this means that the texture we are using is going to be on top of all other layers. (we only have one layer)
Now click the first button under "Parameters" called "Edit"
Confirm that a new window has appeared in front of the max UI called "EditUVW's".

- - - - - - - - - - - - - - - - - - - - - - - -

((In the new "EditUVW's" window))

- - - - - - - - - - - - - - - - - - - - - - - -

You will see a green square against a checkerboard pattern, this is the object we are going to texture. At the moment there is no texture loaded so we will have to choose one.
Inside this new window select "stereo" from the drop down list above.
Confirm that the checkerboard background has been replaced with the car stereo picture.

Now left click and drag a selection over the entire green square and make it red.
Next select the 3rd icon at the top left under "edit" called "scale" if you selected it, it will be yellow and depressed.
Hover over your now red square and hold down the left mouse button.
Move upwards to increase the size downwards to decrease and fit the square just {{inside}} the picture.

Now if we look most of the square should be exactly inside the picture except the sides of the square do not meet with the picture and part of the stereo will be missed, this will not do!

Lets change the size of the sides of the square and not the whole thing at once.

Hold down the left mouse button over the scale tool to see a drop down tool bar with three alternate selections.
Select the very next icon down which is called horizontal scale and release the mouse button. To check to see if you have selected the correct one hover over the tool in yellow and the name will pop up

Move your mouse over the still red square and hold down the left button again, this time move left to right and fit the edges of the box exactly {{inside}} the picture to match the top and bottom.
Once it is clear that you have maximised the coverage of your square and that it is snuggly {{inside}} the picture and not overlapping, close the edit UVW's window and you are done!

To see the product of your work click the quick render button in the top right hand corner and there you have a nice new stereo, properly mapped!


---------------------------------------------------------------------------------------------------------------------------------------------------

Part 3 to follow - Combining multiple UV maps into one and finishing touches...
Attached files:
File Type: zip  Part2.zip (416.4 KB, 300 downloads)
Lab Assistant
Original Poster
#7 Old 9th May 2006 at 4:37 PM
Hey simmers.

For those that have been following this tutorial, am about to post part 3 which is a bit more advanced although explainations will be given as to procedures.

If any of you are having difficulty following or completing any of the work please let it be known and I will answer your questions
Lab Assistant
Original Poster
#8 Old 9th May 2006 at 7:30 PM
Default Tutorial on UV mapping and texture baking for 3DS Max
Intro;

This section is involved with finishing the texturing on your model. Combining multiple pieces of the same part into one and retaining the UV information. Assuring a correct conversion from .max/.3ds to .obj for importation of your custom car mesh over the maxis one in Milkshape.

All this ground will be covered (except) for the animation as this is a texture tutorial and also I am unconfident in that area.

---------------------------------------------------------------------

Part 3

Lets start exactly where we left off.

Confirming that your stereo has been mapped correctly;

The car stereo should now be mapped properly. Check this by clicking the quick render button with the perspective viewport active and centred on the stereo.

If you are finding difficulty seeing this in the shaded view, press the select by name function and then select "stereo" from the list. Make sure that all four views are visible then press the button above the one at the very bottom right hand corner of your max UI. This will bring all 4 viewports to center on your stereo. Make sure the perspective view is active (left click it) and press the quick render button.

After confirming that your stereo has been mapped correctly and you are happy with the result it's time to add that piece back to the dashboard and make it all one object again.

Re-attaching the car stereo to the dashboard;

Make sure that you have selected the dashboard and that the "Editable Poly" modifier is greyed out in the rollout for this piece.
Remembering where you last pressed the Detach button press the dialouge button next to "Attach".

Now again a dialouge box has appeared with you model parts. What we are aiming to do is attach our dashboard to the UV mapped stereo and retain all the material information. So select the stereo from the list and click attach.
Now a new dialouge box has appeared with options. We need to select the frst option that is highlighted as standard. (Match material Id's to material.)
Click ok to accept the settings and do a quick render to confirm that the dash is still fully textured and you can see your stereo.

Dashboard and seats texture;

This effect can be achieved with a bump map in the maps section of your selected material for the dashboard or seats. The type of bump map and settings will greatly affect the rendered look. Be subtle with your choices and a good result can be achieved. See the "Seats" and " Dash" pictures included in .zip download.

The pictures included show exactly how to achieve a proper looking mimick that cannot be differentiated from the real thing. Copy the setting and maps that have been used in the material edtior for the seats and dash to achieve this.

These pictures contains all the settings required for the leather of the seats and the plastic of the dashboard. However if you have a different idea and want to achieve another type of material say cloth seats I will not go into this but will say experiment with very low bump map settings and you will not go wrong

Check;

Now we have the dashboard fully textured, if you want to add speakers or other bitmaps to the dashboard repeat this procedure as necessary and the material information will be updated automatically. Go around your model and adapt this technique to mapping the front, rear lights and number plates.

Making a complete map;

Now our vehicle is smoothed and textured properly it is time to produce a complete map of the entire vehicle.

First save your file under another name (?) and then select the largest piece of the vehicle called "Chassis". Under the edit poly rollout press the "Attach" button dialouge again and bring up the list of all your car parts. Hold down the left mouse button and highight all the other pices of your car from the top of the list down to the end. Press the attach button and then match material Id's to material. Depending on the complexity of your textures, ram etc this may take a few seconds to complete.

Once max has finished attaching all your vehicle into one mesh check that you have the final look you need or are wanting for this vehicle by doing quick renders at different angles in the perspective or shaded view.
Also now is the time to quick render all the viewports and see the result that will be in the game.
Save the new mesh as "Ready to Render" and include your vehicle name.

Rendering to texture (baking)

Once satisfied with the final look press the render drop down list at the top toolbar of the max UI (this is between graph editors and customise).
From the list select "Render To Texture".

Internet access is required for this, say okay for 3ds max to check your info.
Now a new window has appeared in front of the UI named "Render To Texture"

Settings for the "Render To Texture" window;

To produce our map of the vehicle we need to scroll down the list to the section called "Output" if this is not expanded click the + symbol to do so.
Now click the dialouge button "Add.."
Choose "CompleteMap" to be able to see the bump maps that have been added.

Now in the same section "Output" just a little further down you will see an empty tickable box saying "Use Automatic Map Size" make sure this stays unticked and select the button that says "512".

Now scroll up a bit to the previous section before "Output" called "Objects to Bake". Confirm that there is only "Chassis" in this window. In the same section at the bottom make sure that the "Use Automatic Unwrap" radio button is selected. This should be as standard.

Lastly go to the top of the new window under "General Settings" the very first line there "Output" and "Path". Choose a save location for your map by pressing the button "...".

Leave all the other settings as is. You have now defined the material rendering paramters for this whole mesh, no more intervention is needed.

Rendering your mesh;

Now here comes the easy part, in the new render to texture window press the render button only once and let 3ds do it's stuff.

In the middle of the screen a small window with progress will appear. The bar at the bottom left of the screen will change quite rapidly also the edit rollout section on the right for the object will change adding a new modifier called "Automatic Flatten UV's"

Once max has finished this process close the "Render To Texture" window and you can continue.

Saving the UV's;

In the rollout on the right for "Automatic Flatten UV's" under "Parameters" clcik the button that says save and choose a location preferably next to the texture file you saved.

Now select your car mesh if not already selected and right click it to convert to an editable mesh. Save the file again under another name "Complete Rendered" or something similar.

Exporting your file to the .obj format;

Select file at top left of max UI and select export, in the new window under "Save as Type" expand the drop down list and scroll down till you see "Wavefront Object (*.OBJ)" Choose this format and enter a filename that you wish. Now click save.
In the new dialouge box (important) make sure that only "Rotate model" and "Texture coordinates" boxes are ticked (nothing else).
Now change the "faces" drop down list to read "Triangles" as this is an editable mesh now. Now click OK, you file has been saved.

Lastly;

Reset max and load you file where the car was still in seperate bits and assign a blank material to every piece you can see and make sure all the parts are the standard clay look (no materials). Now again select every part of your car and convert it to an editable mesh.
Repeat the saving procedures as above and save the file as .obj format again with a different name. This is the file you will use for joints/animation when in Milkshape.

Now it is time to open Milkshape, import the whole orignal exported data container in the .gd5 format for the car you cloned and then import your new saved seperate pieced .obj mesh over that.
Once you are done assigning the joints you need to regroup all the custom parts into one, delete the Maxis mesh and then export your file in the .obj format.

Open your Milkshape saved .obj file in max. Press m to open the material editor and click the diffuse button, select bitmap.

Load your complete saved map in the and assign the material to the selection. Now add a "UVWUnwrap" modifer and load the UV's you previously saved. Then click the edit button in the rollut and choose the comlete map. The checkerboard background texture will dissapear replacing it with your complete map of the car and all the bits will be positioned correctly.
Exit the edit UVW's window and do a quick render.

Once satisfied that all is well export your file in the .obj format again and you are ready to replace the mesh in SimPE.

We are done!
Attached files:
File Type: zip  Part3.zip (260.2 KB, 258 downloads)
Lab Assistant
Original Poster
#9 Old 9th May 2006 at 7:47 PM
Looked on the net and Lightwave, blender, truespace and wings 3d all have the same texture-baking ability.
Test Subject
#10 Old 12th Oct 2006 at 10:11 AM
i love it... im a 3ds user too. so this really came up handy for me.. thanks for your time writing this fantastic tuts..


Nitto1320i
Scholar
#11 Old 12th Oct 2006 at 12:20 PM
you don't need to use milkshape you can do all the texture mapping etc all in max in version 7 and 8.
Lab Assistant
#12 Old 31st Oct 2006 at 10:58 PM
Default 3D Max
Where can you get the program 3D Max do you have a link to it.

I would really like to have it as it is hard to find it in the google search. It takes you to all kinds of 3D max like 3D max studio. ? Not the same are they?

Thank you JM
Lab Assistant
#13 Old 16th Nov 2006 at 4:17 AM
Quote: Originally posted by JM23
Where can you get the program 3D Max do you have a link to it.

I would really like to have it as it is hard to find it in the google search. It takes you to all kinds of 3D max like 3D max studio. ? Not the same are they?

Thank you JM


Are you typing "3ds Max"? add the s in there and see if you get a different result with your google search.
Test Subject
#14 Old 4th Jul 2007 at 6:32 PM
Autodesk 3D Studio Max isn't free... It's professional, and the price is over $1000...

I've used Milkshape 3D with UVMapper, but the objects appeared with the texture wrong in-game...
Test Subject
#15 Old 26th Sep 2007 at 2:40 AM
I am a little confused. I attempted to Export as 'Wavefront Object' but I don't have that option. My version of 3DSM is 6.0.
Instructor
#16 Old 26th Sep 2007 at 7:35 AM
There's no need to use OBJ format for Max users. In it's a boneless object, use built-in 3ds format; if it's a boned object (i.e. clothing or armoire), use smd format - get Cannonfodder smd plugins for that.

Sorry, the tutorial is too long, so I wouldn't comment each sentence, just throw in few bits.
Once you did UVWmap for your object, it's ready to export. RenderToTexture is a way to obtain its mapping, and, if you used procedural maps - to create a usable texture. If you are working with a boned object, don't forget that all of your modifiers should be below Skin modifier.
Most important thing is to uncheck AutomaticMapping On checkbox, or it'll screw your previously made mapping. I would strongly suggest to do mapping by yourself, since this way you can control seams, scale, and layout of pieces. It's absolutely a must to do mapping for clothes by yourself, because the naked parts of mesh (i.e. arms, if you didn't meshed distinctive sleeves) should stay in certain positions, defined by nude skintone mapping.
If you want to obtain the mapping texture:
- change Rendering -> Environment -> Background color to white
- create material with all channels black and Wire checked, assign it to your object
- render Diffuse map
- if you are using smd format, don't forget to assign smdimportmtl material back
If you want to use a texture generated by a procedural map - i.e. Wood - do the same, just with different material
Test Subject
#17 Old 1st Oct 2007 at 2:02 AM
Hmmm, sadly I think this may be over my head. I understand how to use 3DSM fairly well to make shapes & the like and I used to know how to UVW-map shapes I had done but this portion of the tutorial and what you just mention seems to escape me.

Let me show you a few images of what I am doing & see if you might be able to help me pick this apart (if you would - I would be incredibly grateful).

My Object in Perspective View:

Okay, yes I know that I made it fairly difficult (being that it's glass & wood grain) but I figured I would shoot high & see how far I could get.

These are my RenderToTexture settings:


Essentially I am getting all the way up to the point in the tutorial that says:
Quote:
Exporting your file to the .obj format;

Select file at top left of max UI and select export, in the new window under "Save as Type" expand the drop down list and scroll down till you see "Wavefront Object (*.OBJ)" Choose this format and enter a filename that you wish. Now click save.
In the new dialouge box (important) make sure that only "Rotate model" and "Texture coordinates" boxes are ticked (nothing else).
Now change the "faces" drop down list to read "Triangles" as this is an editable mesh now. Now click OK, you file has been saved.


I have no way to Export as the Wavefront Object. By the way, this is my map that was created from the Render to Texture process. Is this the way it should look?



I apologize if the answer is incredibly obvious & I'm just not getting it. I've been wanting to learn modeling & meshing since Sims1 & am determined to learn it -- if it is possible.

Thanks again for all your help!
Test Subject
#18 Old 1st Oct 2007 at 2:05 AM
In addition - I'm not too worried about the glass looking like, well glass. To be honest, I'd just like to get the object working & the mesh applying correctly. I figured if I had two 'types' of texture, I could tell 100% that it is working correctly. I may just end up recoloring it all solid colors to best understand how 3dsm is coming up with that rendered texture map.
Instructor
#19 Old 1st Oct 2007 at 6:16 AM
The table looks quite nice
Quote: Originally posted by callyklein
I have no way to Export as the Wavefront Object.
That's normal - OBJ importer was added in later versions of max, as I've read. Just use 3ds instead.
Quote: Originally posted by callyklein
By the way, this is my map that was created from the Render to Texture process. Is this the way it should look?
OMG 8-[ ]
Yes, that's how mapping would look if you follow the tutorial from first post. But, wouldn't you agree - it's absolutely useless for a recolorer - those loads of dots, with no clues how they are connected?
So, as I said - step off tutorial in first post a bit. First, map it yourself - via UVWMap and UnwrapUVW modifiers - probably Box mapping for top plate and legs separately, and maybe even overlay all legs mappings into one, to save space thus allow higher details. Then, when you go to RenderToTexture, uncheck the 'On' checkbox under 'Automatic Unwrap Mapping', and your own mapping would be preserved. It's near the top of your screenshot.

Then, there's issue with lighter and darker areas in the output, I forgot to mention it in previous post They occur because you added no lighting to the scene. If you really want to render the texture too - not just need a mapping example - add some omni lights to the scene before RenderToTexture, i.e. four at each direction and two at top/bottom, so your object is evenly lit from any angle.

In general, keep in mind that all the steps of this tutorial are not required. It's intended to help you with obtain a basic texture to recolor. If you did UVW mapping yourself, you can simply export your table in 3ds and import to SimPE.

As for the glass - it should be a separate subset and have different material settings - set in SimPE, via changing the following parameters in corresponding TXMT:
stdMatAlphaBlendMode = blend
stdMatAlphaTestEnabled = 0
stdMatUntexturedDiffAlpha = 0.4 (or any other value lower the 1 - this determines transparency)
Reflection-related parameters are also changed usually.
Check the TXMT-related thread for more information about parameters. It may be simpler to just extract a glass material from some other object, and 'adopt' it to yours.
Anyway, ignore whether it looks glass-ish in Max, those settings would be ignored.
Lab Assistant
#20 Old 8th Oct 2007 at 2:58 PM
hello! i just thought i'd chip in because people seem confused about the "export as wavefront .obj" option.
this is a plug-in, which needs to be downloaded and plonked into your 3ds max plug-in folder. i'm afraid i can't remember where i got it from, but a google search should turn up results
Test Subject
#21 Old 12th Oct 2007 at 1:25 PM
Hello I have a concern with the texture of my object, Voila I have to create a coffee table coming from 3D studio max 9 and I to import them in the game sims 2 but concern it is that in the mode of purchases the object and the black here is an pictures




and package ; http://rapidshare.com/files/59594588/test2.package.html

Please help me it makes me a number that I am on it and I can not solve this problem
Test Subject
#22 Old 12th Oct 2007 at 10:59 PM
Good evening to all and all,

I did find I can learn, and I find that the method of Snapshot ... Put things: kler:

I said it because my concern for texture in the way I most purchases I let you judge for yourself



However another small effort needed! The method Snapshot .. Me creates another coffee table "finally the same" So it is that I find myself with 2 coffee table and the oldest news for the ancient greenhouse me it is nothing but the new yes: chees: My knowledge but if c'est comme ca that I must lose all my creations for the game because if so I wonder if there is no other less: tooth:
Lab Assistant
#23 Old 20th Oct 2007 at 9:48 PM
i tried following this tutorial but i just found it way too confusing - i know this is a pretty cheeky thing to ask seeing as you've gone through all the trouble to write this for us all, but would it be possible to explain this method on a simpler object than a car?
Back to top