This is a guide to texturing, rigging, and exporting a mesh from any version of Max past 8 to Sins of a Solar Empire, as the stickied guide is incomplete, lacks info on 3DS, and is rife with grammar and spelling errors. I wrote this for myself and some of the modelers and other staff because I had to work through a lot of really dumb stuff nobody's covered (such as point origins) that frustrated the hell out of me for days, and realized you guys might get some use out of it.
I assume your model is at least UVmapped for the rigging section, if not skinned. To export from Max 9, you will need Sins Tool. The 2.0 version is buggy, so grab the 1.1 version here and put it into Max's /scripts/ directory. The Convertdata utility that comes with Forge Tools is recommended but not required.
update 2/11/12: You no longer have to use convertdata from the command line, but you can if you want. The recommended utility is now Sins Data Converter, which can be found here.TEXTURINGFILE FORMAT: Everything is in .dds. You can get the DDS plugin for Photoshop here.
EXPORT SETTINGS:
I export using the following settings in Photoshop:DXT5 ARGB 8 bpp | interpolated alphachoose GENERATE MIP MAPS in the mip map generationEverything should be a power of two for mipmaps to work correctly. If you don't follow this rule, things will often have weird illumination.
MAP TYPES:
Diffuse map: regular skin, this has colors and stuff! this needs to be ARGB or at least RGB. Alpha channel lying on top of it in the same file is team color. Black is none, white is some. Normal/Bump map: This is greyscale, so you don't need to mess with any other channels. Black is 'lower'/indented, and as you get closer to white you get 'higher'/extruded.Data map: This is ARGB. Each channel controls a different effect. Altogether, they don't look like anything, but it's a convenient way to let the engine know what parts of the skin to apply post-processing to. The "channel" colors have nothing to do with red green or blue, they're just ways to separate each effect.Red channel is the specular map. This must be greyscale, black is "none". Green channel is lights. Intensity controls how bright stuff is.Blue channel is reflective. This should be used sparingly and can be used for cockpits, metal bolts and other stuff with low intensity. The reason I say this should be used sparingly is it is almost like a mirror, and a well formed specular map will do a better job with light effects than painting this everywhere will.And finally, the alpha channel on the data map controls bloom. For the most part anything illuminated to max with the green channel (engine halos, large light structures) probably should be given bloom.RIGGING & EXPORTING
Prepping the model for export
The first thing you gotta do is open your model. To prepare your ship for Sins, you'll need to rotate it so that the front of the model points up. (click the mesh, then right click anywhere and hit Rotate). You'll also need to center the ship (do the same thing, but hit Move). The "cross" on each view shows where the origin is, and that point will be the "center" of the ship when exported. If you don't orient the model correctly, you will end up zooming into empty space in game.
Creating your points
After that's done, hit the Create button, then the Helpers button on the side panel on the right and click Dummy.
You can then drag your mouse out in any of the views to create a dummy box. This box defines where the given effect will start (a weapon muzzle, or exhaust, or what have you) - specifically, the pivot is the start point for the effect. You don't have to be too precise here, you can move it around later. Move, rotate, and scale the dummy until it goes where you want it to go. This scaling step is only for your own housekeeping - the box could be three times as large as the model, but keeping it small makes it easier to figure out where the pivot is, and therefore where the effect originates. When you're all done, move on to the next step.
You're probably going to need more than one point. To duplicate a dummy, select the dummy and hit ctrl-v to paste. Hit Copy and make sure the name is what you want (3DSMAX adds a number to the end by default). You can repeat this step for all the points (weapons, abilities, exhaust, etc).
Then move, rotate, and scale this one. You can repeat this step for all muzzles on the weapon.
Naming your points
In the name and color box, rename each dummy. Exhaust should be called 'Exhaust", ability hardpoints should be called "Ability". Weapons start at Weapon-0 and go up. A weapon with multiple muzzle points will have the same name. For example, let's say there's two muzzles on one weapon, so we'd call them both Weapon-0. If we had two weapons with three guns each, we'd do three Weapon-0s and three Weapon-1s. If you do more than one weapon, exhaust, abilities etc all at the same time, obviously name them differently.
You can speed this process up with lots of points by using the batch rename command. Select all the points you want for a certain name (all exhaust, for example), then go to Tools -> Rename Objects. In "Base Name", specify the name you want all the points to have, then hit Rename (not enter) and all those points will share the name you specified.
Orienting your points
This next part is pretty important. If it's skipped, weapon effects may not show up, and exhaust points will be sideways, backwards, etc. Two icons over from Create is the Hierarchy button. It looks like a box with three smaller boxes below it. Click this button, and hit Affect Pivot Only. Select one or more dummies and rotate them until the blue arrow is pointing the direction you want each dummy to fire. For example, rotate your Exhaust dummies until the blue arrow points behind the ship. The green arrow should also be pointing up relative to the blue one.
Linking your points
Now we're going to link the dummies to the model. If you don't do this, you won't get anything. Hit H to bring up the Hierarchy viewer, and select all your dummies (make sure they're named correctly there too). After that's done, all your dummies will be selected. Close the viewer and hit Select and Link. This button is right below the Tools and Group pulldowns on the main menu, and to the right of the rotating tools.
Click on one of the selected dummies and hold the mouse button, then drag it over the body of the mesh. The cursor will change when it's correct, and after releasing it all linked items will flash. If you mess up, ctrl-z, maybe use a different camera angle and try again.
Exporting
Now load Sinstool by clicking the hammer icon on the side panel, clicking Maxscript, then Run Script (not open script). Find Sins_Tool and double click it, then select it in the Utilities dropdown. After you do that, the maxtool stuff should be right below, scroll down if you need to using the mouse. Check all the boxes and hit Export Mesh.
Now that we have the mesh, we're good to go..almost. You can change materials in 3DS to get the skin correct, but it's not required and adds a lot of busywork. I'll detail both ways here.Method #1
Open a command prompt (Start -> Run -> "cmd" -> enter), navigate to the directory where ConvertData is stored (cd *directory*, you can paste the directory in by right clicking and hitting paste), then use convertdata to convert the mesh from binary to text (convertdata mesh *source file* *destination filename* txt).
You now have a mesh in text: open it in Notepad or your favorite text editor to check it out.
update 2/11/12: you no longer have to use convertdata. instead, get the Sins Data Converter linked at the start, select your mesh file in the input box, a folder in the output box (or check In Place Conversion) select the version of Sins and you have a mesh ready to open in Notepad++.
From here, it's easy. Figure out the names of your skin files and replace the Black-da.dds lines under Material with the names of your textures, then save the file. Also notice your hardpoints have (hopefully!) been saved.
Method #2
Press M to load the Material Editor in 3DSMAX. Click the first Material slot (round ball).
In the pane, click the "+" on the Maps header to open it. Check the boxes next to "Diffuse", "Bump" and "Specular Level", then click the rectangular box on the right of Diffuse - this usually says "Map #1" or "Default".
The files pointed to here DON'T MATTER. The Sins exporter only uses the names of the materials, NOT the filenames. So when the dialog comes up to select a file, just hit Cancel. Then type in the name of your texture in the Name field at the top (it will say Map #1). For example, for your Diffuse channel, you'll type in "mymesh.dds".
Click the dropdown arrow to go back to the material and repeat this with the other two, except substituting the name of your bump map texture ("mymesh_b.dds") in the Bump dialog and your data map texture ("mymesh_d.dds") in the Specular Level dialog. Once this is done, drag your new material from the ball into the mesh, and export it as above.
update 2/11/12: this is different in newer versions of Max. The "ball" has been removed in favor of a new material editor, which uses slots. Drag a Standard material from the left side of the screen into the middle pane, then drag three Bitmap maps in the same way to the middle pane. Hit Cancel as above if asked for a filename, then right click the map to rename it, before hooking it up to the correct slot as above (Diffuse, Bump, and Specular Level).Drag and drop the mesh into your /Mods/*modname*/Mesh folder, point the ship entity file to the mesh and you should be good to go!
dont know about stress but i prefer max ocer XSI (although i usualy use it for rigging rather than creation, so that question does not apply at the moment, im still learning how to reate uv maps and how to texture.)
I prefer max as well. I hate having to memorize hotkeys. It seems XSI, Maya, and Lightwave use hotkeys excessively. Max has them too but you dont need to use them near as much, or at all if you dont want to. Max has the best UI IMO. UVMapping is a breeze. Everything is easy to use (once you know how to use it). Same could be said about XSI, and other programs. I guess it depends on what you learned 1st. In my case it was max.
If i can get max installed on my new 64bit vista laptop ill do up some uv mapping, optimization, and texture tutorials.
That would be great to complement Carbon016's work and of course your original post on colour channels.
You get a fair few tutorials on the Internet which cover UV mapping and unwrapping but they always seem to deal with fairly simple symetrical structures like a dice or a head/face. I've not seen any examples of complex irregular structures like a multi-layered Borg cube or a ship yard.
In general, well laid out tutorials that are specifically relevant to Sins are few and far between and a good mapping and texturing tutorial would be amazing. If you get it all sorted let me know when you post it up and I'll link it from here too.
I use Max 9 so sorry to hear it crashes 2009. If there's anything I can help with (converting stuff) let me know as well. DoV's main modeler uses 2009 so we have to work with the same constraints and it's a PITA.
kinda surprised that even the good tutorials get burried after a while though. its a pitty really since people look for em and its usualy rather heard to find unless you sort through like 70 pages of post.
Its true, most modding forums have stickys with all the tutorials in them...
Old but Im not sure why he resized his points in the orignal tutorial here though... umm dummys, not points I forgot this version still uses dummy helpers.
Just for ease of use. Technically any size could work because it's the origin that matters, but it's easier to keep track of them when they're small. The center of a very large cube is a lot harder to find than the center of a small one.
Also yeah, it's pretty clear that nobody with mod power here actually cares about keeping these forums relevant - at least half the tutorials stickied are either outdated or irrelevant, search is hilariously broken, all the reference data is old and has to be converted manually, etc etc. But whatever, thanks for the bump and if people need further help they can email me.
So I have followed this tutorial to the letter, and when i make the ship in game, the model is just the team color, very refelctive with no detail. All my maps are correctly UV'ed and it was working this morning until i had to reexport my mesh to fix an orientation issue. My actual ship is meant to be red, all of it. so does this have naything to do with why its just staying all glossy/team colored?
Well, pictures would certainly help me ascertain what the issue could be. But, it sounds like there's a solid white alpha channel in your color map. Either set it up so specific areas are white for the team color, or make it all black. The reflective issue is either the glossiness setting in your mesh file, or it's another totally white Blue channel in the data map.
The alpha channel can suddenly appear all white if you reopen the file and save in dxt5 or whatever format. The format must have an alpha channel, and if one is missing (like on the newly reopned texture) it will create it's own solid white alpha.
alright here are some images
My Diffuse/color map
My Data map
My bump map
What it looked liked this morning before the reconvert for the orientation fix
This is what it looks like now....
Are you absolutely positive you haven't got the .da texture in place of the .cl texture in the mesh file?
If so, I can say that your data map shouldn't be gray when viewing. I'm not sure what's up with that unless you've got it in gray scale. I'm assuming since you followed the instructions that Carbon posted that you have a red channel (specular), green channel (self-illumination), blue channel (reflective), and an alpha (bloom). Without seeing all of the channels for each texture, I still say it's criss-crossed textures in the mesh file.
Well I'm very new to more advanced texturing techniques. This was my first time to ever UV unwrap something and actually paint textures on a model, since i've never had to put anything into a game before. So a lot of the data map is a bit confusing to me cause my knowledge of texturing is limited. I know about the channels but im not entirly sure what or how i would make the data map correctly to be honest. I have photoshop cs4, and have extensive knowledge in it being a print designer. So alot of the talk about specular,bloom, and what not in seperate channels is a bit confusing.
Are you saying that i need to in photoshop just have my red channel selected, paint what i need too, then select my green channel and so on, then turn all the channels on to make the data map?
I checked my texture mapping in 3ds and all seems fine to me, but i have a picture just incase i am overlooking something. I am positive though that my cl file IS my diffuse or colored map in my textures folder.
Im sorry if my responses are a bit hard to understand, coming from a design stand point things are a bit harder to understand in the 3d world for me i guess Thanks for the help!
Okay, seeing as you're new to this I'm going to just go through the whole process. I apologize if I go over something you already know.
1) You should have 3 separate texture files: YourShip-cl.dds, YourShip-da.dds, and YourShip-nm.dds. So, right off the bat I see that none of your textures have the .dds extension. In the event that you haven't saved them in dds format, you'll need to get a free plugin for photoshop that allows you to save files with that extension. Once you're to the saving step make sure you save using the DXT5 option.
2) Each file has 5 separate channels, which can be viewed in the right-hand window under a channel tab located just next to the Layers tab. The first is the RGB channel, which is what you use to actually create the texture. It automatically creates the necessary shades in the 3 sub channels, which are red, green, and blue. The last channel is the alpha channel, which is not automatically present unless you've opened up a file or file type that already has it.
Each channel serves a distinct purpose for each texture. In the diffuse texture, the color channels simply workk together to create the colors you paint with in the RGB channel. The Alpha channel, on the other hand, indicates team color. White means that part of the texture will be team color and black means the color in the RGB channel will be shown in game. Since I work with Star Trek ships I don't use team color. I simply paint the entire alpha black and save the file. In essence, this deletes the Alpha channel. If I reopen and the file there won't be an alpha channel, but upon saving it in the DXT5 format, a white alpha will automatically be created. That can make the entire ship turn the color you're using for your team. This is what I think is happening to your ship.
The Data texture file actually uses all 4 of the sub-channels for separate purposes. Using your diffuse map as a base, you'll need to edit each channel separately to reach your desired goal. Red indicates the specular mapping, which is the metallic look of your ship. Using grey-scale, the lighter the area the more metallic it will look. Black represents no metallic look. The Green channel represents self-illumination. If you have windows or engines or something along those lines that you want to light up in the texture, that section will be white in the green channel. Everything else will be black. You can use various shades of grey to create inreasing or decreasing light intensity. The Blue channel sets how reflective the surface of the ship is. Do you want it to look like a mirror or not. Coloring works the same way as the red channel. The Alpha channel dictates bloom, which is the glow. I usually just copy my self-illumination channel and paste it here, but do whatever floats your boat. Once you've finished, the RGB map should reflect the first 3 sub-channels. If you did a ton of work in the red channel, added a few select areas in the green channel, and left the blue channel black, then your RGB channel should be mostly red, with a few green areas. That's why I said earlier that your data texture shouldn't be grey scale. Each of the sub-channels is, but the composite RGB channel is a combination of the red, green, and blue colors.
The Bump texture creates 3-dimensional effects. This is used to add minor texturing effects to ships without the need for extra polygons in the mesh itself. It should all be grey scale, but you generally want to add a depth perspective to it. Yours look like it's just a grey-scale copy of the diffuse map. Check out the stock Sins textures and look into the nVidia Normal Map Filter. It creates the bump map in a matter of seconds, using the color range to extrapolate depth.
With all that said, there's a process to linking textures to a model in 3ds Max. I'm going to assume you've got all that correct since you're textures are actually showing up in game, but you can always check the mesh file by converting it to .txt format with Harpo's conversion tool (which is extremely handy for anyone working on a mod, so I recommend you get it).
Well, that ended up being much longer than anticipated, but I hope I've helped. The red text is what I think the problem is, but, if not, I hope something else I've offered will help.
Wow thanks for the post, this helps out alot, and i agree that i feel that my alpha channel is the thing thats messed up. Now I have the .dds plug in and have been saying out all of my stuff from PS, now when i try to add an actual alpha channel in the channels pallete it doesnt let me save out with 5 channels to a .dds format. so this brings up the question. when your talking about and alpha channel are you meaning actually make an alpha channel in the channels palette? or make a new layer over in the layers palette and just paint it black, cause doing the latter will just make the image black. here are some screenshots to show what im asking/talking about. I'm sure once i figure this out I will feel like an absolute idiot for either overthinking this or not taking the obvious route.
As you can see in the images that i have my alpha channel painted black like instructed cause i dont want team colors. when i attempt to save as->.dds i get an error that says "To many channels to export, (5)"
merge all the layers ( not channels) together then try again.
Just did that and even with a black alpha channel its still giving me the same issue where i can see the detail but its the team color. I fixed my data map and still no change with the team color issue. I'm using the settings specified in the tutorial. Ill do some more digging i guess.
Alright!, got everything working like it should
I have to work on my bump map now, and get my engine exhaust to work and change the abilities around as well, but I'll worry about that a little later. Thanks for all your help! I really appreciate it.
Congratulations on overcoming your first big modding hurdle! Just out of curiosity, what ended up being the problem?
yeah im very excited, ive been wokring on changing attributes and what not all day and getting my exhaust ports, and weapon points working now. The problem ended up being that when i was flattening and saving out my color map that i was saving out a white(but visually black) alpha channel. I had to select the alpha channel and fill with black even though it was already black in the viewport and then flatten everything down and save out again. Since then I've figured out how the data map works thanks to you guys as well.
I postedyour link on the Modder's Answer thread and thought I'd give it a whirl myself (I have the day mostly free). Ran into some issues I thought might help other brand, spanking, new nubs like me to figure this out. This is the issue with every texturing tutorial I seem to find--great advice--they just don't include all of the steps and assume you know the ones not given.
Here's what you posted for saving from Photoshop:
DXT5 ARGB 8 bpp | interpolated alphachoose GENERATE MIP MAPS in the mip map generation
The problem is it assumes the user (me in this case) knows "other things" (which I don't).
So I am saving with the NVIDIA DDS plugin with Photoshop 32-bit. I use the setting you suggested and end up with a "white box" instead of the actual graphic. I notice in the Nvidia preview, I get a "white box" when I preview it as a 2D image but I do get the actual graphic when I preview it as 3D image. So there's hope apparently and i wouldn't have known to save that much if I hadn't seen this post.
I've been getting "white box saves" since I started trying this and it's the first time I have seen other alternatives that might work--but your tutorial skips rapidly past that part.
So what additional setting with the Nvidia plugin will get me past this? (there are quite a few options). I'm starting simple with a scenario picture for galaxy maps but will be working towards messing with the HUD and all too.
I await your response. Thanks in advance--great help here, Now hurry and do my mod for me.
I can't think of really any reason you'd want a .dds file for a scenario preview. All the ones that come with the game are .tga and .dds requires the image have its height and width as a power of two (128x64, 256x256, etc), so with an unmodified UI they wouldn't fit in the first place. I get a white box surrounding the image if I try exporting a non-square or non-power of two image - that white box expands the image to a power of two size (I made a 200x20 file and the white box was 256x32) to assumedly show you it's having issues exporting it as what you have.
So long story short, use .tga (and make sure to change it to 32-bit on save, because otherwise you won't get an alpha channel) for really small, one-off files. The file size difference for small stuff is something like 16kb.
With UI elements, however, you've got .brushes you can specify arbitrary widths and heights for picking out of the texture, so if you can rearrange all your interface junk in a way that fits a power of two .dds is a much more efficient way to do things. I'd suggest making anything really big like interface, research, lobby backgrounds .dds files just for the compression advantage. You can disable "generate mipmaps" on dds 2D elements though because those'll never be used.
I just want it to work. Matters not to me how. The one I pulled up to experiment with was in DDS format already.
I'll pull out one of the tga ones.
Thanks for the reply. A few more pieces of information.
Update: Opening the TGA file in Photoshop-7 then saving it directly with no modification as a 32 bit TGA with no RLE compression results in the white box.
Next?
I'm really not sure then, but it sounds like an issue with your particular PS install/settings. I assume the same thing doesn't happen with JPG/PNG/whatever exports?
e: and while I hate GIMP, it may be more up to date at this point than PS7. Even an old version of PS should be exporting TGAs OK though.
I have no other issues with it and the variance between the 2d and 3d preview suggests a setting off needed somewhere. I had tried Gimp and had problems with usable exports as well. I'll tinker with settings and see what Heck, I 've hand edited every Windows graphic screen including the boot. It can't be this difficult...grrrr.
There are many great features available to you once you register, including:
Sign in or Create Account