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

Pages: [1] 2
Support / Re: Move object3D by touch&drag
« on: May 11, 2012, 11:36:19 am »
Sorry i cannt catch your means.
To get the camera actual axis in world space:
Code: [Select]
SimpleVector cPosition = camera.getPosition();
SimpleVector cXA = camera.getXAxis();
SimpleVector cXAA = new SimpleVector(cPosition.x * cXA.x, cPosition.y * cXA.y, cPosition.z * cXA.z);
That's the camera's actual X axis?
And when i get the y-axis, z-axis and multiply with xx,yy,zz,there are there SimpleVectors,how to translate the model?@@

Support / Move object3D by touch&drag
« on: May 11, 2012, 05:10:13 am »
Which i need is to move an model along the screen X-AXIS and Y-AXIS but never Z-AXIS by drag
Now I can get the model in the screen which is been touched, and i can move them by drag with this code
Code: [Select]
SimpleVector simpleVector = Interact2D.reproject2D3D(camera, frameBuffer, x, y).normalize();
if(collition != null){
SimpleVector cPosition = camera.getPosition();
int cz = (int) cPosition.z;
int a = (int) (z_plane - cz / simpleVector.z);
int xx = (int) (cPosition.x + a * simpleVector.x);
int yy = (int)(cPosition.y + a * simpleVector.y);
simpleVector = new SimpleVector(xx, yy, z_plane);
But it donot go well if the camera has a rotation, i think it's about the z_plane i always support it to 10
What should i do to fix this?

Support / Re: how to check event touch on Object3D?
« on: May 09, 2012, 06:05:33 am »
Do you mean to "pick" a object3d?
if so ,search mouse pick in forum for more details
set the collision mode in your object3d and then
Code: [Select]
SimpleVector simpleVector = Interact2D.reproject2D3DWS(
camera, frameBuffer, touchX, touchY).normalize();
Object[] ii = world.calcMinDistanceAndObject3D(camera
.getPosition(), simpleVector, 10000);

in ii[1] that's the object3d which be touched or null if nothing is been touched.

Sorry i didnot get your question after a review

Support / Re: About texture mapping
« on: April 26, 2012, 11:37:13 am »
Marke sure that environment mapping isn't enabled on you objects. About the second problem....i'm not sure. It doesn't like a 512*512 texture. Make sure that you are loading the texture from raw or assets, not from drawable.

yes...the whole world is empty except this only model.
and the second ,it's 128x128,all my texture is load by TextureManager(String, Texture).
Or can i email you my obj/mtl/image/code to you and help me to check where am i wrong?
Really appreciate it.

Support / Re: About texture mapping
« on: April 26, 2012, 04:10:41 am »
The texture dimensions should be a power of 2.

Instead of using 461, either move up to 512x512 or down to 256 by 256.

yes, i use 512x512, scale it just for attachments limit

Support / Re: About texture mapping
« on: April 26, 2012, 03:05:48 am »
i try another model for a test.
why the texture looks like be cover in the right?
in 3dMax
int mobile

[attachment deleted by admin]

Support / Re: About texture mapping
« on: April 26, 2012, 02:39:49 am »
and the image use for texture

[attachment deleted by admin]

Support / About texture mapping
« on: April 26, 2012, 02:37:40 am »
I have an obj model witch has a texure, but when i load the texture with the all-name into textureManager and load the model,it looks not right.

load texture code
Code: [Select]
textureManager.addTexture("E:\\chahutexture\\chahu3.jpg", new Texture(res.openRawResource(R.raw.chahu3)));
in 3dMax

in mobile

[attachment deleted by admin]

Support / What data dose JPCT-AE load with 3ds/obj?
« on: March 27, 2012, 10:43:44 am »
Sure that AE will load polygonal mesh data and texture information, and any others? e.g.metal material/Specular/Diffuse...
If no metal material/specular/Diffuse, there's a way to do it myself? ::)

Support / Re: Can't deserialize object
« on: March 23, 2012, 03:21:49 am »
alright,im going to the last beta

Support / Re: Touch Listener
« on: March 22, 2012, 09:48:49 am »
Try this app, when you long tap on box, you can move with it. Sources are also available ;)

the sources and application url: 404 Not Found  :(

Support / Re: Questions about texture&transparent&objectTouchEvent
« on: March 22, 2012, 08:17:33 am »
Q-1 is done!
Yes,there's a way to do this ;D,i found it!
Just load the texture with the name exactly as same as the texture'name used in the model, it's case-sensitive i guess.

Support / Can't deserialize object
« on: March 22, 2012, 08:01:08 am »
The error in logcat when i load a serialize file from an obj model
Code: [Select]
03-22 14:53:05.983: E/AndroidRuntime(11550): java.lang.RuntimeException: [ 1332399185965 ] - ERROR: Can't deserialize object: [ 1332399185963 ] - ERROR: A texture with the name '__obj-Color:255/255/255' has been declared twice!
03-22 14:53:05.983: E/AndroidRuntime(11550): at com.threed.jpct.Logger.log(
03-22 14:53:05.983: E/AndroidRuntime(11550): at com.threed.jpct.DeSerializer.deserialize(
03-22 14:53:05.983: E/AndroidRuntime(11550): at com.threed.jpct.Loader.loadSerializedObject(
03-22 14:53:05.983: E/AndroidRuntime(11550): at
03-22 14:53:05.983: E/AndroidRuntime(11550): at android.opengl.GLSurfaceView$GLThread.guardedRun(
03-22 14:53:05.983: E/AndroidRuntime(11550): at android.opengl.GLSurfaceView$

and when i load a serialize file from the same model but 3ds,it is all same except
Code: [Select]
ERROR: A texture with the name '__3ds-Color:255/255/255' has been declared twice!
And i didnot load any texture yet.What's wrong?

The code
Code: [Select]
Object3D[] models = Loader.loadSerializedObjectArray(master

When i use 3ds without serialize, it' all right.
The model in 3ds:

[attachment deleted by admin]

Support / Questions about texture&transparent&objectTouchEvent
« on: March 22, 2012, 06:45:23 am »

Let`s go. :) :)

Q-1:There is a scene has so much models with textures,what should i do to map the texture to the right model?I guess there`s a way besides TextureManager.add(...) & Object3D.setTexture(...),but i cant find it.

Q-2:In the scene there are some models are translucent, when i use Object.setTransparency(int trans), it works.But after that i use mergeAll to an Object3D,the translucent is gone.Why?

Q-3:When i touch the screen how can i know which model is being touched?I need to move the model to a position.

Support / How to draw the shadow of a model
« on: March 05, 2012, 10:01:00 am »
How to draw the shadow of a model?
And the shadow should like in the real world when the model rotate/translation...
Or should I implement it with opengl-es manually?

Great appreciate for your reply.

Pages: [1] 2