Important information: this site is currently scheduled to go offline indefinitely by end of the year.

bone indices & bone weights

Post questions about game models here, or help out others!
Post Reply
andy97
beginner
Posts: 36
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 23 times

bone indices & bone weights

Post by andy97 »

Hi,
I'm working on my noesis script and currently stuck at the last step: bone indices + weights. In the screenshots below, it seems like the binding is incorrect.
Image

But in the vertice struct, those bytes are the only one I think that are bone indices and bone weights, following this struct:

Code: Select all

byte	tangent[4]
byte	normal[4]
byte	boneId[4]
byte	weight[4]
float	position[3]
half	texcoord[2]
The file + my script: removed
Last edited by andy97 on Tue Aug 04, 2020 7:50 pm, edited 2 times in total.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: bone indices & bone weights

Post by shakotay2 »

Guess you'll get track of the problem as soon as you've found out why the ring finger of the right hand moves when the left arm moves:
.
ringfinger.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
andy97
beginner
Posts: 36
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 23 times

Re: bone indices & bone weights

Post by andy97 »

That problem is the reason I need help as is in the screenshot. Seems like all bone indices + weights in data are somehow wrong or my binding is not correct (I just read them straightforwardly without any complex step). Also in my screenshot, those two 'long' fingers seems like they were not binded to any bone. Since the skeleton is as same as your screenshot, I'm still thinking the issues are from original bone weights data .
episoder
mega-veteran
mega-veteran
Posts: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: bone indices & bone weights

Post by episoder »

you may have to remap bones. usually the rig/bones are stored in a way that the shaders can be loaded fast. means you have a maximum amount of bones that can be loaded into shader constants per drawcall. so.. you may have to figure out how many bones the engine loads per call, and then remap the rest to the next draw call and remap those again. it's a lil finicky tbh. but...
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1024
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1210 times

Re: bone indices & bone weights

Post by Bigchillghost »

There're two bone index refference tables for submeshes before the vertices buffer.
indextbl.png
A pretty much common workaround for per-byte bone index format.
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
episoder
mega-veteran
mega-veteran
Posts: 162
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 6 times
Been thanked: 78 times

Re: bone indices & bone weights

Post by episoder »

yes. was just reading the same. this is not dummy data. there's also another table for the 48 bones. seems not related tho. and a bunch of more numbers and "vertex"counts and structures to add or shift around. finicky stuff.

Image
andy97
beginner
Posts: 36
Joined: Sun Apr 28, 2019 1:15 pm
Has thanked: 5 times
Been thanked: 23 times

Re: bone indices & bone weights

Post by andy97 »

Hi all, sorry didn't see the last 2 posts but I could figure out the same table like you guys mentioned :D it worked, thanks for helping me, really appreciate it :D

Image
Post Reply