Author Topic: Could not load perfectly elements  (Read 655 times)

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Could not load perfectly elements
« on: October 25, 2015, 12:46:40 pm »
I'm trying to load some elements (one scene) in JPCT, every elements are loaded on the my world but when I move my camera some elements(like bed on the first photo and on the second photo floor texture doesn't loaded) could not load perfectly, I changed clipping plan, but unfortunately doesn't different.
How can I fix this problem?
« Last Edit: October 25, 2015, 12:48:28 pm by nima.sh23 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Could not load perfectly elements
« Reply #1 on: October 26, 2015, 06:22:10 pm »
Not sure what you mean exactly...objects disappear if you move the camera? If so, maybe your scene contains over 512 objects in one frame? In that case, try to increased Config.maxPolysVisible before instanciating a world.

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: Could not load perfectly elements
« Reply #2 on: October 27, 2015, 11:23:33 am »
thanks. but there is only 89 objects in this frame.
Let me explain in more details.
This scene was created by 3d studio max 2013 and the unit setup has set to millimeter (I know it does not matter). its a real size floor plan. Basically the whole scene was created in minimum number of polygons due to decreasing the file size and finally exported to 3ds file type. The textures was set through a my self made process which I call it scene parser. It may looks silly but this was the only way to load a such big scene. I have to mention  that I looked over JPCT deserializer and JPCT blend and others. But none of them solved my problem.
My steps to load such scenes are:
1. Export the scene objects and materials properties to XML format.
2. Export scene to 3ds or obj file format.
3. Load 3d file with JPCT.
4. Load and parse scene XML file with scene parser in order to set textures

Here we are. that's all I need.
thank you

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Could not load perfectly elements
« Reply #3 on: October 27, 2015, 03:52:58 pm »
I'm still not sure what the actual problem is. Objects disappear when moving the camera or they aren't there after loading the scene in the first place?

Offline nima.sh23

  • byte
  • *
  • Posts: 40
    • View Profile
Re: Could not load perfectly elements
« Reply #4 on: October 28, 2015, 04:12:54 pm »
They will disappear when I move the camera. Clipping Planes set to 1.0f, 10000.0f.
I used 3d studio max Wall object to create plan walls and also these Walls rarely appear correctly.
« Last Edit: October 28, 2015, 04:20:46 pm by nima.sh23 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Could not load perfectly elements
« Reply #5 on: October 29, 2015, 10:53:13 am »
Maybe it's a depth buffer issue because of it's low accuracy...which GPU does your device use and have you tried it in another one with a different GPU? Nvidia Tegra and Adreno are known for low accuracy...if that applies here, there's a helper class in util, the NVDepthConfigChooser which you can use as your config chooser at init time to improve depth buffer accuracy on both chips.
If it's not that, maybe the objects are transparent and it's a sorting issue of some kind? Sometimes, exporters add transparency informations to objects that actually have none. In that case, try a setTransparency(-1) on all objects after loading.