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

Pages: [1]
1
Support / Video On Texture - Playing/Streaming video on ImageTarget
« on: December 03, 2014, 10:47:03 am »
Hi,

Is it possible the streaming video on Texture ? I mean i have URL for streaming video, and i want to stream and play it on my marker (ImageTarget) ?


PS :  Like this photo that attached (this is my IOS app, my marker  is iphone picture, and here is video is streaming. However i ddint do that with Anroid)

2
Support / My texture is loaded but 3d model is still black why ?
« on: November 13, 2014, 04:26:37 pm »
Code: [Select]
public ImageTargetsRenderer(ImageTargets activity) {
this.mActivity = activity;

world = new World();
world.setAmbientLight(50,50,50);

sun = new Light(world);
sun.setIntensity(255, 255, 255);

// Texture texture = new Texture(BitmapHelper.rescale(BitmapHelper.convert(mActivity.getResources().getDrawable(R.drawable.hearse)), 64, 64));
//        TextureManager.getInstance().addTexture("texture", texture);

Config.maxPolysVisible = 1000;
Config.farPlane = 4000;
Config.collideOffset = 500;
Config.glTrilinear = true;

Bitmap textureImage = BitmapHelper.convert(mActivity.getResources().getDrawable(R.drawable.hearse));
Texture texture = new Texture(textureImage);
        TextureManager.getInstance().addTexture("texture", texture);
       
        if(texture != null)
        {
        Log.i("Texture load", "texture is loaded");
        }

float scaleSize = 1;
try {

carModel = Object3D.mergeAll(Loader.loadOBJ(mActivity.getResources().getAssets().open("hearse.obj"),
mActivity.getResources().getAssets().open("hearse.obj.mtl"),scaleSize));

// carModel = Object3D.mergeAll(Loader.load3DS(mActivity.getResources().getAssets().open("stealth.3ds"), scaleSize));

} catch (IOException e) {
Toast errorToast2 = Toast.makeText(mActivity.getApplicationContext(), "3d model is not loaded", Toast.LENGTH_LONG);
errorToast2.show();
e.printStackTrace();
}
carModel.calcTextureWrap();
carModel.setTexture("texture");
carModel.setLighting(Object3D.LIGHTING_ALL_ENABLED);
carModel.setEnvmapped(true);
carModel.strip();
carModel.build();

world.addObject(carModel);

cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 150);
cam.moveCamera(Camera.CAMERA_MOVEUP, 100);
cam.setFOV(1.5f);

SimpleVector sv = new SimpleVector();
sv.set(carModel.getTransformedCenter());
sv.y += 100;
sv.z += 100;

sun.setPosition(sv);

MemoryHelper.compact();
}

My 3d model is appearing its okay, but full of surface is black. I have true width and height .jpg texture file, and i have no error in code. However model is good but its black and i didnt find the solution. Please help me.

Pages: [1]