Author Topic: How to Fill SkinData  (Read 45780 times)

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #30 on: December 06, 2016, 05:02:14 pm »
Should the vertices' weights be normalized?
you mean like sum of weights should be 1 per vertex? no there is no such requirement

Offline iguatemi

  • byte
  • *
  • Posts: 9
    • View Profile
Re: How to Fill SkinData
« Reply #31 on: December 06, 2016, 05:38:34 pm »
Quote
you mean like sum of weights should be 1 per vertex? no there is no such requirement

great, thanks again :)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: How to Fill SkinData
« Reply #32 on: December 06, 2016, 05:49:00 pm »
But actually, it's normalized out of 3ds max. So the better question is: can it be normalized or should I multiply them by some value? What is the range of the weights? Thanks in advance.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #33 on: December 06, 2016, 05:55:14 pm »
programatically there is no restriction. if the value is too low its affect will be hardly noticable, if it's too big you will get some weird affects

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: How to Fill SkinData
« Reply #34 on: December 11, 2016, 06:14:57 pm »
I made a printout of the SkinDatas of the same model exported to BONES and exported to my JSON-serialized format in an effort to solve my weight problem (and, with a little luck, kill the UV issue as well with the same proverbial stone).  The following image shows that there's nearly six times more weights and jointIndices in the BONES version. SkinData doesn't hold animation information, does it? And if it's not animation, what could explain this? Thanks in advance.

« Last Edit: December 11, 2016, 06:20:42 pm by AGP »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #35 on: December 11, 2016, 06:32:25 pm »
Quote
SkinData doesn't hold animation information, does it?
no it doesnt.

not sure what's going on there. as a reminder Bones does not have exporter/importer code. it just uses JME's importer

Offline iguatemi

  • byte
  • *
  • Posts: 9
    • View Profile
Re: How to Fill SkinData
« Reply #36 on: December 23, 2016, 08:49:54 pm »
hey, raft. in some models, some vertices have more than 4 joints associated to them. do you have any input on how to handle these cases?

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: How to Fill SkinData
« Reply #37 on: December 25, 2016, 06:46:07 pm »
And is it possible that other engines, like Unity, have some kind of logic to redistribute the weights for models that use more than four? Yet another question: is it trivial to increase the number of joints per vertices, or would that be a massive undertaking?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #38 on: December 25, 2016, 11:59:57 pm »
hey, raft. in some models, some vertices have more than 4 joints associated to them. do you have any input on how to handle these cases?

need to check loader (jME, ardor3d) code but most possibly they are simply ignored. I cant see any good reason to support more than 4 joints. to me 4 joints are almost more than good enough

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #39 on: December 26, 2016, 12:03:20 am »
And is it possible that other engines, like Unity, have some kind of logic to redistribute the weights for models that use more than four? Yet another question: is it trivial to increase the number of joints per vertices, or would that be a massive undertaking?
assuming exporter supports it, it should be modified in loader code (jME, ardor3d). but again I dont see any good benefit for that

Offline iguatemi

  • byte
  • *
  • Posts: 9
    • View Profile
Re: How to Fill SkinData
« Reply #40 on: January 03, 2017, 08:53:29 pm »
We have for the same model, two very different vertex counts (triple the number of triangles in jpct versus the unique vertex count which is typically less than the number of triangles in any given model), while retaining the same number of triangles, between jpct and 3ds max. But when we create our SkinData, we use only the number of unique vertices. Now we're thinking that we should be using the number of vertices in jpct. Did that make sense to you and do you agree?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #41 on: January 04, 2017, 10:37:22 am »
what e
We have for the same model, two very different vertex counts (triple the number of triangles in jpct versus the unique vertex count which is typically less than the number of triangles in any given model), while retaining the same number of triangles, between jpct and 3ds max. But when we create our SkinData, we use only the number of unique vertices. Now we're thinking that we should be using the number of vertices in jpct. Did that make sense to you and do you agree?
what exactly is your pipeline?

if you are creating your skeletal data from scratch in code, and loading your model from 3ds format or similar, yes, you possibly need to use number of vertices instead of unique vertex count.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: How to Fill SkinData
« Reply #42 on: January 04, 2017, 05:24:18 pm »
No, the bones are also defined in the file. What do you mean by our pipeline?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to Fill SkinData
« Reply #43 on: January 04, 2017, 05:39:43 pm »
I'm not sure I understand what you are trying to do.

No, the bones are also defined in the file.
then why are you creating a SkinData "manually"?

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: How to Fill SkinData
« Reply #44 on: January 04, 2017, 06:08:08 pm »
I saved the data from 3ds max's skin and I'm applying it to SkinData. Is there an automatic way to calculate SkinData? Am I being thick?