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

Pages: 1 ... 10 11 [12] 13 14
166
Support / Does jPCT-AE support shadow?
« on: August 01, 2012, 08:36:40 am »
There is a ShadowHelper  class in jPCT but not in jPCT-AE.

I want to use shadow in my world with jPCT-AE, is there any simple way to do this?

Thanks!

167
Bones / Re: How to set material for objects in .bones?
« on: July 31, 2012, 01:09:31 pm »
 > set texture and use lighting

Does the material decide how a model looks like in the lighting(s)? 

What's the difference between a model with texture only and a model with both texture and material?

Do animated3D objects have default material?

Thanks!

168
Bones / Re: How to set material for objects in .bones?
« on: July 31, 2012, 11:18:26 am »
So,  there is no way to use material for Animated3D objects. Is that right?

Without material and lighting, my dog seems not good, could you give me any advices?

169
Bones / How to set material for objects in .bones?
« on: July 31, 2012, 10:58:18 am »
OgreMax exported the .material.xml,  but how to use it?

Is .bones including the material info?

170
Support / ERROR: before: glError 1285
« on: July 30, 2012, 03:07:55 pm »

Everything was ok when  my code like this:

 
Code: [Select]
Texture dogTexture = new Texture(mResources.openRawResource(R.raw.dog));  //the same texture-res
      Texture worldTexture = new Texture(mResources.openRawResource(R.raw.dog));    //the same texture-res
      Texture skyTexture = new Texture(mResources.openRawResource(R.raw.dog));       //the same texture-res

      TextureManager.getInstance().addTexture("dog", dogTexture);
      TextureManager.getInstance().addTexture("sky", dogTexture);
      TextureManager.getInstance().addTexture("world", worldTexture);

 
But crashed when i changed the codes to:

 
Code: [Select]
Texture dogTexture = new Texture(mResources.openRawResource(R.raw.dog));
      Texture worldTexture = new Texture(mResources.openRawResource(R.raw.dog));
      Texture skyTexture = new Texture(mResources.openRawResource(R.raw.dog));

      TextureManager.getInstance().addTexture("dog", dogTexture);
      TextureManager.getInstance().addTexture("sky", skyTexture);       //modified here
      TextureManager.getInstance().addTexture("world", worldTexture);


res/raw/dog is a 512*512 jpg. Crash info:

07-30 20:18:08.656: E/AndroidRuntime(10787): FATAL EXCEPTION: GLThread 10
07-30 20:18:08.656: E/AndroidRuntime(10787): java.lang.RuntimeException: [ 1343650688631 ] - ERROR: before: glError 1285
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.Logger.log(Logger.java:189)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.GL20.checkError(GL20.java:142)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.GL20.glGenBuffers(GL20.java:1312)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.CompiledInstance.compileToVBO(CompiledInstance.java:1291)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.CompiledInstance.render(CompiledInstance.java:529)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2211)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.World.draw(World.java:1307)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at com.threed.jpct.World.draw(World.java:1074)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at net.wenyu.Main3DSurfaceView$MyRenderer.renderWorld(Main3DSurfaceView.java:245)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at net.wenyu.Main3DSurfaceView$MyRenderer.onDrawFrame(Main3DSurfaceView.java:145)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-30 20:18:08.656: E/AndroidRuntime(10787):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

171
Bones / Re: Animation seems strange
« on: July 30, 2012, 02:52:47 pm »
It works! ;D Thank you very much!

172
Bones / How to improve the performance of animation?
« on: July 29, 2012, 02:13:47 pm »
My dog has 10364 triangles.

On my phone, the static-dog-fps is about 60, that's not bad, but when played the skin-animation, the fps dropped to only 6 fps, it seemed to be rather slow.

I have refered to jpct-ae-wiki-"Performance tips for Android", but seemed to be little help with my situation.

So, are there any advices to improve the performance of animation without reducing the faces of dog-model?

I am a beginner of 3D-graphics, so i want to know why an animating-object is much slower than the static one? What's the hotspot? And how to resolve it? I have tried to do the profiling with android-ADT,  and seemed like that the applySkeletonPose() cost the most cpu-time. I don't know if the bones-animation used the gpu(or other graphic-hardware) power, and how to profile this.  And how the hardware of a phone affect the performance, which is the most important factor: cpu、ram、gpu or others?

Thanks!

And my code is rather simple:
    Load an .bones animated-object, set AmbientLight, then play skin-animation.

There is almost little difference of the performance  between opengles-1.X and opengles-2.0 with my simple project.

173
Bones / Re: Animation seems strange
« on: July 29, 2012, 09:30:08 am »
Yes, i prefer .bones too.

