Texturing in 3DS Max.
-
The next step, you can either do however you are used to doing it, or you can use my tutorial + tools to do it, it doesnt matter. in the case of stations/bases, as long as the model can be sur spliced for hitboxing etc, its not a problem.
================================================
Preparing the CMP for exporting/ Sur splicing.
Right. I thought if im going to write the tutorial explaining how to texture, i might as well go all the way and explain how to prepare the CMPs for Sur splicing. Problem is, its kind of hard to explain with words, but i will try my best to explain it as simply as i possibly can.
Preparing the groups:
Right. This part requires a bit of your own judgement and decision making. You need to look at your model, and rightly guess how many different CONVEX primitives (ie boxes/cylinders etc) will it take to make a fully fitting, as accurate as possible hitbox for your model. Bear in mind, if you are creating a station etc, you have not got any other choice but to use the Sur splicing method to create the hitbox anyway, so youll have to go through all of this process anyway.
Looking at this model, i approximate that it would take me about 14 primitives to hitbox, assuming i wish to make the hole in the hitbox like the mesh has if you can spare mesh groups , then go for it, but remember, the hitbox must cover 100% of the ship before you worry about details for the hitbox. The next step involves breaking the model up into 14 groups accordingly.
http://i84.photobucket.com/albums/k13/gurjiv/admin/24.png
REMEMBER: due to the way the cmp exporter is currently setup, we are limited to 18 mesh groups per cmp. There ARE ways to pass that limitation, however, that requires alot of work, and ill let you master the basics before i begin the next step for obvious reasons.
To split a mesh in 3ds max into different groups, you need to make sure your model is already an editable poly. Once you make sure, you need to go into polygon mode, and start selecting ALL the faces you wish to detach from the main group to make a new group
http://i84.photobucket.com/albums/k13/gurjiv/admin/25.png
As you can see in the image above, after you select all the faces, you need to hit the button on the right hand side option set called detach. It will open a new window prompt, asking you to give the detached mesh a new name. MAKE SURE YOU GIVE IT A SENSIBLE, UNIQUE NAME. Do NOT call it box 1, instead try something like… central body. Furthermore, AVOID USING NUMBERS WHEN NAMING THE GROUPS. I will explain why further on.
http://i84.photobucket.com/albums/k13/gurjiv/admin/26.png
As you can see, i ended up with 15 groups. Remember, the initial approximations do not necessarily have the be exactly how it turns out- that depends on how you wish to split the mesh up, as long as the hitbox which you make covers the mesh as best and as accurately as possible.
The next step is for you to download this script, and put it in the Scripts folder for your 3ds max 9. While youre at it, download this obj exporter for 3ds max (this is slightly different than the wavefront obj exporter, but works 100%). To install the exporter, just drag the icon into one of your viewports and drop, it should automatically install it.
http://www.mediafire.com/?g2wzjmzuzdz
The next step is important, pay attention. You need to re-arrange the groups there according to how they are connected. Remember, the each mesh you group must be connected in some way to another group, and as such you need to set them up in the window. Now, Click on the button on the top tray that when highlighted says Schematic view. This button is on the left hand side of the material editor button. Once open, youll see a new window with loads of blue/purple coloured buttons. As you can see in the image below, ive re-arranged the groups properly so each group is touching the next group in the cmp
http://i84.photobucket.com/albums/k13/gurjiv/admin/27.png
Before you do anything, you need to press the button called connect (third button on the tray), followed by the hierarchy mode button (sixth button on the tray. Once youve done that, you need to click on the blue button on the right hand corner (in this case, exhaust three), drag your mouse whilst clicked onto the next blue button (exhaust two) and drop once your mouse is above the exhaust two box as shown below:
http://i84.photobucket.com/albums/k13/gurjiv/admin/28.png
You will need to do this from right to left for each box, so you click, drag and drop onto next box, then from the box you dropped on, you click, drag, and drop onto the next box until you have something like this:
http://i84.photobucket.com/albums/k13/gurjiv/admin/29.png
Next step involves using the plugin you just downloaded from me. Close the schematics window, click on the option called MAXscript, click on the option called Run script, it will open a new window. Select the script that is called detachbyID, and click open. This will open a new window. MAKE SURE YOU HAVE THE SAME SETTINGS AS I DO AS SHOWN IN THE SCREENSHOT BELOW:
http://i84.photobucket.com/albums/k13/gurjiv/admin/30.png
If everything is as it should be, youre ready. Click on DETACH button. This script will detach the meshs groups and prepare the cmp to be just like how the cmp would be in milkshape (3ds normally doesnt do this due to being far superior than milkshape etc, but using this script will help you when you export your model to milkshape to prepare the cmp)
What you end up with after detaching is a multicoloured mesh. Click on the schematic view option again, and youll notice instead of the initial 15 groups you had, youll have alot- more now. What this script has done is it has split the mesh up into subgroups per mesh. In milkshape, you get groups based on what texture is applied per face. This script has done exactly that, split up the sub groups inside each mesh according to the textures applied to the faces, but it has kept your overall 15 groups total. (this bit may be a bit hard to understand, and i cant exactly word it properly, if you still need further assistance understanding this part hit me up on skype [Gurjiv.singh is mine, afaik] and ill try and explaining it as best as i can).
What you need to do is re-arrange the groups again if need be ( i will have to) so that each subgroup is grouped together before you move onto arranging the next mesh. Hopefully the screenshot will be able to explain better:
http://i84.photobucket.com/albums/k13/gurjiv/admin/31a.png
http://i84.photobucket.com/albums/k13/gurjiv/admin/31b.pngAfter you re-arrange the groups, you do the same step as before. You select the connect button, then hierarchy mode button, and from right to left, start connected all the groups again. Close the schematics mode window once youre done connecting.
http://i84.photobucket.com/albums/k13/gurjiv/admin/32.png
Congrats. Part one of the tedious journey is complete. Next, you need to export the mesh for the second step to creating the cmp via milkshape. Click on file -> export, and in the options, select the new obj format (youll see it right below the wavefront obj option in the dropdown), give it a name, and click export. When you do so, youll see a new window opens up. Make sure the settings are EXACTLY THE SAME as shown in the screenshot below:
http://i84.photobucket.com/albums/k13/gurjiv/admin/33.png
http://i84.photobucket.com/albums/k13/gurjiv/admin/34.png–---------------------------------------------------------------------------------------------------
Exporting to Milkshape, then exporting as a CMP
With the mesh now exported as an obj, you can save your work (remember, save copy as) and close down 3ds max 9. The rest of the work involved will be done in milkshape.
Open milkshape. Click file -> import, and click the option wavefront OBJ. Select the file you have just exported from 3ds max. Hopefully the model will open with all of its groups, texture mappings etc intact as it should be. Remember to re-orientate your model accordingly (for example, i had to rotate the model after i selected everything [control + A] along the x axis, 3 times by 90 degrees [or once, -90 degrees], whichever strikes your fancy).
Once you rotate the model, you should make sure it is centered correctly. With the model selected, click the move button. In the dropdown, change the option from relative to absolute, and hit move. This should ideally ensure your model is centered correctly.
Open the textures you have applied to the mesh. Click on the materials tab, and you should see the names of the textures you used. Check the next screenshot explaining what to do next:
http://i84.photobucket.com/albums/k13/gurjiv/admin/35.png
Make sure your model is scaled/sized as you wish it to be before you prepare it to export the cmp. Once you do that, and are happy with everything and just want to get on with exporting the mesh as a cmp, you need to do the following.
Due to the cmp exporter being kinda broken, the scale down option
doesnt work. The way ive learned to negate this is by scaling the model uniformly along the origin by 92 along all 3 axes. In order for you to do this, press control + a, selecting your entire mesh. Click the scale option, and for all 3 axes, change the value from 0.0 to 92, and change the checkbox option from center of mass to origin, and hit scale.http://i84.photobucket.com/albums/k13/gurjiv/admin/36.png
Remember you did all that group splitting up in 3ds max? Well, nows when it becomes important. Grab a paper and pen, and get ready to do some counting and jotting down numbers.
Click the option called groups, and in there you should see a list of all the groups you have. Remember, in the end before you exported the mesh in 3ds max, i had a grand total of 15 different mesh groups. So you KNOW that youll have 15 meshes in total, but the number of sub groups per mesh will vary. Go through the list from top to bottom, jotting down how many groups are per mesh.
Going by my example, this is how i count them:Nose_tip02 = 1
Nose_top02= 1
Center_main02 = 1
Nose_bottom02 = 1
Nose_fin02 = 1
Center_behind02, center_behind03, center_behind04 = 3
Top_towers02-1
Center_bottom02 =1
Central_body02=1
Bridge_top02= 1
Bridge_bottom02= 1
Engine02=1
Exhaust_one02=1
Exhaust_two02=1
Exhaust_three02=1As you can see, there are 15 total groups, but the number of SUBGROUPS varies per mesh. (the reason there is mostly 1 for all of the meshes is because i never really textured the model completely. Had i done so, id have a different value than 1 for all the mesh groups, something like the mesh called center_behind, which has 3 subgroups. Now that you know how many sub groups there are, you can prepare to export the cmp.
Click on file, export, export as cmp. This will open a new window. Click the new button, to make a new cmp, give it a unique name, and click okay. Click on the back to front orientation. Where it says number of groups, change that to the number your model has (in my case, 15, so i change it accordingly). In each of the group quantities, you change the values to however many sub groups are per mesh. I will show this in the screenshot below.
http://i84.photobucket.com/albums/k13/gurjiv/admin/37.png
http://i84.photobucket.com/albums/k13/gurjiv/admin/38.pngAfter you export it, when you open the cmp via hard cmp, if you did everything correctly, youll have a proper cmp ready for sur splicing to hitbox.
–----------------------------------------------------------------------------------------------------
Thats the end of it. questions/comments/criticism/flames (hopefully none ) welcome
-
Pictures in the first post are not working…
-
Excellent work, frozen
Any chance of you to upload this as a .pdf so we can download it?
-
I’ve been busy with a wedding for the past week now, hence me not paying attention. I’ll get you the .PDF version done tomorrow and posted here asap (not home atm), and ill fix the links as well.
glad people find it useful.
-
It’s an awesome tutorial, FB. Well done man and thanks for taking the time to write one.
-
StarTrader wrote:
Excellent work, frozenAny chance of you to upload this as a .pdf so we can download it?
heres your .PDF. apologies for delays, been caught up with stuff.
-
Very many thanks!
-
@frozen:
I downloaded the importer pack for obj but it doesnt work.
The scripts are ok, but the dle files dont want to cooperate. I tried to drop them into a viewport, also tried to copy them into stdplugs, and plugins dirs, but when i start 3dsmax it says: “failed to initialize” (gw_objio.dle), i tried all of 3 versions of this .dle, i got same result. -
sorry for the late reply mate, been busy with uni etc.
what version of 3ds you using, 9 i presume?