www.jpct.net
Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: jaychang0917 on April 05, 2017, 09:42:51 am
-
Suppose my model is a composite of objects, and each object contains few materials, I need to map different texture for each material.
I tried to print the name, i can't get the material name but object name. How can I get the material name of each object?
for (Animated3D o : skinnedGroup) {
System.out.println("name:" + o.getName());
o.build();
o.discardMeshData();
}
// output
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:headMesh_triangles
name:Cover_LMesh_triangles
name:Cover_LMesh_triangles
name:Cover_RMesh_triangles
...
-
you cannot I believe. materials and texture information is not passed to Bones during export-import process. texture coordinates are passed though.
in this case, you can for example bake the materials into a texture and assign that texture to your Animated3D's
-
video not appearing part may also related to a thread synchronization issue. in particular if you dont consume a video frame new update never arrives (as far as I remember)
-
you cannot I believe. materials and texture information is not passed to Bones during export-import process. texture coordinates are passed though.
in this case, you can for example bake the materials into a texture and assign that texture to your Animated3D's
i tried to set the texture by Animated3D index instead of name, seems work.
animatedGroup.get(0).setTexture("head");
animatedGroup.get(1).setTexture("headTop");
animatedGroup.get(2).setTexture("head");
...
-
video not appearing part may also related to a thread synchronization issue. in particular if you dont consume a video frame new update never arrives (as far as I remember)
?? you are answering my qestion? :)
-
i tried to set the texture by Animated3D index instead of name, seems work.
animatedGroup.get(0).setTexture("head");
animatedGroup.get(1).setTexture("headTop");
animatedGroup.get(2).setTexture("head");
...
nice :)
video not appearing part may also related to a thread synchronization issue. in particular if you dont consume a video frame new update never arrives (as far as I remember)
?? you are answering my qestion? :)
nope, sorry, wrong thread, have no idea how this happened :D
-
raft, I found that the imported model is not rendered correctly. If the geometry contains multiple elements, it seems only render the first element. Do you have any idea?
-
which pipeline are you using, Collada or Ogre3D?
are you sure it's exported correctly?
-
which pipeline are you using, Collada or Ogre3D?
are you sure it's exported correctly?
I am using Collada.
I found that the model is rendered correctly using the ProceduralAnimationBonesSample, is it the jpct-ae problem?
-
interesting, might be jpct-ae
-
interesting, might be jpct-ae
Almost all code are the same for desktop and android version except the FrameBuffer object creation.
For android (jpct-ae)
frameBuffer = new FrameBuffer(width, height);
For desktop (jpct)
frameBuffer = new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);
So what approach can i take to solve this problem?
-
may be ask in jpct-AE forum? :)
-
may be ask in jpct-AE forum? :)
I post a new thread in jpct-AE forum, see if you have any idea :)
http://www.jpct.net/forum2/index.php/topic,4878.msg33311.html#msg33311 (http://www.jpct.net/forum2/index.php/topic,4878.msg33311.html#msg33311)
-
It doesn't seem appropriate now that I've read the rest of the thread, but it's useful to point out the following max script that I use to create texture atlases (it fails 30% of the time but it's still very useful when it works): http://www.scriptspot.com/3ds-max/scripts/texture-atlas-generator (http://www.scriptspot.com/3ds-max/scripts/texture-atlas-generator)