Visibility of distant landscape

Started by hedgehog, August 03, 2012, 03:53:30 PM

Previous topic - Next topic

hedgehog

I am just starting out with jPCT-AE. I want to develop a RPG app, and have Blender and 3DS for creating objects.

I have tried a simple landscape generated in Blender, and wondered if it should be one object, or should it be split into different objects to make loading quicker.

Also, is a single object (like my landscape) fully visible, or will distant parts of it be invisible, and get displayed as the camera point of view moves?

EgonOlsen

It all depends...how many polygons are you using for your landscape?

hedgehog


EgonOlsen

That means 10.000 polygons? I would try to load them as one large chunk of data. The best solution for loading them fast is to load them with desktop jPCT, serialize them to disk and load the serialized version on Android (http://www.jpct.net/wiki/index.php/Differences_between_jPCT_and_jPCT-AE#Performance_and_memory_issues.2C_serialized_objects).
The view distance can be adjusted by calling setClippingPlanes() in World. You might want to calculate an OcTree for the terrain (can be serialized together with the model if you do this on desktop jPCT) and use it at least for collision detection. It might be worth a try to use it for rendering too, but it's usually better to render the mesh at once instead.

I don't know if you are aware of it, but this may help to get feeling for it can look like. The terrain uses ~7000 polygons of arbitrary sizes: http://www.youtube.com/watch?v=olxPQ6zjNEA