And i have sent the files to you, thanks!

174
Good job! Thanks!

But where should i download the latest version?

I tried this: http://aptalkarga.com/bones/#download

But i compared the latest(downloaded) version with the old one, they are just the same. And there is no methond: AnimatedGroup.setVisibility(..) in the latest version.

Another question:

I watched the bones-update-history: many error was caused by jme-2.1.  I don't know if can use jme-3.0 to instead of jme-2.1.

And i want to use Ogre-XML(converted to some compacted binary format like .bones)  as my only model-format(both static and animated). But the convert-bones-script doesn't  work when there is no animation-info in ogre-xml.  Can you add some classes or methods to support this? And can you support Morph-animation and .scene-loading?




175
Bones / Re: Animation seems strange
« on: July 28, 2012, 12:32:46 pm »
I have checked again. The same mesh+skeleton played fine in OgreMax-WinViewer, but strange on phone with .bones(tail stretched). I am not sure how to use .xml instead of .bones, so i don't know if the result are some difference between them.  Could you do a test with my .xml? This problem bore me a long time. Thanks!

Here are my codes:

     
Code: [Select]
  //onSurfaceCreated
         AnimatedGroup group = BonesIO.loadGroup(mContext.getAssets().open("dog21.bones"));
        mGroup = group;
        for(Animated3D a : group)
        {
          a.setTexture("world");
          a.build();
        }
        mDog = group.get(0);
         group.addToWorld(mWorld);
      Camera camera = mWorld.getCamera();
      camera.setPosition(0, 0, 150);
      camera.lookAt(mDog.getTransformedCenter());
      camera.rotateCameraZ((float) Math.PI);
      mWorld.buildAllObjects();

      mFrameBuffer = new FrameBuffer(480, 800);
      MemoryHelper.compact();
       


// onDrawFrame

      mDog.setAutoApplyAnimation(false);
      mDog.animatePose(time_line, animation_index);
      mDog.animateSkin(time_line, animation_index);
      mDog.applyAnimation();

     time_line += 0.05 * speed;

      if(time_line > 1)
        time_line = 0.01f;

      mFrameBuffer.clear();
      mWorld.renderScene(mFrameBuffer);
      mWorld.draw(mFrameBuffer);
      mFrameBuffer.display();
           


176
Bones / Animation seems strange
« on: July 27, 2012, 07:02:48 am »
Maya2012 + OgreMax

First i made an dog-animation "run without position-moving"(which means the dog just run in situ). The animation played fine on my phone.

Then i changed the animation to "run with position-moving"(which means the dog run here and there). The .mesh and .skeleton runs fine in OgreMax-WinViewer. But when i played it on my phone(with .bones), something seemed to be strange:
 
  The dog's body moved, but the tail didn't move with the body. The tail seemed to stretched from origin position to where the dog's body moved to.

I tried jme3 with the same .mesh.xml and .skeleton.xml , evething was ok.

Shall i send the xml-file to you?

I will try .xml instead of .bones.

177
I have sent the files to you by email, thanks!

178
Bones / Proplem with blending pose-animation and skin-animation.
« on: July 25, 2012, 09:53:48 am »
My scene:
 1, Objcets: a rock + a dog
 2, Animations: rock-skin + dog-skin + dog-pose

I want to play all animations at the same time, my codes:

Code: [Select]
           //AnimatedGroup group
            group.animatePose(index, mAnimationIndex);             //dog-pose
            group.animateSkin(index, mAnimationIndex);              //dog-skin
            group.animateSkin(index, mAnimationIndex + 1);        //rock-skin
            group.applyAnimation();

When it run, just play rock-skin and dog-skin, dog-pose didn't be played. But if i changed my code like this(change order):


Code: [Select]
   group.animateSkin(index, mAnimationIndex);          //dog-skin
            group.animatePose(index, mAnimationIndex);         //dong-pose
            group.animateSkin(index, mAnimationIndex + 1);    //rock-skin
            group.applyAnimation();

Rock-skin 、dog-skin、dog-pose are all played.


And if:

 
Code: [Select]
   group.animateSkin(index, mAnimationIndex);          //dog-skin
            group.animateSkin(index, mAnimationIndex + 1);       //rock-skin
            group.animatePose(index, mAnimationIndex);           //dog-pose
            group.applyAnimation();

Dog-pose was played, and rock-skin seems to be played too, but rock-skin was rather different from what seen in maya.

Any advices?


179
Just clear some useless maya-historys. ;)

180
My artist has fixed this ;D, thanks!

Pages: 1 ... 10 11 [12] 13 14