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 - kkl

Pages: 1 2 3 [4] 5 6 ... 20
hi egon,

I'm not so familiar with matrix transformation, but I did try using obj export method in Blender's source code (global matrix * object rotation matrix), where global matrix is the destination matrix which represent JPCT coordinate system and object rotation matrix obtained from Blender API. Yet, no luck on that. I wonder if you can show few guidance on the matrix tranformation, perhaps the one you mentioned, mirror transformation, or other keyword to look for in google.   

I have an object following 2 paths. When object follows 1st path, it would have specific rotation (e.g. 90 degree x axis). When it follows the 2nd path, it should have another rotation (e.g 75 degree y axis). I created these in Blender and use the rotation matrices for the object in JPCT AE.

The rotation matrices are retrieved using the Blender Python API as suggested from

And the reason I'm doing all these in Blender instead of JPCT AE becoz it would be tedious to create another separate UI in Android to adjust object rotation till it has the correct rotation we want.

hi egon,

I realized the coordinate system I mentioned from Blender is incorrect, it should be like this:
+Z is up
+X is right
+Y is forward

with translation vector at column 3 (which i believe column major matrix)

Apology for the mistake.

I did try with your methods, and the model rotation doesn't seem to be correct. I checked and Blender is using right hand coordinate system, and I'm guessing JPCT is using left hand coordinate system? CMIIW, converting right hand system to left hand system cannot be done by only rotation, right?


I have one rotation matrix retrieved from Blender with the following coordinate system:
+Z is up
+X is right
-Y is forward

How do we map/convert that matrix with the coordinate system to JPCT's coordinate system?

Bones / Re: Hardware skinning needed
« on: April 14, 2015, 03:06:19 pm »
Strangely, I tried negating final position y and z in shader (which i think it's same with rotateX) and it works ok now. I wonder if I missed somewhere in software part.

Bones / Re: Hardware skinning needed
« on: April 14, 2015, 02:45:46 pm »
Not sure where went wrong.. Currently i cant find the root cause, is it possbile if we can have an option to disable clipping object process for temporary solution?

Bones / Re: Hardware skinning needed
« on: April 13, 2015, 04:29:28 pm »
Hi raft and egon,

Sorry for bringing this up. Previously I have implemented hardware skinning and was having initial rotation issue, in which the object appears different rotation than the one original with software skinning. The incorrect rotation started to cause issue when JPCT detects clipping boundary and object is not in the screen and it's automatically not showing the object, but in actual it should show as it's just having different rotation after processing in shader, which is after clipping process.

I was just wondering if there's any addition rotations applied before vertex is passed to shader. I'm afraid I might have missed some rotation matrices, or it could be something else that cause the issue. Thanks.

Bones / Re: Simple way to rotate entire skeleton permanently
« on: April 08, 2015, 05:30:20 pm »
tat's exactly what I'm looking for! Never notice the script has that options.. It works great now. Thanks alot raft.

Bones / Re: Simple way to rotate entire skeleton permanently
« on: April 07, 2015, 04:52:45 pm »
why do you want to rotate the skeleton?
The reason I would need to rotate the skeleton is because of the exporter exports 3D object in different coordinate system. Therefore, there's a need to convert exported coordinate system to JPCT's as been raised in this post,2524.msg18503.html#msg18503

I actually tried getRoot().rotateXX() and it worked! I tot it would be the same with Animated3D.rotateXX() in which the pivot point is reset. It seems ok now, but still need to double confirm if all objects behave the same too.

Thanks alot~

Bones / Simple way to rotate entire skeleton permanently
« on: April 05, 2015, 10:30:39 am »
hi raft,

Is there any simple way to rotate the entire skeleton of an object permanently like rotateMesh() in jpct? I'm trying to map different coordination system from Blender to JPCT. Thanks.

Support / Re: Light position transformation
« on: February 22, 2015, 04:59:36 pm »
Ok sure. Thanks egon.

Support / Re: Light position transformation
« on: February 16, 2015, 04:14:29 pm »
Thanks egon ; )

Support / Re: Light position transformation
« on: February 14, 2015, 06:02:26 am »
Hi egon,

I saw the Camera.transform() is creating new SimpleVector object for every use. Can we have another method to pass our own object for the result?

Support / Re: Light position transformation
« on: February 12, 2015, 03:23:39 pm »
I mean the initial light position is already negated. I think it might mess up the whole mapping coordination. I'll try to adjust the mapping and use the method you mentioned earlier to transform. Thanks alot ; )

Support / Re: Light position transformation
« on: February 10, 2015, 03:40:02 pm »
My bad.. The initial light position is negated at the beginning. Im using Blender to convert the light and other 3D object position into OBJ model and grab the position from there, so I dun have to rotate the mesh again. And the mapping is -Y for Y up and -Z for Z forward in Blender. But is it the correct way if we negate first and camera.tranform in this case? I tried just tranform w/o negating it, but the result seems incorrect.

Pages: 1 2 3 [4] 5 6 ... 20