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

Pages: [1]
Support / How to get vertex from animated mesh?
« on: August 21, 2012, 12:14:22 pm »
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)...

Code: [Select]
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);


    private static class VertexController extends GenericVertexController {
        private int vertexID;
        VertexController(int pVertexID) {                 
          this.vertexID = pVertexID;

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:
Code: [Select]
public void onDrawFrame(GL10 gl) {

    // player animation code


Maybe there is some other way to handle it?

Support / Multitexturing and UV coords
« on: 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!

Support / About texture filtering
« on: January 22, 2012, 02:54:26 pm »

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!

Support / Cube mapping and transparecny
« on: 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:
Code: [Select]
//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));
p.s. works without using cubemapping!
Thanks in advance

Support / [solved] Texture artifact
« on: November 19, 2011, 04:04:37 pm »
Hi there!
So, there is my problem. On my overlay i'm adding texture(512x512). Then I have to strech overlay to 512x600. After this artifact appears as horizontal black line. I tried to use texture with resolution 512x1024 and it works great, but it is waste of resources...

Thanks in advance

Support / [SOLVED]Overlay's rotation center
« on: November 08, 2011, 12:58:27 pm »
Hi, everyone!
I wonder if there is any way to change overlay's rotation center?

Support / [solved] transparent texture with alpha blending
« on: October 31, 2011, 04:51:47 pm »
Hi, gyus. I'm new here.
At first I have to thanks jPCT creator for fantastic work, it looks promising.
About my problem, what is the proper way to get textures with alpha blending works? I use png with alpha chanel, but result is not  what I expected(only black areas ar transparet) This is my code:
Code: [Select]
//loading texture
TextureManager.getInstance().addTexture("panda", new Texture(getBitmapFromAssetsARGB8888(256,256,"gfx/alpha.png", AppContext));

//seting up 3dobject
planePanda = Primitives.getPlane(1, 10);
planePanda.setTransparency(3); //not sure how it works;


Pages: [1]