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

Topics - angieIe

#1
Support / Change Texture in Runtime
September 06, 2016, 04:00:27 AM
Hai, i have to change texture when user click a button. How to change texture in runtime? i try add texture to texture manager and setTexture in onDrawFrame, but it not working, have error out of memory. Thank you.
#2
Hi everyone,

I am trying integrate jpct ae with wikitude AR. I already look at the tutorial integrate artoolkit with jpct ae as reference. But i have problem that object 3D not stay in marker.  Here is my code so far:

  public void onDrawFrame(GL10 gl) {
               if (_wikitudeRenderExtension != null) {
                _wikitudeRenderExtension.onDrawFrame(gl);
                }

              if (_currentlyRecognizedTarget != null) {
                world.removeAllObjects();

                float[] projectionCamera = _currentlyRecognizedTarget.getProjectionMatrix();
                projMatrix.setIdentity();
                projMatrix.setDump(projectionCamera);
                projMatrix.transformToGL();
                SimpleVector translation=projMatrix.getTranslation();
                SimpleVector dir=projMatrix.getZAxis();
                SimpleVector up = projMatrix.getXAxis();
                cam.setPosition(translation);
                cam.setOrientation(dir, up);


                markerMatrix.setIdentity();
                float[] marker1Transformation= _currentlyRecognizedTarget.getViewMatrix();
                markerMatrix.setDump(marker1Transformation);
                markerMatrix.transformToGL();
                cube.clearTranslation();
                cube.setRotationMatrix(markerMatrix);
                cube.setTranslationMatrix(markerMatrix);
               // cam.setBack(markerMatrix);
                world.addObject(cube);
                world.renderScene(fb);
                world.draw(fb);
                fb.display();


Please kindly assist. Thank you :)
#3
Support / 3ds not render perfectly
December 09, 2014, 06:05:13 AM
Hai, i have 3ds file and when i render it with jpct-ae i can see the object not render perfectly.. this my code:

                world = new World();
world.setAmbientLight(30, 30, 30);
sun = new Light(world);
sun.setIntensity(255, 255, 255);
// Create a texture out of the icon...:-)
TextureManager txtMgr = TextureManager.getInstance();
if (!txtMgr.containsTexture("BURJ_AL_.JPG")) {
Texture texture = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(mActivity.getResources().getDrawable(R.drawable.burj_al_arab_map)), 512, 512));
txtMgr.addTexture("BURJ_AL_.JPG", texture);
}

Context mContext =mActivity.getApplicationContext();
InputStream stream = null;
try {
stream = mContext.getAssets().open("burj_al_arab.3DS");

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//cube = Primitives.getCylinder(20, 80);
cube=Loader.load3DS(stream, 1f)[0];
cube.setCulling(false);
cube.strip();
cube.build();
world.addObject(cube);


I attach pic of screen shot.
#4
Bones / unable to load collada resource
December 08, 2014, 04:36:29 AM
hai, i have collada file that contains animation. i tried load using ardorCollada2bones.bat but show error unable to load collada resource. thank you
#5
Support / about rotate concept
November 25, 2014, 06:16:39 AM
Hai, when i want to rotate i got confused..how the concept of rotating?
#6
Support / JPCT-AE+Vuforia: primitive plane not showing
November 24, 2014, 08:54:44 AM
Hai, i try to render primitive plane , but it is not showing. But if i render primitive box or cylinder it  just fine. 

plane = Primitives.getPlane(20, 30);
plane.setTexture("texture");
plane.strip();
plane.build();
world.addObject(plane);
cam = world.getCamera();
SimpleVector sv = new SimpleVector();
sv.set(plane.getTransformedCenter());
sv.y += 100;
sv.z += 100;

sun.setPosition(sv);

MemoryHelper.compact();


Thank you
#7
Support / set texture at runtime
November 20, 2014, 08:53:46 AM
hai, i want to change texture in plane when i click button. how to do it? thank you
#8
In my app, am using JPCT-ae for 3d rendering. I am downloading 3d models form server and rendering it in android device. my problem is some models are small and some are very big. I want to set one generic scale for all the models regardless of what scale they were exported with. so that when i render them on device they should be of same size.

I dont know to do it. please any idea any help is very much appreciated.