Jump to content

Tutorial: 3ds Max Skinned Meshes Into Game


Vannus

Recommended Posts

attached WinDBG to TESV.exe to watch what happens when it CTDs upon an invalid body nif mesh being loaded in, for what it's worth, this is what comes out initially

 

(1fe8.1a8c): Access violation - code c0000005 (first chance)

First chance exceptions are reported before any exception handling.

This exception may be expected and handled.

eax=00000000 ebx=00000000 ecx=20728500 edx=00000000 esi=20728500 edi=00000000

eip=00eaa9cd esp=3554fc78 ebp=2430ba20 iopl=0 nv up ei pl nz na po nc

cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202

TESV+0xaaa9cd:

00eaa9cd 8b08 mov ecx,dword ptr [eax] ds:0023:00000000=????????

 

keeps spamming that and about another 4 other exceptions indefinitely til it is killed.

doesnt really help anyone cause we dont have the source but.. ehhh bored

Edited by Skree000
Link to comment
Share on other sites

  • Replies 459
  • Created
  • Last Reply

Top Posters In This Topic

I guess we'll have to wait for an updated xml.

 

I could probably get it working with one of these older nif.xml and an older nifskope build, becuase it was working on the install just previous to this one for certain. I still have some older xmls and obviously can get a hold of older nifskope versions...

 

oh and if you want it fixed.. best bring it up to niftools, also mention this happens on F3 nifs as well...

 

Saying that, I don't think it actually matters tbh. I have a feeling I have tried (the oopsie kind of try) and it worked.

Edited by Ghogiel
Link to comment
Share on other sites

You're right Ghogiel, it wasn't the BsPartFlag, I changed it using the older version of nifskope, still wouldn't work. It turned out to be something else.

 

I finally figured out the problem with my mesh. And it turns out that it was because a part of my mesh had a NiStencil property ( I wanted it to be visible from both side). It was by accident that I discovered it, but the moment I deleted the NiStencil branch, my mesh became visible in-game, no more giant exclamation mark.

 

Does this mean that we currently can't use stencil nodes? or has somebody managed to get it working?

Edited by Edmond Dantes
Link to comment
Share on other sites

posted on niftools forums the minute you responded actually :)

Would also be nice if the Scene Root (NifNode) would take the name of the nif file you export it as, or if there was a box where we could name it right in the export window, i might see if we could feat req that...

pain in the butt to open the strings array and manually do that every time...

 

ive hit an impass now, i made a custom body mesh from scratch with double the polys as vanilla, skinned it, dismember modifier on with partitions setup properly, material block copied from vanilla (original removed), has normals = no, renamed the root node to match the mesh name... vert colors yes (tried no also),

CTDs on loading game now....

 

i had it half working atleast before, i copied and pasted over the Nitrishapedata block from mine into a vanillas and also the Skindata and skinpartitiondata from the dismemberment block from mine to orig, worked but some entries were rearranged i believe, no biggy, but cant seem to make that magic happen again now it just ctds, tried about 18-20 different versions, messing around with all the checkboxes, fields and arrays... so far ive found a few things..

 

one is that the BS UV sets field can be left as 4097 or 1 or anything it doesnt seem to care..

also good piece of advice for people is to rename the mesh in Max what it will show up as in nifskope, ie BodyFemaleBigCompleteBody or IronHelmet or whatever (will appear as the name of the NiTriShape block in the vanilla mesh you are emulating)

Link to comment
Share on other sites

 

ive hit an impass now, i made a custom body mesh from scratch with double the polys as vanilla, skinned it, dismember modifier on with partitions setup properly, material block copied from vanilla (original removed), has normals = no, renamed the root node to match the mesh name... vert colors yes (tried no also),

CTDs on loading game now....

 

Assuming you have a duplicate pair for body_0 and body_1, the only thing I can think of is there are a couple of verts maybe not getting some weight info. Only ctd's I've been getting with meshes have been due to that (or some phantom export glitch).

Link to comment
Share on other sites

ive hit an impass now, i made a custom body mesh from scratch with double the polys as vanilla, skinned it, dismember modifier on with partitions setup properly, material block copied from vanilla (original removed), has normals = no, renamed the root node to match the mesh name... vert colors yes (tried no also),

CTDs on loading game now....

 

Assuming you have a duplicate pair for body_0 and body_1, the only thing I can think of is there are a couple of verts maybe not getting some weight info. Only ctd's I've been getting with meshes have been due to that (or some phantom export glitch).

 

HAHA Great!!!

 

Ok some things ive discovered:

Mesh_0 and Mesh_1 can be the same mesh, that is the easiest way to test if your export worked atleast and there is no problem with morphing, to determine this i simply replaced both femalebody_0 and femalebody_1 with femalebodyastrid_1 exported as either from nifskope and it worked.

NOTE* You probably dont want to leave it like this, but this was just for testing, since if at this point you modify the weight slider, gaps rip open in the neck, hands and ankles where the 'skinny mesh' is supposed to be thinner here but its not.

 

However, now that that was proved it made my life a lot easier because rather than making a skinny version right now I can focus on the export pipeline problems I was having.

 

Here was my extended workflow with all steps:

 

  • Have custom mesh open in Max
  • Import matching Vanilla mesh with partial skeleton (remove unused bones)
  • Skin wrap from vanilla to my own
  • remove vanilla mesh
  • in skin modifier on my own, remove-zero-weights, just to be safe (this seemed to stop the CTDs)
  • export to nifskope
  • open second copy of nifskope with vanilla
  • delete material block in modified
  • paste branch of the material shader branch from vanilla to modified
  • set HasNormals to none in modified
  • set HasVertexColors to yes in modified
  • rClick'd 'Center/Radius', Mesh>Update Center and Radius
  • BSDismemberSkinInstance > Partitions > BSDismemberBodyPartType set to the numbers to match vanilla, rather than whatever Max spits out
  • Ignore BSPartFlag entries, did not seem to matter (?)
  • Nifskope>View>Block List> Show Blocks in List
  • Open the "Header">Strings array
  • modify entry 0 (root node), rename it the mesh you are saving as. ie in this case, FemaleBody_0.nif, save, then change name to FemaleBody_1.nif and save as that one. I used caps to match vanilla, not sure if important

it just works!!! :)

 

now to refine the skinning and make the skinny version 8-)... oh and unwrap it lol

 

 

 

Link to comment
Share on other sites

XHI I am not able to make this work what I am doing is :

 

 

1 Import skeleton and a mesh , I delete half of the mesh , then I import a second mesh without the skeleton couse there is already one , I merge vertices that I move around to make one single object and detach later to have the textures be different , then I export and doesnt work , what I did wrong till there?

Link to comment
Share on other sites

@prometheus did you do the post export stuff (changing vertex colors and bslightingshaderproperty in nifscope)?

 

does any1 kno if nispecularproperty nodes work? and is there a way for us to attach more than just the nishaderproperty and one other material block to a mesh? eg if i had a nialphapropertyblock, a nispecularpropertyblock, and a nishaderpropertyblock on my nif before importing, only two of them fit under the mesh, the third one gets squished out of the entire scene root block.

Edited by person123456789
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...