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.

Topics - dcfingerprint

Pages: [1]
Bones / Positioning and orienting Object3D with a Bones joint?
« on: December 08, 2016, 10:18:51 pm »

I'm interested in dynamically adding an Object3D to the world and positioning/orienting it relative to a particular Bones Joint in an Animated3D.   

For example - to place an dynamically created object in the hand of a model, and keeping it aligned with the hand as it moves/rotates.  (Or a hat on the head of a model, which will stay on the head, regardless of how the model animates.) 

Any tips for getting the position and rotation to use with either Object3D.setTranslationMatrix(), setRotationMatrix(), or using Object3D.translate(x,y,z) / rotateX(), rotateY(), rotateZ() / rotateAxis() ? 

The Object3D to "attach" could either be a sibling of the Animated3D root, or a child.

Any code samples would be appreciated.  Thanks!

Support / ShadowHelper - shadows cast close to receiver
« on: October 27, 2016, 09:53:33 pm »
Hi there,

Been trying out ShadowHelper in the new JPCT-AE along with some animated characters. 
Generally works great!  However, I have noticed some artifacts where shadows do not appear to render properly on the receiver when the casting object (in this case a bones character) is very close. 

In particular, you can see in the images below, the feet of the characters result in a "hole" in the shadow when the feet are near or on the floor.   I've tried experimenting with raising the object further up off the floor - and then it looks OK at some point (no "holes"), however then the scene of course doesn't look right since the character appears floating above the floor, instead of standing on it. 

All objects/meshes from the character are added as casters, and the floor is the single receiver.

Code: [Select]

                Projector projector = new Projector();
                sh = new ShadowHelper(mRenderer.mFrameBuffer, projector, 1024);

                projector.setClippingPlanes(1f, 1000f);
                projector.setFOVLimits(0, 999);
                float fov = projector.convertDEGAngleIntoFOV((float) fieldOfView);



                int intColor = Utils.parseColor(shadowColor);
                int red =;
                int green =;
                int blue =;
                sh.setAmbientLight(new RGBColor(red, green, blue));

                AnimatedGroup group = getGroup(casterName);
                if (group != null) {
                    for (Animated3D a : group) {

Any ideas for config or anything else I may be doing wrong?  Example image attached.


FATAL EXCEPTION in thread: GLThread 248
java.lang.ArrayIndexOutOfBoundsException: length=1640; index=1640
    at com.threed.jpct.Mesh.compress(
    at com.threed.jpct.Mesh.cloneMesh(
    at com.threed.jpct.Object3D.copy(
    at com.threed.jpct.Object3D.<init>(
    at raft.jpct.bones.Animated3D.<init>(
    at raft.jpct.bones.AnimatedGroup.clone(

I've seen this exception for a couple of models now when attempting to clone an AnimatedGroup loaded via Bones with reuseMesh = false.  (The model was converted from Blender to Ogre to .bones using    Not a problem in general but has occurred with specific models from completely different sources.  Any ideas?  I can send the .bones file if needed.  Thanks!

Pages: [1]