gyoerkaa / nvx2loader

blender add-on for loading nvx2 files
GNU General Public License v3.0
3 stars 3 forks source link

Import of animations #3

Open BaalNetbek opened 7 months ago

BaalNetbek commented 7 months ago

I saw you had a problem with assinging weight to bones. I might be wrong but. It seem to me that to connect animation and mesh you need a model, a .n3 file. They contain bone names and I think a skeleton and also idxes that match thoese in right nax files. Maybe you wanted to have look if so I send you example files: export_win32.zip

BaalNetbek commented 7 months ago

Reference files nebula-trifid/blob/master/code/toolkit/toolkitutil/n3util/n3modeldata.h nebula-trifid/blob/master/code/render/models/streammodelloader.cc

gyoerkaa commented 7 months ago

Unfortunately parsing n3 files is somewhat difficult. There is a lot more in them than just the skeleton.

Their general structure is simple enough, but there a re bunch of FourCCs around in various files, which determine successive data type and thus size. It's a lot of work to gather those, it will take a lot of time.

For example: code/render/particles/particlesystemnode.cc code/render/characters/characternode.cc (See the ParseDataTag methods)