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

#1
Support / How to get vertex from animated mesh?
August 21, 2012, 12:14:22 PM
Hi!
I would like to try add(attach) some primitives (like spheres as eyes) to animated mesh. So I decide to get one verticle from mesh and use its coords and normal to attach some primitives.
there is my code, but there is one problem: the animation stoped to work(like set on pause or smth like that)...


public class Player extends Object3D{

    public Player(Context AppContext, World world, Resources res) {   
        // loading and setting stuff...
   
        vc = new VertexController(20);
        this.getMesh().setVertexController(vc, true);
        this.getMesh().applyVertexController();

        world.addObject(this);
    }

    /* VERTEX CONTROLLER */
    private static class VertexController extends GenericVertexController {
        private int vertexID;
       
        VertexController(int pVertexID) {                 
          this.vertexID = pVertexID;
        }

@Override
public void apply() {
    SimpleVector[] srcMesh = this.getSourceMesh();       
            int size = this.getMeshSize();
            if(vertexID < size){
        mVertexX = srcMesh[vertexID].x;
        mVertexY = srcMesh[vertexID].y;
        mVertexZ = srcMesh[vertexID].z;
            }
        }
}


In main update cycle:

public void onDrawFrame(GL10 gl) {

    // player animation code

    player.getMesh().applyVertexController();
    player.touch();
}


Maybe there is some other way to handle it?
#2
Support / Re: Multitexturing and UV coords
April 23, 2012, 01:22:40 PM
Hi, Egon. Its AE releated.
have to apologize, it seem I made this topic in wrong section  :-[
#3
Support / Multitexturing and UV coords
April 22, 2012, 12:08:44 PM
Hi, guys!
I know how to make multitexturing with 2 textures, so can I use more than 2 textures?
And the second question; Is there any way to change UV coords to all multitexture layers? (I managed to change UV coords just for one layer with setTextureMatrix() )

Thanks in advance!
#4
Support / Re: About texture filtering
January 24, 2012, 07:15:18 PM
thx guys!
i 'll try to use your advices...
#5
Support / About texture filtering
January 22, 2012, 02:54:26 PM
Hi!

I have a little confusion about texture filtering, I made a simple plane-Object3D ( quite big ) and texture size is 256x256 pixels - texture looks a bit distorted like a grainy patern. I'm not sure how to fix that :/
there is screenshot sample attached:


Thank you in advance!
#6
Is there any way to test your game?... Android Market?
#7
I tried to make some particles like billboarded planes, but performance was very low, for example: 50 particles (without movement etc.) lowered fps from 55fps to 42fps (Samsung Galaxy i9000).
sorry for spam
#8
I wonder how did you made animated smoke?
#9
God... its looks awesome!!! I've never seen such things on mobile devices, great job!!!
#10
Support / Re: jPCT-AE wiki
January 05, 2012, 05:58:28 PM
I noticed that there is no such class as DeSerializer in jPCT-AE (1.24)...
#11
Support / Re: Out of memory, performance issues
January 05, 2012, 03:37:49 PM
very interesting calculations! About cempressions, is it possible on android devices? (android 2.1)
#12
Support / Re: Cube mapping and transparecny
January 05, 2012, 03:30:01 PM
ok, thx Egon
#13
Support / Re: Out of memory, performance issues
January 04, 2012, 01:35:15 AM
try to use DDMS tool and watch for heap size!
#14
Support / Re: Cube mapping and transparecny
January 04, 2012, 01:30:05 AM
well... when I use setEnvmapped(Object3D.ENVMAP_ENABLED); then transparency is no longer working ... thats is my problem :(
#15
Support / Cube mapping and transparecny
January 02, 2012, 08:55:16 PM
Hi everyone!
I would like to know, is there any way how to make texture semi-transparent if using cubemapping?
this is my code:

//for interval 0..255
Config.glTransparencyMul = 0.0039f;
Config.glTransparencyOffset = 0f;

TextureManager tm = TextureManager.getInstance();
tm.addTexture("glass", new Texture(mUtils.getScaledBitmapFromAssets(256,256,"gfx/glass.jpg", AppContext), true));
Glass.setTexture("glass");
Glass.setEnvmapped(Object3D.ENVMAP_ENABLED);
Glass.setEllipsoidMode(Object3D.ELLIPSOID_ALIGNED);
Glass.setTransparency(100);

p.s. works without using cubemapping!
Thanks in advance