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

Pages: [1]
Bones / Water particle to come out of bottle, need help
« on: August 14, 2012, 05:06:49 pm »
Hi All,
I have a water bottle to be animated. When user shakes the bottle water should come out from the water bottle. I got the mesh and skeleton file for the water bottle, but I am not sure how to get the water coming out of the bottle.

My graphic designer in addition to bottle.mesh and bottle.skeleton has given me bottle.material file and water.particle.xml file. I am not sure how to use the files along with bones.

Link for water.particle.xml file for your reference,

Please help me in this regard.


Support / Random Crash in onDrawFrame
« on: August 03, 2012, 03:46:50 pm »
Hi All,

In my application based on gesture event Objects are moved. On collision with other object, I remove the object. Some times I am getting random crashes onDrawFrame() because of NullPointerException in drawVertexArray.

08-03 19:05:13.160: E/AndroidRuntime(18542): FATAL EXCEPTION: GLThread 18
08-03 19:05:13.160: E/AndroidRuntime(18542): java.lang.NullPointerException
08-03 19:05:13.160: E/AndroidRuntime(18542):    at com.threed.jpct.GLRenderer.drawVertexArray(
08-03 19:05:13.160: E/AndroidRuntime(18542):    at com.threed.jpct.World.draw(
08-03 19:05:13.160: E/AndroidRuntime(18542):    at com.threed.jpct.World.draw(
08-03 19:05:13.160: E/AndroidRuntime(18542):    at com.goora.matthew.nappybunch.ui.BlendRenderer.onDrawFrame(
08-03 19:05:13.160: E/AndroidRuntime(18542):    at android.opengl.GLSurfaceView$GLThread.guardedRun(
08-03 19:05:13.160: E/AndroidRuntime(18542):    at android.opengl.GLSurfaceView$

I am not sure what I am doing wrong. Any idea why this can happen?

Support / Object is not fully seen
« on: July 10, 2012, 12:15:49 pm »
Hi All,

I am using bones in my android project. My object is very near to the camera, as it is close to the camera, object is not fully seen. Camera radius is calculated based on the height of the object.

float[] bb = calcBoundingBox();
      Log.d(TAG, "autoAdjustCamera: Bounding box="+bb.toString());
      float groupHeight = bb[3] - bb[2];
      Log.d(TAG, "autoAdjustCamera: groupHeight="+groupHeight);
      cameraRadius = calcDistance(camera, frameBuffer,
              frameBuffer.getHeight() / 1.5f , groupHeight);
        minCameraRadius = groupHeight / 10f;
        cameraTarget.y = (bb[3] + bb[2]) / 2;

I noticed the width and height obtained from  skin.getMesh().getBoundingBox(); is very small values but the actual object is not a small object.

07-10 15:44:35.070: D/BlendShape(5727): height min-7.421923

07-10 15:44:35.070: D/BlendShape(5727): height max-0.5732739

07-10 15:44:35.070: D/BlendShape(5727): width min-1.96085

07-10 15:44:35.070: D/BlendShape(5727): width max1.96652

Please let me know if there is any issue in calculating the camera radius or there is any issue in my model.

Thanks and Regards,

Bones / Multiple rotation argument in bones conversion
« on: May 17, 2012, 07:07:40 am »
Hi All,

I am trying to convert mesh.xml file to .bones file with multiple rotation argument (x90,z180) but I am getting an Illegal argument exception.

D:\jpct\bones\Bones\scripts>jmeOgre2Bones.bat -rotation x90,z180 -out -in model.mesh.xml

D:\jpct\bones\Bones\scripts>echo off
Exception in thread "main" java.lang.IllegalArgumentException: Unknown args: [z1
        at raft.jpct.bones.util.JMEOgreImporter.main(

I saw the help manual, it is mentioned to add comma between the arguments.

usage: JMEOgreImporter [options] -in <ogre.mesh.xml> [ogre.mesh.xml...]
    -out <destination file>                         : destination file to write
    -scale <scale>                                  : loading scale, default 1
    -rotation <<x|y|zdegrees>[,x|y|zdegrees]...>    : loading rotation, default
none (sample: x180,y180)

Please let me know if I am missing some arguments.

Thanks and Regards,

Bones / Problem while converting skeleton to xml
« on: May 08, 2012, 07:09:40 pm »

I am getting following error while converting the skeleton file to xml,

lod levels       = none (or use existing)
Generate edge lists  = 1
Generate tangents = 0
 semantic = TANGENT
 parity = 0
 split mirror = 0
 split rotated = 0
Reorganise vertex buffers = 1
Optimise animations = 1

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
Registering ResourceManager for type Mesh
Registering ResourceManager for type Material
Registering ResourceManager for type Skeleton
Exception caught: A bone with the handle 1 already existsUnregistering ResourceM
anager for type Skeleton
Unregistering ResourceManager for type Material
Unregistering ResourceManager for type Mesh

Please let me know when this error can occur ?


Support / Normal Map for Texture
« on: January 27, 2012, 04:23:31 pm »
Hi All,

My graphic designer likes to know if she can use Normal maps for the texture. Is it possible to use the texture which has used normal map?


Support / Detecting touch on particular position on the model
« on: January 27, 2012, 04:42:04 am »
Hi All,

I like to know if a particular part like head or leg in the model is touched. With collision detection I am able to get the polygon ID. As Polygon ID is generated by the JPCT_AE system, will I be able to map the model with polygon ID and know which particular part is touched?

Or do I need to make head and leg as separate meshes so that I can detect using collision detection?


Bones / collision with Bones
« on: January 12, 2012, 12:05:41 pm »
Hi All,

In normal 3D object in World space, following collision detection code worked.

            sphere.addCollisionListener(new CollisionListener() {
               public boolean requiresPolygonIDs() {
                  // TODO Auto-generated method stub
                  return false;
               public void collision(CollisionEvent arg0) {
                  Log.i("HelloWorldJPCT", "Sphere collision");

When I tried the collision detection in Bones sample code , I never got any log message, Following is the code

      ninjas.get(0).get(0).addCollisionListener(new CollisionListener() {
         public boolean requiresPolygonIDs() {
            // TODO Auto-generated method stub
            return false;
         public void collision(CollisionEvent ce) {
            // TODO Auto-generated method stub
            Log.i("app", "On collision");

Please let me know if I am missing something.


Bones / Ogre to Bones conversion
« on: December 23, 2011, 07:27:18 am »

Hi All,

I am new to JPCT. I am currently trying to convert ogre xml file to bones.

My artist gave me the mesh and skeleton xml file. But in mesh xml, the skeleton link was missing.
I manually added the skeleton link and when I executed jmeOgre2Bones bat file I got the following error, (Windows7 operating system)

jmeOgre2Bones.bat -out -in my_V008_test.mesh.xml

Skeleton created out of jME OGRE skeleton, 48 joints
Exception in thread "main" java.lang.NullPointerException
        at raft.jpct.bones.BonesImporter.convertJMESkinData(
        at raft.jpct.bones.BonesImporter.importOgre(
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(
        at raft.jpct.bones.util.JMEOgreImporter.loadGroup(

I like to know,

i) What my artist should do for missing skeleton link in mesh file? Do my artist need to do anything while exporting the data from 3d studio?
ii) Why I am getting, NullPointerException while convertJMESkinData

Thanks in Advance.


Support / Need to drag an 3D object based on touch
« on: November 23, 2011, 07:30:41 am »

I have a requirement where I have to drag the object based on user touch movement (basically touch & drag). Based on the topic Picking, I am able to identify if an object is touched.

My understanding to achieve drag is the object must be translated based on touch coordinates.

I understood how to get 3D to 2D coordinates and viceversa. I am unable to understand,

i) how to co relate this to translation?

ii) How the screen width and height is translated to translate factors,

when I tried

object.translate(-100,100,0); the object was not seen. I tried by trial and error and found translate x should be in range of -30 to +30 and y in range of  -45 to +45.

I did the following Math calculation on Touch listener

if (me.getAction() == MotionEvent.ACTION_MOVE) {         
         xpos = me.getX();
         ypos = me.getY();
         if(sphereclicked) // if the object is clicked
         SimpleVector touchvector =
            Interact2D.reproject2D3DWS(world.getCamera(), fb, (int)xpos, (int)ypos).normalize();

         sphere_vector = Interact2D.projectCenter3D2D(fb,sphere); // sphere is the 3D object
         if(diff == null)
            diff = new SimpleVector();
         diff.x = ((sphere_vector.x) - xpos)/-10.5f; // this is also trial and error , I didnt understand the Math behind it :(
         diff.y = ((sphere_vector.x) - ypos)/-10.5f;
         diff.z = 0;
             Log.i("HelloWorldJPCT", "diff : %d %d %d" + diff.x+ " "+
                   diff.y+" "+ diff.z);

And on Draw Frame,

if(sphereclicked == true)

But after this code, object moves in y-axis and x-axis. But in negative y-axis, the object doesn't move till the end of the screen. The same with x-axis, it never moves till the end of X-Axis.

I am attaching my code for your reference. Please help me to understand the concept behind this. How to relate the touch cordinates to translate for an object.

Thanks in Advance,

[attachment deleted by admin]

Pages: [1]