Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - raft

Pages: 1 ... 4 5 [6] 7 8 ... 133
76
Bones / Re: Has anybody implemented GPU/vertex shader bones yet?
« on: June 18, 2016, 07:23:55 pm »
you can go for a hybrid solution. i.e. using skeleton animation create jPCT's regular mesh based key frame animations on the fly and use that afterwards. this will increase performance but you may hit memory limit (depends on number/length of your animations)

77
Bones / Re: Has anybody implemented GPU/vertex shader bones yet?
« on: June 18, 2016, 04:55:06 pm »
how many polygons is your model?

as you had said, there was some work on that but nobody published anything as far as I know.

also beware, although HW animation with a shader is possible and will increase the performance, polygon level collision detection will not work in software as software will not be aware of updated mesh.

78
Bones / Re: How to Fill SkinData
« on: June 17, 2016, 01:58:38 pm »
but of course you should first create the list if it's null

Code: [Select]
map = Map<Integer, List<Integer>>();
for (b: boneRefs) {
  list = map.get(b.vertexIndexReference);
  if (list == null) {
    list = new ArrayList<Integer>();
    map.put(b.vertexIndexReference, list);
  }
  list.add(b.boneIndexReference);
}

79
Bones / Re: How to Fill SkinData
« on: June 17, 2016, 01:50:28 pm »
it's written above AGP, in the first iteration

Code: [Select]
map = Map<Integer, List<Integer>>();
for (b: boneRefs) {
  map.get(b.vertexIndexReference).add(b.boneIndexReference);
}

but of course you should first create the list if it's null

80
Bones / Re: How to Fill SkinData
« on: June 17, 2016, 12:37:40 pm »
you cant do that in a single iteration IMHO.*

first iterate over boneRefs to collect vertex-bone relations

Code: [Select]
map = Map<Integer, List<Integer>>();
for (b: boneRefs) {
  map.get(b.vertexIndexReference).add(b.boneIndexReference);
}

then loop over your map to place into jointIndices array. sth like this

Code: [Select]
for (e : map.entrySet) {
  count = 0;
  for (index : e.value) {
    jointIndices[e.key][count++] = index;
  }
}

hope this helps
r a f t

(*) actually you can but will be ugly

81
Bones / Re: How to Fill SkinData
« on: June 17, 2016, 12:12:53 pm »
Code: [Select]
weights[x][y] = boneRefs.get(x).vertexWeight;
jointIndices[x][y] = boneRefs.get(x).vertexIndexReference;

if I understand your stucture correct, these should be just the opposite.

Code: [Select]
jointIndices[x][y] says vertex x is influenced by joint y, NOT joint x influences vertex y. similar for weights.

looks like you shoud loop over boneRefs and fill in jointIndices and weights accordingly. not the other way around

82
Bones / Re: How to Fill SkinData
« on: June 16, 2016, 09:56:52 am »
MAX_JOINTS_PER_VERTEX = 4

jointIndices is a [mesh size][MAX_JOINTS_PER_VERTEX] short array, describing which joints in skeleton is affecting each vertex.

weights is a [mesh size][MAX_JOINTS_PER_VERTEX] float array, describing how much each vertex is affected by corresponding joint in skeleton. if weight is zero, no calculation is done and corresponding jointIndex is irrelevant.

83
Bones / Re: Rigged JPCT Bone Models
« on: May 25, 2016, 08:56:24 am »
which models are you talking about? some models on the wiki? if so, they are most possibly in public domain and can be reused, but better to check with the owner

84
Bones / Re: Which matrix is the best to rotate a bone?
« on: April 19, 2016, 10:26:37 am »
to get the rotation quat:

Code: [Select]
new Quaternion(SkeletonPose.getLocal(<index>))
and for sure that means, SkeletonPose.getLocal(<index>) actually contains the rotation information.

85
Bones / Re: Overlaping bones Animation
« on: March 30, 2016, 10:18:04 am »
Bones does not support skeletal animation blending (though Pose animations can be blended with each other and with a single skeletal animation)

you can use chase's skeleton helper to blend skeletal animations.

86
Bones / Re: SkinAnimation not displaying on android
« on: March 29, 2016, 11:53:58 am »
Joint.getBindPose()/getInverseBindPose() gives you information about the bind pose, not current translation/rotation.

you need pull that information from the matrices in SkeletonPose

87
I backtracked the code and notice jme library in Bones does not support morph animation. Do we have a newer jme library which support for that? If we use latest version, does it break anything?
nope, sorry. simply Bones doesnt support morph animation.

and why do you need morph animation with Bones? that kind of animation is what jPCT supports out of the box. export to a jPCT supported format (like MD2) and use that.

88
Bones / Re: SkinAnimation not displaying on android
« on: March 29, 2016, 09:25:36 am »
first make sure you didnt call AnimatedGroup/Animated3D.setAutoApplyAnimation(false), otherwsie you need to call AnimatedGroup/Animated3D.applyAnimation manually each frame.

looking at your code, you dont update quat2 and quat3 but update quat 3 times.

and also try adding some translation to your joint, rotations sometimes behave very unexpectedly.

89
Bones / Re: Bones joint rotate but mesh doesn`t update
« on: March 15, 2016, 01:59:06 am »
Edit: Another problem with the bones format/java serialization is that it removes the ability to obfuscate your code/bones lib (assuming you want to).
it's interesting that you call that a problem but not a restriction.

anyway, it's not a real restriction, you can exclude Bones' classes from obfuscation so serialized format wont cause a problem.

90
Bones / Re: Menu missing in ninja demo
« on: March 12, 2016, 10:08:14 pm »
np, it happens ;)

Pages: 1 ... 4 5 [6] 7 8 ... 133