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

Pages: [1] 2
Support / ARcore
« on: September 13, 2017, 10:23:04 am »

do you have some plan about integrating ARCore to android edition of JPCT?


Support / Re: World renderScene and draw stop UI thread
« on: May 26, 2017, 09:08:08 am »
I found out that this is because TextureView after setRenderer wait for render object. But I don't know how to stop it, because no methods like onPause are call until object is render.

Support / World renderScene and draw stop UI thread
« on: May 25, 2017, 11:24:05 am »
in first call of onDrawFrame calling of
Code: [Select]
takes long for lowend device, for example 8 seconds for renderScene and 4 seconds for draw. Next call of this method is quick.
If I exit fragment with model if one of this methods is runnig, device stop UI thread intil methods end.
Loading is not on UI thread, and current fragment work prorerly when model loading is in progress, but if I exit this fragment, IU thread wait for end of load methods.
Calling wordl.dispose() not help.
Stop of loading thread is not possible befere loading is complete.

Any advice for solve this?
Thank you for answer

Support / Re: How to improve the jpct lib load speed?
« on: May 23, 2017, 11:10:22 am »
Hi, I have similar problem. I have two device with similar HW, on one device loading of 3d model takes for example 30seconds, on second device 10seconds. Is thre any way to speed up loading? I have obj file converted to serializable on PC, so on android device I load selializable format of file. Or where I must call skupDefaultShaders method? Or any other advice for speed up loading (not used less quality model).

Thank you

Support / Load OBJ with more materials
« on: February 22, 2017, 11:44:25 am »
Hi, I have 3d model with more then one material. Method to load model support only one material file. Is there any way to load model with more material files? I use Java version of JPCT to preprocessing model and material and Android JPCT to show models.

Thank you for answer.

Support / .obj with more textures
« on: September 01, 2016, 04:02:10 pm »
if I load .obj file with one texture everithing is ok.
But if .obj have more that one texture, only last texture is on object.

I use this code:
Code: [Select]
Texture texture1 = new Texture(getInputStream("obj/3/texture.jpg"));
                TextureManager.getInstance().addTexture("texture", texture1);
                Texture texture2 = new Texture(getInputStream("obj/3/kola.jpg"));
                TextureManager.getInstance().addTexture("texture2", texture2);
               Texture texture3 = new Texture(getInputStream("obj/3/hlava.jpg"));
                TextureManager.getInstance().addTexture("texture3", texture3);
                object3D = loadModelOBJ("obj/3/robot.obj", "obj/3/robot.mtl", 10);

If I detele
Code: [Select]
object3D.setTexture("texture");... there is no texture on object.
If I write setTexture... than only last set texture is on model.

How can I load more texture to one model?

Thank you for any answers.

Support / Re: [SOLVED] How to load textures on an OBJ model?
« on: June 29, 2016, 10:01:24 am »
But my texture have 948 KB.

And if I change to this code:

Code: [Select]
texture = new Texture(getInputStream("starwarsmodel/mash_u1_v1.jpg"));

private InputStream getInputStream(String fileName) {
        InputStream stream = null;
        try {
            stream = mContext.getAssets().open(fileName);
        } catch (IOException e) {
        return stream;

My app falls because of same oxception: OutOfMemoryError: Failed to allocate a 67108876 byte allocation with 16777216 free bytes and 39MB until OOM

On line:
Code: [Select]

Support / Re: [SOLVED] How to load textures on an OBJ model?
« on: June 29, 2016, 09:33:18 am »
Hi, I have same problem.
And If I use this code, my application falls because Caused by: java.lang.OutOfMemoryError: Failed to allocate a 603979788 byte allocation with 15867456 free bytes and 169MB until OOM.

If I donīt use this code my object is loaded correctlly but without texture.

Code: [Select]
        Texture texture = new Texture(BitmapHelper.rescale(BitmapHelper.convert(mContext.getResources().getDrawable(R.drawable.mash_u1_v1)), 64, 64));
        TextureManager.getInstance().addTexture("texture", texture);

Support / Read .dae model
« on: June 23, 2016, 11:41:02 am »

It there any way to read .dae model with JCPT for android?
Or some way to convert it to some posible format with texture.

Thank you for answer.

Support / Re: Does jPCT-AE support shadow?
« on: May 05, 2016, 09:22:44 am »
Can you post an example please?

Thank you.

Support / Re: Loader.loadOBJ is too slow
« on: April 27, 2016, 03:13:15 pm »
Yes that is true that everything is diffrent for this platforms.
But I have models on server and if i have two formats, I have two times more files on server.

Support / Re: Loader.loadOBJ is too slow
« on: April 27, 2016, 03:00:04 pm »
Thank you.

Everything is OK.

For my application I need use same model format for Android and iOS.
Do you think that there is any way to use serializable format on iOS?

I listen that if computing is C based, that is more quick than by Java computing.
jPCT use Java or C code for loading?
Or is there any another library which load obj quickly and give me Object that I can use with jPCT?

Thank you for answer!

Support / Re: Does jPCT-AE support shadow?
« on: April 27, 2016, 12:33:34 pm »
Thank you.
I understand that it's not documented, but is there any sample of use shadows?
And is there any way to use it with Vuforia and get shadow on real table for example?
Something like
Code: [Select]
And how I can initialize buffer whitch is parametr of ShadowHelper?
This example from wiki donīt work.
Code: [Select]
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL, IRenderer.MODE_OPENGL);

Thank you!

Support / Re: Does jPCT-AE support shadow?
« on: April 27, 2016, 11:17:44 am »
It's few years from thic conversation.

Is there now any way to create shadows in jPCT-AE?

Thank you!

Support / Re: Loader.loadOBJ is too slow
« on: April 22, 2016, 12:06:39 pm »
Thank you!

Its little coplicated for my use of application but its really fast to load a model.

Just one question.
If I serialize my model use this: deSerializer.serialize(o3d, oos, true);

size of serialized object is minimal 2 times bigger than original .obj file.

For exmaple my obj has 7MB and serializable file has 15MB. Or 0.8MB obj to 2MB serializable.

Is there any way to reduce this file size?

Thank you.

Pages: [1] 2