Author Topic: 3ds Object not displayed correctly  (Read 53 times)

Offline Kumaraswamy

  • byte
  • *
  • Posts: 11
    • View Profile
3ds Object not displayed correctly
« 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

Offline MichaelJPCT

  • long
  • ***
  • Posts: 244
    • View Profile
Re: 3ds Object not displayed correctly
« Reply #1 on: October 20, 2021, 08:02:12 am »
maybe the model is large and some parts are clipped by nearclip/farclip of opengl

Offline Kumaraswamy

  • byte
  • *
  • Posts: 11
    • View Profile
Re: 3ds Object not displayed correctly
« Reply #2 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.

Offline AeroShark333

  • float
  • ****
  • Posts: 268
    • View Profile
Re: 3ds Object not displayed correctly
« Reply #3 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;