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

Pages: 1 2 [3]
Support / Re: Screen orientation and camera
« on: September 27, 2012, 05:06:47 pm »
Egon, this is what the Rajawali engine does onSurfaceChanged():

Code: [Select]
public void onSurfaceChanged(GL10 gl, int width, int height) {
mViewportWidth = width;
mViewportHeight = height;
mCamera.setProjectionMatrix(width, height);
GLES20.glViewport(0, 0, width, height);

And this is the camera setProjectionMatrix() method referenced above:

Code: [Select]
public void setProjectionMatrix(int width, int height) {
float ratio = (float) width / height;
float frustumH = MathUtil.tan(getFieldOfView() / 360.0f * MathUtil.PI) * getNearPlane();
float frustumW = frustumH * ratio;

Matrix.frustumM(mProjMatrix, 0, -frustumW, frustumW, -frustumH,
frustumH, getNearPlane(), getFarPlane());

Can I replicate this in JPCT-AE ?

Support / Re: Screen orientation and camera
« on: September 26, 2012, 01:45:56 am »
Thank you Egon, then I should use Camera.setFOV() in onSurfaceChanged() ? What value should I pass to setFOV() ? it's all about trial and error ?

Support / Screen orientation and camera
« on: September 25, 2012, 07:15:47 pm »
Hi there,

How do I make the scene look the same in both portrait and landscape orientation ? If I setup my scene in portrait mode, when I switch to landscape, the objects don't fit the screen and look bigger, as if the camera position was changed. In the other 3d engine I'm using (Rajawali), the scene looks the same in both landscape and portrait mode.

Thank you.

Support / Re: GLES 2.0 and the emulator
« on: September 23, 2012, 02:10:33 am »
Hi Egon,

Could you please send me the e-mail again ? I've updated the e-mail in my profile, the old one is no longer valid.

Thank you.

Support / GLES 2.0 and the emulator
« on: September 22, 2012, 12:04:46 pm »
Hi there,

Just to let you know that OpenGL ES 2.0 works on the emulator even if it reports it doesn't.

Please fix this: or let me know how to fix it.

EDIT: Forgot to say you need an Android 4.0.3+ virtual device and set the "GPU" emulation flag to true when creating it, or pass the "-gpu on" command line parameter when running the emulator from the command line.

Thank you.

Support / Re: Easy way to apply a normal map ?
« on: April 18, 2012, 11:08:07 am »
Thanks for the fast respone EgonOlsen. I recall you said in a message that shaders are somewhat slow on mobile devices... do you think a normal map shader will slow down the framerate significantly ? Considering the fact that mobile devices also don't handle "high" polys very well, that's why I was going to use a normal map in the first place, to fake real topology...

P.D: I tried a normal map of a 9000 tris rotating human face using libgdx with specular, diffuse and ambient lighting and it was really fast (60fps, limited by vsync).

Support / Easy way to apply a normal map ?
« on: April 18, 2012, 02:49:07 am »

I would like to know if there is any easy way to apply a normal map texture without using GLSL, as I have no idea how it works, and don't really have the time right now to learn another language...

Thank you.

Projects / Bones
« on: April 13, 2012, 12:06:55 pm »
Hi there neo187,

Another great addition would be the ability to load bones serialized files so we can also create scenes with those. I don't think it's much work, but if you need help i'll be here  :)

Thanks all for the feedback.

Zambbi, the .mtl file is by default assumed to be of the same name as the .obj one and to be located in the same directory! Could you elaborate on how you think the camera could work better than it does? What exactly did you find unsatisfactory?

Robert, the rotation dialogue is simply feeding your input values into the JPCT's Object3D.rotate... function, which, as per JavaDoc:

Rotates the object's rotation matrix around the y-axis by the given angle w (radian, clockwise for positive values). This rotation is then applied to the object when it's rendered the next time.

Is this not what you need?

Hello there,

Yeah, I know jpct uses radians, it's just that for humans is much easier to work with degrees. Well, at least for me, because I'm used to using degress in Blender. You could simply put a radio widget to select degrees or radians in a quick way and do the conversion from degrees to radians in the former case.


Please, allow the use of degrees in rotation, otherwise we have to use a calculator.

P.D: Nice program  :)

Thank you.

Pages: 1 2 [3]