Author Topic: Visibility of distant landscape  (Read 2408 times)

Offline hedgehog

  • byte
  • *
  • Posts: 6
    • View Profile
Visibility of distant landscape
« on: August 03, 2012, 03:53:30 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Visibility of distant landscape
« Reply #1 on: August 03, 2012, 04:01:01 pm »
It all depends...how many polygons are you using for your landscape?

Offline hedgehog

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Visibility of distant landscape
« Reply #2 on: August 03, 2012, 04:25:48 pm »
I have a 100x100 grid in Blender.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Visibility of distant landscape
« Reply #3 on: August 03, 2012, 08:34:06 pm »
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