Could not load perfectly elements

Started by nima.sh23, October 25, 2015, 12:46:40 PM

Previous topic - Next topic

nima.sh23

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?

EgonOlsen

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.

nima.sh23

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

EgonOlsen

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?

nima.sh23

#4
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.

EgonOlsen

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.