Jump to content

Tutorial: 3ds Max Skinned Meshes Into Game


Vannus

Recommended Posts

  • Replies 459
  • Created
  • Last Reply

Top Posters In This Topic

Posted this in another thread, but can anyone determine if the h2h_*.hkx animations are skeleton dependent? It was simple in Oblivion where one KF corresponds to one animation. Having ruled out all other causes, I can only determine that there are 2 (more more) animations actually defined in the hkx files, one for human races, and one for beast races. Or is it something completely different. The beasth2h files (whatever they are for) are for an entirely different animation set, as determined by inspection with 3ds max after KF import. PlayIdle and ShowAnim don't work, so obviously I can't prove it. Edited by jimhsu
Link to comment
Share on other sites

I have downloaded the latest 3dsmax exporter importer , the things I did are the following :Since I have found no skeleton I only found a skeleton hfx something not the nif skeleton , so I have taken this and placed in the same folder of the mesh I wanted to import , befoure this step I took 2 armors and merged into one nif , as the usual stuff done to have a new armor so far just by erasing parts of the meshes with photoshop work , anyway I did this and then imported in 3dsmax , it imported and seemed fine keeping the stacked modifiers , so I proceded to delete parts of one armor and parts of the other , I am not sure why but the armors seemed doubled in the import , altough in the nif file they where one single block so I delete the duplicates , then I reexport it and .... crash .... :( the mesh I mixmatched are the dawn robe and the steel plate armor ...

Right, to my knowledge, there are two skeleton nif files that are most important: skeleton.nif (male) and skeleton_female.nif (female). They are both located in the meshes BSA, with the male under "meshes\actors\character\character assets\skeleton.nif", and the female under "meshes\actors\character\character assets female\skeleton_female.nif".

 

Depending upon whether your mesh is for male or female or not, you'll need the appropriate skeleton nif file in the same directory as the model you're importing. As my tutorial originally said, it should give you an error stating which skeleton is missing; does yours not?

 

An arrow to the knee should do more damage than a head shot, since it will mean you can no longer be an adventurer.

Lol, did I miss what this was in reply to?

 

Wrong thread. -_- Teaches me about having multiple tabs of discussion open!

Link to comment
Share on other sites

Hi guys, I was wondering if anyone can help me. I was doing some tweaking to the shape of the Nightingale armor, I made no deletion to any armor parts, the vertices are intact, all I did was push them around to get the shape I wanted.

Both for imports and exports, I used the exact same setting as specified by the pics in this thread. My problem basically started when I exported the modified mesh into Nifskope.

 

Based on my understanding of the current state of modding for Skyrim, any meshes exported cannot be used in-game right away correct? So I did what was instructed in most tutorials found throughout the net (and this site) which was to open a vanilla armor (in this case the original Nightingale armor), to use as a base. Then, I opened my modified Nightingale Armor, and it showed up fine in Nifskope:

 

http://img846.imageshack.us/img846/4064/nightingalemod.jpg

 

Next I clicked on the NiTriShape of my modified armor, expanded the NiTriShape branch, and copied the NiTriShape data.

 

Finally, I went back to the original Nightingale armor, expanded its NiTriShape branch, clicked it NiTriShape data, and "pasted over" the previously copied NTS data. It worked but with one problem, the bloody mesh is no longer positioned correctly >:(

 

http://img836.imageshack.us/img836/4536/nightingalemod2.jpg

 

As you can see, the mesh is quite a bit higher than where it's supposed to be. Looking at both meshes (original and modified), I noticed that the NiTriShape of the original has translation values that aren't 0, while the modified mesh has 0 translation values. This explains why the modded mesh would be positioned differently as the original mesh when the NTS data was pasted over but I can't understand why:

 

1. It didn't show up that way when I opened the modified mesh by itself (before having its NTS data pasted into the original mesh) and

2. I can't get the 3ds max to export the mesh with the exact translation values as the original mesh, despite trying various export settings related to transforms. If I remember correctly, most Oblivion and Fallout mesh have translation values of 0, which helped prevent issues like this.

 

Anyway, if I leave the new mesh the way it is, and try it in-game, the armor doesn't show up at all (invisible).

But if I try to clear any transforms, it does restore the mesh to its correct position in Nifskope, but in-game, it's a complete distorted mesh (albeit visible).

 

I don't recall ever having this kind of problem before with Oblivion or Fallout. Judging from the success stories of others in this thread, I must be doing something fundamentally wrong if I'm failing at something as simple as this. Please advise.

 

Thanks in advance

 

Tools used:

 

- 3ds max 2012 64 bit

- MaxNiftools 3.7 (same as the one from this thread)

- Nifskope 1.1.0 RC1 (Revision 546adeb) this was the latest one I could find in Niftools website, I also use the Nif scripts that came with this version of Nifskope cause it seems to be the most reliable. The one by ThrottleKitty and Amorillia was giving me errors and the textures didn't show.

Link to comment
Share on other sites

 

Next I clicked on the NiTriShape of my modified armor, expanded the NiTriShape branch, and copied the NiTriShape data.

 

Finally, I went back to the original Nightingale armor, expanded its NiTriShape branch, clicked it NiTriShape data, and "pasted over" the previously copied NTS data. It worked but with one problem, the bloody mesh is no longer positioned correctly >:(

 

just follow those instructions in the OP instead of doing it this way and all the issues will go away.

 

 

2. I can't get the 3ds max to export the mesh with the exact translation values as the original mesh, despite trying various export settings related to transforms. If I remember correctly, most Oblivion and Fallout mesh have translation values of 0, which helped prevent issues like this.

 

Pretty much. No matter what you do, if anything under skin is ticked in the export dialog then it will act as if zero transforms is ticked. Even if the mesh isn't skinned and zero transforms isn't ticked.

Link to comment
Share on other sites

just follow those instructions in the OP instead of doing it this way and all the issues will go away.

 

You were right, when I did it, I was basing my assumptions on how things were done in previous games like Fallout and Oblivion. The only step I really skipped was the pasting of the BSLightingShader Property from the original mesh to the modified one. I did this because the modified mesh itself already had a BSLightingShader property with it's correct texture path (it is an export of the game's own mesh after all), but for some reason, this step apparently needed to be done anyway. Shame on me for not following instructions to the letter :wallbash:

 

Anyway, thank you for the simple but effective reply :thumbsup: . In the future I'll be more careful about not skipping steps out of misguided assumptions. :biggrin:

 

Thank you to Vannus for the tutorial as well. Next up, weapons..

 

 

P.S. Just out of curiosity though, why can't we use the BSLightingShader property of the exported mesh, especially since it seems to have all the same properties as the one from the original mesh (when viewed from Nifskope Block detail) ?

Edited by Edmond Dantes
Link to comment
Share on other sites

Random question: is there any reason why the Skin modifier loses its effect after doing the "Put Edit Mesh modifier In between BsDismember and Skin" > "Make edits" > "Drag Skin modifier above Edit Mesh modifier" > "Collapse to Edit Mesh modifier" trick? In max 2012, the skin info is lost this way, but is preserved when using Edit Poly instead.

 

Also, I still can't get separate objects to show up in game (only by attaching it to an existing object), but that needs further debugging. The only other difference that I can find is that my original mesh that works has NiBinaryExtraData while the mesh that doesn't work, doesn't. Export settings identical to the posted image in tutorial.

Edited by jimhsu
Link to comment
Share on other sites

Ok, I found a few things, but the crash comes from the Properties list, two shapes have the AlphaProperty linked before the BSLightingShaderProperty. Reversing the order they're listed fixed the crash.

 

Other things: Looks like the max exporter sets "Unknown Short 1" to 8. Probably not a big deal, the only places i've seen values other than zero is on trees.

TriShapeData>Center gets garbage data written to it, hover for a tooltip, and you'll see invalid floats. rClick the TriShapeData and do Mesh>Update Center/Radius to fix it. Previous titles used center/radius to determine if an object was offscreen, and whether or not it should be drawn, and the editors use it to create the bounding box for selections.

 

edit: oh, and i'm not sure about morphing with werewolves. there's an fx mesh they use for the transition, but it doesn't morph with the character. Hard to say if it morphs to the werewolf body, since they're both the same shape.

 

f*** yeah!! If you wouldn't be a guy, I'd want to have your kids now :D

Works indeed so I can attach new things to them!

Which throws up a whole bunch of new problems because I'm essentially trying to attach a new mesh that has it's own separate textures, which isn't working out all too well, but I'll get somewhere in due time as I can see what the heck I'm doing now :D

 

As for the werewolf morphing sequence (relevant to other modders, too!):

 

The game does not morph directly to the malebodywerewolf_1 - mesh. It morphs to an intermediate one (that FX mesh - Which does not have eyes or teeth since it's never seen from the front, as you can't move the camera during the transformation sequence! So no point modding that) and then quickly toggles to the malebodywerewolf_1 without any morphing once the animation sequence is complete, so any new mesh additions pop in place at that time as well. No issues so far :]

So this is good news for anyone who is interested in modding werewolves as well as you can freely do whatever you want to the malebodywerewolf_1.nif without screwing anything up.

Link to comment
Share on other sites

Random question: is there any reason why the Skin modifier loses its effect after doing the "Put Edit Mesh modifier In between BsDismember and Skin" > "Make edits" > "Drag Skin modifier above Edit Mesh modifier" > "Collapse to Edit Mesh modifier" trick? In max 2012, the skin info is lost this way, but is preserved when using Edit Poly instead.

 

Also, I still can't get separate objects to show up in game (only by attaching it to an existing object), but that needs further debugging. The only other difference that I can find is that my original mesh that works has NiBinaryExtraData while the mesh that doesn't work, doesn't. Export settings identical to the posted image in tutorial.

 

Hm. I have success in skinning separate meshes to the same skeleton and have them show up in the game - did you make sure that your new things have UVs, a dismemberment node and got a BSLightingShaderProperty copied onto them from one of the meshes in the original game file?

 

Not sure if the way you edit the meshes is the right one or not, but I do that below the skin on the Edit Mesh node that is already in the scene. It does not screw anything up(at least has not done so for me so far as long as you're just appending new meshes or reposition the vertexes of the existing ones); newly appended meshes will get a default weighting based on the closest bones which you can then tweak by hand.

Link to comment
Share on other sites

Just an FYI: The (AFAIK) latest version of this 3DS Max plugin mis-generates the TanSpace. It does generate binormal and tangent vectors... however it seems to get them backwards. Disable "update tangent space" when exporting so only the Normals export, then in the NiTri, change the "BS Num UV Sets" to 4097, then update the tanspace to properly generate it.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...