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

Pages: [1]
1
Support / Camera: moveCamera(int mode, float speed)
« on: November 17, 2013, 01:03:29 am »
Hi,

I had this code:

Code: [Select]
cam.setPosition(camLookat);
Logger.log("1  " + cam.getPosition());
cam.moveCamera(Camera.CAMERA_MOVEOUT, 5);
Logger.log("2  " + cam.getPosition());

And then I got the log:

Code: [Select]
1  (-10512.435,409.47632,1982.2085)
2  (-11233.428,366.8882,1982.152)

Why the distance between the two positions were much larger than 5?
In the javadoc, its written like this: "speed - the speed (positional change in units)". Any where I missed some hidden scaling factor?

Thanks.

2
Support / object3D.setTranslationMatrix & setRotationMatrix
« on: November 03, 2013, 04:55:27 pm »
If the parameter matrix contains both rotation and translation values, it appears that setTranslationMatrix won't apply the rotation to the object but setRotationMatrix will also apply the translation to the object.

I'm not sure if the behavier of setRotationMatrix can be called a bug but I had been stuck here for quite some time before I found this.

3
Support / question about Interact2D.reproject2D3DWS
« on: August 24, 2013, 09:31:33 pm »
Hello, I have a question about Interact2D.reproject2D3DWS.

Basically I was to pick an object3D by the mouse click on the desktop window. Following the Picking page of jpct wiki, I used the compatible way:

fb = new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);
..........
..........
SimpleVector dir = Interact2D.reproject2D3DWS(cam, fb, clickX, clickY).normalize();      
Object[] res = calcMinDistanceAndObject3D(cam.getPosition(), dir, 50000);

However I found that the picking only worked to the objects which were in the center area of the window AND when the camera is very close to the target object. The attached picture shows my 3D scene (each colorful triangle in the picture is an instance of Object3D).

I feel rather confused on the returned SimpleVector of Interact2D.reproject2D3DWS. Can anyone please explain it a bit or give me some suggestion on my problem? Many thanks.



[attachment deleted by admin]

4
Bones / Distorted model mesh
« on: July 25, 2013, 03:07:54 pm »
Hi raft / all,

I tried to test a monster animation in jPCT with bones. The model and animation was prepared by my artist in 3DMax,  exported by OgreMax, and converted with OgreXMLConverter and then jmeOgre2Bones. The conversion ran smoothly and my monster.bones was created. I put it into the Bones ninja demo. The animation action seemed to be correct, however the mesh was distorted, as shown in the attached picture (the one with the blue background). What stage could the problem be? Is there any way to verify the Ogre mesh/skeleton or the xml files?

Many thanks.

[attachment deleted by admin]

5
Bugs / Object3D.mergeObjects and setTransparency
« on: June 01, 2012, 01:01:04 am »
I'm not sure if this is a bug or intended. With this code:

Code: [Select]
mesh_0.setTransparency(255);
mesh_0.setTexture("tex_with_alpha");
mesh_1.setTexture("tex_solid");
Object3D mesh = Object3D.mergeObjects(mesh_0, mesh_1);

Then the mesh_0 part loses the alpha setting (100% transparency --> black).

Sorry if this has been discussed before.
(Tested on Sony Ericsson Xperia Play.)

6
Hi, I got this error when trying to modify the Bones Ninja Demo code. Could anybody suggest me where the problem might be? Thanks.

Code: [Select]
05-30 17:16:04.032: W/dalvikvm(4924): threadid=9: thread exiting with uncaught exception (group=0x2aac8578)
05-30 17:16:04.032: E/AndroidRuntime(4924): FATAL EXCEPTION: GLThread 10
05-30 17:16:04.032: E/AndroidRuntime(4924): java.lang.NoSuchMethodError: com.threed.jpct.SimpleVector.rotate
05-30 17:16:04.032: E/AndroidRuntime(4924): at raft.jpct.bones.Animated3D.applySkeletonPose(Animated3D.java:491)
05-30 17:16:04.032: E/AndroidRuntime(4924): at raft.jpct.bones.AnimatedGroup.animateSkin(AnimatedGroup.java:178)
05-30 17:16:04.032: E/AndroidRuntime(4924): at free.csr.android.arena.ModelAnimationGroup.animate(ModelAnimationGroup.java:52)
05-30 17:16:04.032: E/AndroidRuntime(4924): at free.csr.android.arena.MyRenderer.onDrawFrame(MyRenderer.java:175)
05-30 17:16:04.032: E/AndroidRuntime(4924): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
05-30 17:16:04.032: E/AndroidRuntime(4924): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)


