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

#1
Support / Re: Cardboard ,CardboardView support
December 06, 2018, 10:53:05 AM
Many thanks!!! :)
#2
Support / Re: Cardboard ,CardboardView support
December 06, 2018, 08:38:22 AM

Many thanks!!!

Great example.

Also I have another question:

Primitives.getCube(scale) method, creates a cube rotated 45 degrees around Y axis?

Thanks in advance
#3
Support / Cardboard ,CardboardView support
December 05, 2018, 01:26:17 PM
Hi,

I try to develop a Virtual Reality application using Google's Cardboard Java API.

Do you have any example?

I have a big problem adjusting JPCT's coordination system with Cardboard's Java API coordinate system.

I think the solution exists in the method
public void onDrawEye(Eye eye)

My code is:

@Override
    public void onDrawEye(Eye eye) {

       com.threed.jpct.Matrix camBack = world.getCamera().getBack();
        camBack.setIdentity();
        tempTransform.setDump(eye.getEyeView());

        tempTransform.transformToGL();
        camBack.matMul(tempTransform);

        world.getCamera().setBack(camBack);

         fb.clear(RGBColor.BLACK);
         fb.clearZBufferOnly();

         world.renderScene(fb);
         world.draw(fb);

         fb.display();
}


The Objects3D models added to the world  don't look ok according to the XYZ positions a I have set.


I suppose the problem is because JPCT uses a different coordinate system than OpenGL.

Can you suggest a solution?

Thanks in advance


#4
Support / Re: texture repeat mode support
October 11, 2018, 06:53:48 PM
Thanks for the answer.
#5
Support / texture repeat mode support
October 11, 2018, 02:33:03 PM
Hi,

I'm  wondering if it is possible to set a repeat mode for a texture like the one in the following Opengl code.


GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_REPEAT);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_REPEAT);

If yes then is it possible to set the number of repetition in S and T?

thanks

#6
Thanks for the reply.

I'll check this solution.

How can I do the vertices rotation?


I had in mind to create a racing track defined as a list of segments: straights and left/right turns like in the attached image.

The straight part will be the Object3D plane and the left/right plane is the Object3D I try to create with the

Object3D curvedPlane = createCurvedPlane(float innerRadius,float ouRadius,float angle,int quads) methods.







#7
Support / About Alien Runner's roads Object3D planes
February 01, 2017, 10:49:25 PM
Hi.

The Alien Runner game uses a straight road which is based on Object3d planes.

In case  a developer needs to create a similar game with curved roads what the solution will be?

I'm trying to develop a method which creates a curved road.

The method will be something like this:

Object3D curvedPlane = createCurvedPlane(float innerRadius,float ouRadius,float angle,int quads)

This method is like the ExtendedPrimitives.createTube(float innerRadius, float outerRadius, float height, int quads)
but the height is equal to zero and the tube is not round but is drawn arount to an angle < 360 degrees.

Any idea to help me?

Thanks in Advance.
Modify message
#8
Projects / Re: Alien Runner W.I.P
February 01, 2017, 03:32:17 PM
Hi.

The Alien Runner game uses a straight road which is based on Object3d planes.

In case  a developer needs to create a similar game with curved roads what the solution will be?

I'm trying to develop a method which creates a curved road.

The method will be something like this:

Object3D curvedPlane = createCurvedPlane(float innerRadius,float ouRadius,float angle,int quads)

This method is like the ExtendedPrimitives.createTube(float innerRadius, float outerRadius, float height, int quads)
but the height is equal to zero and the tube is not round but is drawn arount to an angle < 360 degrees.

Any idea to help me?

Thanks in Advance.



#9
Support / Re: Coordinate conversion
October 12, 2015, 03:55:51 PM
Thanks for your answer.

But generally, is there any specific rule when we have to do the rotation?

Thanks in Advance
#10
Support / Re: Coordinate conversion
October 12, 2015, 01:47:59 PM
Hi again.

I need some clarificaion on loading Object3Ds.

I noticed that when i add to the world an Object3D  ( .obj,.3ds ,...) then in rendering the Object3D is displayed upside down.
So I have to call the Object3D.rotateX(Math.PI) method.

This is something expected?

This is because of the jPCT's coordinate system?

Thanks in advance 
#11
Support / Re: Coordinate conversion
October 08, 2015, 08:35:29 PM
Ok

thank you
#12
Support / Re: Coordinate conversion
October 08, 2015, 03:07:11 PM

My Application is an Augmented 3D application.

But the part of inserting 3d objects in the renderer's world is not created by me.Unfortunately this part uses the opengl coordinate system.

So reading the jPCT-AE integration with Vuforia tutorial i had in my mind that rotating the marker's  modelview matrix  (returned by the AR engine) 180 degrees around X axis  to set camera position and direction will be finally a good solution .

Am I right?

Thanks for your time
#13
Support / Re: Coordinate conversion
October 08, 2015, 02:51:55 PM


Thanks but in case of integrating jPCT-AE with Vuforia ,the solution of rotating 180 degrees around X axis  will screw up culling and such?

Thanks in Advance
#14
Support / Re: Coordinate conversion
October 08, 2015, 02:21:46 PM

Thanks

but I think , (because it is an Augmented Reality project) ,if rotating the Camera's object  Model View matrix 180 degrees around X  axis
will be a good solution. (Like the one integrating Vuforia with jPCT-AE).

In this case no Y,Z inverting needed, or rotating PI around X.

Am I right?


So there are 2 solutions:

1) Just rotate 180 degrees around X axis the modelview matrix applied to Camera object.
2) Dont to any changes to camera. Just Invert Y and Z and in case of rotating PI around X in case of rotation.

Thanks in Advance.








 
#15
Support / Re: Coordinate conversion
October 08, 2015, 01:54:18 PM
Thanks for the quick answer.

This  solution I have to apply for camera position and direction?

I mean all the position , rotation ( any similar methods ) can use this solution?

Thanks in advance