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

Pages: 1 [2]
16
Support / Re: question about Interact2D.reproject2D3DWS
« on: August 27, 2013, 01:14:01 am »
Egon, many thanks for your help. That's exactly what my problem was caused. I added the Y offset between the window and the canvas (I used GLCanvasRenderer) to the mouse position and the picking works perfectly now.

17
Support / Re: question about Interact2D.reproject2D3DWS
« on: August 26, 2013, 12:09:07 am »
Thanks Egon for the detailed explanations.

The size of the 3D box containing my objects is about 12000 * 12000 * 1000 and the length of my single object is around 100-200. When I couldn't pick anything, the distance between the camera and objects was about 10000. And when I moved the camara closer with the distance below 1000 (when the target object filled or half filled the window), it could be easily picked. However I could hardly work out an exact value as the critical point. But the objects near the window center were always more "easily" to be picked ( when I said "easily", I mean those objects could be picked when the camera was relatively farther).

I had some further tests today and found something interesting. The attached picture shows my 3D scene. I adjusted the camera and made the objects be positioned in a line along the Y axis in the window center. Then when object 1 was clicked, object 2 was selected instead; and when object 3 was clicked, object 4 was selected. I tried to repeat this test on X axis, but failed to pick anything at the similar camera distance. It looked the Y coordinate in camera space was doubled during the transformation?

Many thanks.


[attachment deleted by admin]

18
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]

19
Bones / Re: Distorted model mesh
« on: July 26, 2013, 12:08:44 pm »
Thanks raft.

The problem has been solved by my 3d artist. I don't understand what exactly she changed but it seems to do with some "envelope" problem and was caused by something - "too large size of the effective region of skeletons". Sorry I'm not an expert at those 3dmax terms, but do hope this might make a little bit sense to others.

20
Bones / Re: Distorted model mesh
« on: July 25, 2013, 09:43:40 pm »
Thanks for your suggestion. I opened the .mesh file with  the OgreMax viewer . The model showed properly at first, but when I enabled the animation, the mesh was gone and nothing in the scene left.

I also tried to use the desktop version of bones sample "LoadBonesFormatSample.java" to load this .bones file. The model could also be shown. And once the animation was started, the mesh seemed to be drawn aside and distorted. The animated skeletons however seemed to be correct as was in Android version. The attached is the skeleton snapshot from the sample.

Is there any special operation when doing rigging or animating in 3DMax for using OgreMax?

[attachment deleted by admin]

21
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]

22
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.)

23
Worked it out myself. I somehow used an old version of jpct-ae, probably from source code of some example.

24
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)


25
Exactly as you said. The conversion command should be:

jmeOgre2Bones -out leah.bones -in Leah_mesh.mesh.xml

"-out" option should be put before the "-in" one and can't be omitted.

I got the output now but still need some work on the rotation.

Many thanks for your help!

26
Hi raft,

Thanks for your reply.

I also checked the "Shape Animation" and "Independent Animations" options and exported my model. But the results looked the same.

From the exporter, I got two files: Leah_mesh.mesh.xml(765K) and Leah_mesh.skeleton.xml(4061K).

What I did is

Code: [Select]
jmeOgre2Bones -in Leah_mesh.mesh.xml

and then

Code: [Select]
jmeOgre2Bones -in Leah_mesh.skeleton.xml

And the outputs were:

Code: [Select]
d:\Models\Bones\scripts>jmeOgre2Bones -in Leah_mesh.mesh.xml

d:\Models\Bones\scripts>echo off
29-May-2012 13:55:42 com.jmex.model.ogrexml.anim.SkeletonLoader loadSkeleton
WARNING: Rotation axis not normalized
......
29-May-2012 13:55:42 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
.........
53 name: thumb_tip.R, parent: 43:thumb.R
-- --
Skeleton created out of jME OGRE skeleton, 54 joints
[ Tue May 29 13:55:42 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:\Models\Bones\scripts>jmeOgre2Bones -in Leah_mesh.skeleton.xml

d:\Models\Bones\scripts>echo off
Exception in thread "main" com.jmex.model.ModelFormatException: Input XML file d
oes not have required root element 'mesh'
        at com.jmex.model.XMLUtil.loadDocument(XMLUtil.java:113)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:241)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:193)
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:1
10)
        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)

Thank you very much.

27
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 [2]