7
Hi raft/guys,

New to jPCT/Bones, I got a problem when converting my models/animations in Blender/3D Max to bones.

I'm currently playing around Diablo III models and trying to port them to my Android phone. Since I couldn't find any way to export the original animations from the game, I exported the mesh and texture of a model in game, and then manually rigged and animated it in Blender (2.63).

I then exported the model/animation with blender2Ogre-0.5.7, settings shown as the attached picture. I got two files: Leah_mesh.mesh.xml and Leah_mesh.skeleton.xml. Then I tried to convert them to bones with jmeOgre2Bones.bat, and I got this info:

Code: [Select]

d:\_WorkAtHome\Diablo3Dev\Models\Bones\scripts>jmeOgre2Bones -in Leah_mesh.mesh.
xml

d:\_WorkAtHome\Diablo3Dev\Models\Bones\scripts>echo off
27-May-2012 21:37:51 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
27-May-2012 21:37:51 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
27-May-2012 21:37:51 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
......
(a lot of same warnings here)
......
27-May-2012 21:37:51 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
-- total 54 joint(s) --
0 name: root, parent:
1 name: wrist_IK.L, parent: 0:root
2 name: wrist_IK.R, parent: 0:root
3 name: elbow_IK.L, parent: 0:root
4 name: elbow_IK.R, parent: 0:root
5 name: ankle_IK.L, parent: 0:root
6 name: ankle_IK.R, parent: 0:root
7 name: knee_IK.L, parent: 0:root
8 name: knee_IK.R, parent: 0:root
9 name: hip, parent: 0:root
10 name: spine.lower, parent: 9:hip
11 name: upperLeg.L, parent: 9:hip
12 name: upperLeg.R, parent: 9:hip
......
......
......
51 name: finger_3_tip.R, parent: 41:finger_3.R
52 name: finger_4_tip.R, parent: 42:finger_4.R
53 name: thumb_tip.R, parent: 43:thumb.R
-- --
Skeleton created out of jME OGRE skeleton, 54 joints
[ Sun May 27 21:37:51 BST 2012 ] - WARNING: skipping null TexCoords
Created skeleton animation clip: my_animation
Loaded ogre file: Leah_mesh.mesh.xml, scale: 1, rotation: null
        1 sub objects, 1 skin animation(s), 0 pose animation(s)

d:\_WorkAtHome\Diablo3Dev\Models\Bones\scripts>



And I couldn't find any output file(s)! I don't know if the conversion was successful or not from those information.

Then I also tried this route: blender(263) -> .FBX -> Autodesk FBX converer -> .FBX -> 3D Max 2012 -> OgreMax -> .mesh and .skeleton -> OgreXMLConverter (in OgreCommandLineTools_1.7.2) -> .mesh.xml and .skeleton.xml -> jmeOgre2Bones ->

and got this error:

Code: [Select]

C:\Users\rafael\Downloads\Bones\scripts>jmeOgre2Bones -in Mesh.mesh.xml

C:\Users\rafael\Downloads\Bones\scripts>echo off
27-May-2012 22:11:24 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
........
(a lot of same warnings)
........
27-May-2012 22:11:24 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
Exception in thread "main" java.lang.IllegalArgumentException: No controller fou
nd in OgreEntityNode. Means there is no skeleton or pose animation!
        at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:132)
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:1
12)
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:8
8)
        at raft.jpct.bones.util.JMEOgreImporter.run(JMEOgreImporter.java:69)
        at raft.jpct.bones.util.JMEOgreImporter.main(JMEOgreImporter.java:170)

C:\Users\rafael\Downloads\Bones\scripts>


The model with animation looked fine in 3D Max. I watched Mesh.mesh file with OgreMaxViewers 2.4.3, the model appeared to be fine (actually I don't have a good knowledge of Ogre so don't know whether the .mesh file was correctly exported).

Could someone please help to have a look where my problem is? Some guides on the procedure and necessary tools (with their versions) for the conversion are extremely appreciated. I have searched this forum for these, but Blender and Ogre and 3D Max upgrade their versions so quickly, and it seems that many exporters/ conversion tools works only for some particular versions, which made me quite confused.

Thanks a lot.

[attachment deleted by admin]

Pages: [1]