Jump to content

Tutorial: 3ds Max Skinned Meshes Into Game


Vannus

Recommended Posts

Notice - please read first time (hidden in spoiler for tidiness)

 

OK, I just cracked it after a lot of trial and error on my part. I've noticed the same methods I've used here have kinda been mentioned throughout posts in the forum, but tracking them down and understanding them can be quite difficult! So I've documented my process here so that can get you from a skinned mesh (one that uses bones) in 3ds Max into a perfectly working model in Skyrim.

 

Firstly, I give no promises that this will work. I have done very little testing, but it was kind of a breakthrough moment that I thought worth documenting here.

 

Please note that this is just my process that I have to do for now. This is likely to become obsolete possibly very quickly, but for now it's a working process. Hopefully someone can make use of it for some good mods while we wait for an easier more streamlined method!

 

I don't claim to be an expert in this area. I've simply tried lots of things until they work. This may not be the best way of doing everything. I don't understand how everything with Skyrim nifs works, just if it does work or not! The steps here may likely require tweaking for your individual requirements.

 

I keep a lot of the steps to the point, so you'll partly need to know what you're doing already. If you don't fully understand a step, searching the forum can likely help.

 

Let's Begin

 

Tools you'll need:

  1. NifSkope with Skyrim ini (or use Amorilia's, but may currently cause issues - thanks throttlekitty).
  2. MaxTools 3.7.1 The forum post for this has unfortunately recently been merged and previously mentioned links are broken. This may change again soon, so I don't guarantee this link will work.
  3. 3ds Max (obviously) - I'm using 2012 x64

Importing the mesh you wish to change

  1. First find your mesh you want to edit. You'll need to extract the nif.
  2. Make sure you have the required skeleton nif file extracted to the same directory. If you're unsure, import attempts will produce an error telling you which skeleton you need.
  3. In 3ds Max, import your mesh with the following settings:
    http://i.imgur.com/AaDsF.png

 

Make your changes to your mesh.

It's your responsibility to ensure changes you make are valid: ensure the Skin has correct bone assignments and your UVW maps are good.

 

Exporting

Export with the following settings:

http://i.imgur.com/hXKk3.png

Ensure Generate Strips is off. We need NiTriShapeData, not NiTriStripsData.

Remove Extra Bones shouldn't be necessary if you correctly checked Remove Unused Bones on import.

 

Fixing with NifSkope

This is the most important bit and can be tricky.

 

  1. Open the original non-edited mesh and your new edited mesh alongside each other. If you can't for some reason, just open each one as you need to.
  2. Replacing the shader information with the original's:
    • This is important, otherwise your mesh probably won't appear at all. In your original, copy the branch of the BSLightingShaderProperty.
    • In your modified, delete the BSLightingShaderProperty branch, then paste the one copied. It won't be linked in correctly yet, so don't worry.
    • In the NiTriShape, find Property Link 1 (it's near the bottom) and input the node number of the pasted BSLightingShaderProperty.

[*]Fixing the mesh up: At this point your mesh still may not appear correctly in game. It'll likely have incorrect textures. Following steps are on your modified mesh unless stated:

  • In your NiTriShapeData, find Has Normals. If this is Yes, double click the value to change it to No. I don't know why, but normals data it isn't needed and it's just adding a lot of redundant data to the file size. The importance of this step is uncertain, but it's probably worth doing. If you experience issues, try without. Update: Comment by Ghogiel (also mentions the need to recreate the BSdismember Modifier)
  • Still in your NiTriShapeData, find Has Vertex Colors, and change it from No to Yes. If it was already Yes, it's likely you had accidentally checked Vertex Colors on export, which you shouldn't have done! I find this step is very important, as Skyrim needs the vertex colour information to render the texture properly; without it, my diffuse textures didn't appear (or they appeared black). If your mesh actually needs certain vertex colour information, I'm sorry I can't help at the moment. Update: Comment by Ghogiel

 

Finishing up

Save your nif and put it into the correct data folder in your Skyrim directory so the game uses it. You should now be done! Have a test and see if everything worked ok.

 

I hope this helps. I really cannot provide too much support for this, because even I don't fully understand it. But I hope my process, which I've found to work for me, will work for you too. And I apologise in advance if everyone finds that the method doesn't help when you actually do some serious modifications to your meshes. I haven't done so yet, so I can't guarantee it'll work right! But I hope the concepts will be a good base to work from.

 

Good luck and happy modding! :)

Edited by Vannus
Link to comment
Share on other sites

  • Replies 459
  • Created
  • Last Reply

Top Posters In This Topic

  • In your NiTriShapeData, find Has Normals. If this is Yes, double click the value to change it to No. I don't know why, but normals data it isn't needed and it's just adding a lot of redundant data to the file size. The importance of this step is uncertain, but it's probably worth doing. If you experience issues, try without.
     
     
  • Still in your NiTriShapeData, find Has Vertex Colors, and change it from No to Yes. If it was already Yes, it's likely you had accidentally checked Vertex Colors on export, which you shouldn't have done! I find this step is very important, as Skyrim needs the vertex colour information to render the texture properly; without it, my diffuse textures didn't appear (or they appeared black). If your mesh actually needs certain vertex colour information, I'm sorry I can't help at the moment.

 

 

a couple thing to clarify..

 

You are confusing body meshes, which use Object space normal maps, which being object space mean that info is 'baked' into the map, they ignore tangent space vectors, which is why no normals are needed.... to every other mesh in the game which do use tangent space normal maps and do need normals.

 

Whats all this about with vertex color? you either have used it and exported it, or you haven't. Probably the one thing to note is that you might have needed to fix it a bit if the mesh you just exported is a vanilla one but modified, it's the import that seems to mess it up, In this case turning off vertex color on export might be easier and just add it in post via nifskope. Otherwise you can safely create and export vertex color in max on custom meshes and the exporter will correctly export it..so obviously you would tick vertex color in the export dialog if you are using vertex color on your mesh.

 

I'll also note that any geometry changes you make will fubar the BSdismember Modifier. I just delete it and add a new one before export, just give it a scout to see where the partitions are so you can put them back/ make similar ones.

Edited by Ghogiel
Link to comment
Share on other sites

Good Tutorial.

 

Seems to be a extreme lack of Tutorials on this forum.

Until we have updated tools and information sorted out, there won't be too many. There's workaround-ish ways to get some things to work (but not all) or bad information that needs sorted, for example. Big kudos to those who have had time to write them between figuring all this new stuff out, I haven't.

 

@Vannus, Amorilia's nif.xml currently breaks a few things in anticipation of a new NiFskope build, you may want to point to mine for now.

Edited by throttlekitty
Link to comment
Share on other sites

Good Tutorial.

 

Seems to be a extreme lack of Tutorials on this forum.

Until we have updated tools and information sorted out, there won't be too many. There's workaround-ish ways to get some things to work (but not all) or bad information that needs sorted, for example.

2nded.

 

Workflow is in flux.

And should mostly be used for experimentation more or less, not necessarily for final assets (it may have some kinks...). Once more is known, then compiling for easy to read, noob friendly tuts make more sense.. I saw people wasting so much time doing these very hack work flows like 2 years after F3s release, even though at that point you can just press export more or less. Less time faffing and more time modding over such a large user base could have saved countless man hours. As long as we all know this is probably going to a bit of a waste of time at some point and is probably error prone, then it's all good. Just think of it as experimental workflow to try to break stuff and figure out why... And report any finding to the pool.

Link to comment
Share on other sites

i have similar settings but i untick a lot of options for export and import wich alows me to get a cleaner nif file more like their own and then add whats missing like the shader tree in nifskope

 

and a few other things, never tried put it in game thought

 

http://i44.tinypic.com/6sxt2d.png

Link to comment
Share on other sites

Throttlekitty's updated nif.xmls.... not mine :thumbsup:

 

also for export, I recomend just leaving tangent space on if you are doing anything besides the body. In nifskope>spells>batch>update tangent space. As always. Max niftools has never exported correct TS so pretty much forever we have been updating them in nifskope.

 

the vertex color is vertex color, export with it if you are using it, or turn it off. BTW the bodies have vertex color, but since it's all white you can leave it off and flip in on in nifskope and it will flood the array with white anyway. But if you are using vertex color you need to leave that ticked at export.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...