www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Kumaraswamy on October 19, 2021, 09:00:07 pm

Title: 3ds Object not displayed correctly
Post by: Kumaraswamy on October 19, 2021, 09:00:07 pm
I have been experimenting with JPCT and everything was fine.
I had converted a GLB file into a 3ds file so that I can use it with JPCT, the model is correctly displayed with various online 3d viewers, but when I try that in JPCT when I rotate it, some parts of the object seem to be disappearing. I tried rescaling the model while loading and trying on another device, the issue is still present.

This is how I load the Object3d:

Code: [Select]
ModelAvailable(
                        Object3D.mergeAll(
                                Loader.load3DS(tools.getStream(model), scale)
                        )
                );

This is the problem with only this model, other models are correct
Title: Re: 3ds Object not displayed correctly
Post by: MichaelJPCT on October 20, 2021, 08:02:12 am
maybe the model is large and some parts are clipped by nearclip/farclip of opengl
Title: Re: 3ds Object not displayed correctly
Post by: Kumaraswamy on October 20, 2021, 05:47:43 pm
Hi, thanks for replying, soo...

how do I share the model with you?
Can you check that? I got the GLB file from my windows 3d viewer library and converted it into 3ds.
Title: Re: 3ds Object not displayed correctly
Post by: AeroShark333 on October 20, 2021, 07:00:58 pm
I assume your model should be fine...
You probably have to tweak jPCT a little so it shows all polygons (or polygons in the far-plane) properly

I'd recommend tweaking with these options:
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#maxPolysVisible
Code: [Select]
Config.maxPolysVisible = 2048;
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#nearPlane
Code: [Select]
Config.nearPlane = 1E-3;
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#farPlane
Code: [Select]
Config.farPlane = 1E9;
Title: Re: 3ds Object not displayed correctly
Post by: Kumaraswamy on October 24, 2021, 12:49:55 pm
thanks!