Main Menu
Menu

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.

Show posts Menu

Messages - Babu

#31
thanks, Egon. 
But I forgot to mention that I am using jpct-ae and I don't find that API in the ae version  :(.  Is there any workaround that I can use for capturing the snapshot in ae?

P.S. sorry for not posting this query in the 'ae' forum  :-[
#32
Support / Basic Question: Capturing the FrameBuffer
June 22, 2011, 09:02:15 AM
Hi,

Is it possible to capture the FrameBuffer(i.e. a snapshot of what user sees) and save it as JPG/PNG?

Regards
#33
Bones / Re: Full Sleeve and Half Sleeve Shirts
May 25, 2011, 03:37:13 PM
thanks, raft.

I had 2 & 3 in mind.  Your first alternate is seems to be interesting.  :)  I'll try them out and get back you.
#34
Bones / Full Sleeve and Half Sleeve Shirts
May 25, 2011, 12:51:25 PM
hi raft,

I am planning to use a mesh (that sits on the same skeleton as the body) for shirt.  Is it possible to use the same mesh for full-sleeve and half-sleeve shirts.  If that is possible, how do we assign the texture coordinates?

Thanks,
Babu
#35
hi raft,

I am planning to use a mesh (that sits on the same skeleton as the body) for shirt.  Is it possible to use the same mesh for full-sleeve and half-sleeve shirts.  If that is possible, how do we assign the texture coordinates?

Thanks,
Babu
#36
thanks, raft.  That worked!!  ;D
#37
hi raft,

I am back  ;).  I could load the cylinder model with the pose animations in my Android app and I could have all the pose animations working fine.  I see that the skin-animation, "wave" is also working fine. 

But I am facing a problem when I try to have both skin and pose animations working together :(.  I am able see only that animation which I apply last in the code i.e. if I call animatePose() last then I see only pose animation and if I call animateSkin() last then I see only skin animation.  I am not sure if I am doing some wrong  ???.  Below is the code for onDrawFrame().  I am using Ninja Demo as the base for my app.


                public void onDrawFrame(GL10 gl)
{
if (frameBuffer == null) return;

long now = System.currentTimeMillis();
aggregatedTime += (now - frameTime);
frameTime = now;

if (aggregatedTime > 1000)
{
aggregatedTime = 0;
}

while (aggregatedTime > GRANULARITY)
{
aggregatedTime -= GRANULARITY;
skinAnimateSeconds += GRANULARITY * 0.001f * speed;
poseAnimateSeconds += GRANULARITY * 0.001f * speed;
placeCamera();
}

if (poseAnimation > 0 && rockyCylinder.getPoseClipSequence().getSize() >= poseAnimation)
{
float clipTime = rockyCylinder.getPoseClipSequence().getClip(poseAnimation-1).getTime();
if (poseAnimateSeconds > clipTime)
{
poseAnimateSeconds = 0;
}
float index = poseAnimateSeconds / clipTime;

rockyCylinder.animatePose(index, poseAnimation);
}
else
{
poseAnimateSeconds = 0f;
}

////////////////////////// START BLOCK /////////////////////////////////////////
/////// If I move this block above pose animation then "wave" doesn't happen//////////
if (skinAnimation > 0 && rockyCylinder.getSkinClipSequence().getSize() >= skinAnimation)
{
float clipTime = rockyCylinder.getSkinClipSequence().getClip(skinAnimation-1).getTime();
if (skinAnimateSeconds > clipTime)
{
skinAnimateSeconds = 0;
}
float index = skinAnimateSeconds / clipTime;

rockyCylinder.animateSkin(index, skinAnimation);
}
else
{
skinAnimateSeconds = 0f;
}
////////////////////////// END BLOCK /////////////////////////////////////////

rockyCylinder.applyAnimation();

frameBuffer.clear();
world.renderScene(frameBuffer);
world.draw(frameBuffer);

frameBuffer.display();
}

#38
Hi Raft,

Quote
3) If the meshes to be changed on the fly, (i.e. from thin-upper-body to fat-upper-body) then I think I have to rebuild the entire ".bones" group programmatically. Is my understanding correct?  If so, then I think it will be performance issue.  Is there a performance friendly way to get over with that?

no. just build them once while initializing them make proper parts visible/invisible

we're contemplating about using blend shapes (pose animations) instead of having multiple meshes for body/head shapes.  Is this a feasible and scalable solution.  Can you please let me know your view on this?
#39
Thanks, raft.  I will download the zip and check it out.

Yesterday, I had done some changes locally and I was able convert from xml to bones.  And I am able to to load the cylinder model in my Android App.  Basically, the method, "loadPose" of "MeshAnimationLoader" assumes the existence of extension in the submesh names.  I just did the following changes to get around that.
Old Code

String cleanName = name.substring(0, name.lastIndexOf('-'));
rootnode.addPose(cleanName, pose);


My Changes

String cleanName = name;
int extIndex = name.lastIndexOf('-');
if(extIndex >0 ) cleanName = name.substring(0, extIndex);
rootnode.addPose(cleanName, pose);
#40
Yeah, got the source.  The ".jar" extension had done me in  :-[
#41
thanks, raft :)

I am seeing this problem with even "cylinder.mesh.xml" and "facial.mesh.xml".  Seems to be common problem for anything with pose animations  ???

Yeah, I will try my best to debug this  ;D  But it seems to happen in the jme loader for which i don't have the source code.  Any idea, from where I can get the source  ::)
#42
hi raft,
Today, i was trying to load a model that uses pose animations.  But i got the following exception, when i was exporting from xml to bones.
Any idea what's going wrong?
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at com.jmex.model.ogrexml.anim.MeshAnimationLoader.loadPose(MeshAnimationLoader.java:187)
at com.jmex.model.ogrexml.anim.MeshAnimationLoader.loadPoses(MeshAnimationLoader.java:144)
at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:699)
at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:225)
at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:177)
at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:110)
at raft.jpct.bones.util.JMEOgreImporter.loadGroup(JMEOgreImporter.java:88)
at raft.jpct.bones.util.JMEOgreImporter.run(JMEOgreImporter.java:69)
at raft.jpct.bones.util.JMEOgreImporter.main(JMEOgreImporter.java:170)
#43
Following are data that I just collected:

Simulator
Load (.bones to AnimatedGroup) - 12 seconds
Oncreate to OnDraw - 18 seconds

Samsung Galaxy 3
Load (.bones to AnimatedGroup) - 6 seconds
Oncreate to OnDrawFrame - 12 seconds
#44
yeah, I kind of guessed it that .bones is the equivalent .ser... but now with your reply it is quite clear, thanks :)
Quotei guess it's fast enough, isn't it?
In Android Emulator, it took more than 20 seconds to load my model.  I still need to check that in my samsung galaxy 3.  However, the total polygon count for my model is more than 8000  :o.  I think I need to work with my artist to bring it down. 
BTW, what do you think should be the ideal range of polygon count for JPCT-AE/Bones combination  ???


#45
hi raft, I am back :)
I read in wiki read that
Quotecurrent versions of jPCT come with a new class, the DeSerializer. While it can be used within jPCT only, it's main purpose is to be used in combination with AE. The idea is to load the models in jPCT and serialize them into an optimized format that can be loaded by AE very quickly.

Is it possible to use this approach when we are using Bones i.e. is it possible to serialize/deserialize Animated3Ds?