Author Topic: How To Disable Rendering of underground voxels?  (Read 119 times)

FrAzen

  • Newbie
  • *
  • Posts: 2
    • View Profile
How To Disable Rendering of underground voxels?
« on: August 02, 2021, 04:36:51 PM »
Good Day! I'm trying to create kind of 3D map of world surface, but chunks renders quite Inconsistent on its underground part. Is there any possibility to remove that "underground" voxels render or at least make it consistent?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Re: How To Disable Rendering of underground voxels?
« Reply #1 on: August 03, 2021, 10:10:41 AM »
Hi,
It's hard to guess why those faces are not rendered without a repro.
Usually, Voxel Play won't render chunks that are not visible - they will be visible when they're within the camera frustum. Chunk edges won't be visible if there's an adjacent chunk with solid voxels (due to voxel culling).
You can call the method ChunkCheckArea of the API to ensure all chunks within an area are generated and rendered.
Regards

FrAzen

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How To Disable Rendering of underground voxels?
« Reply #2 on: August 03, 2021, 11:34:42 AM »
Can it be happening because I'm just disabling all chunks that are not in bounds?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Re: How To Disable Rendering of underground voxels?
« Reply #3 on: August 03, 2021, 12:37:00 PM »
Of course. Please note that Voxel Play uses many optimizations in order to produce the minimum vertex and polygon count. As a result, only those faces that are exposed to air are rendered. For example, the shared faces of two adjacent solid voxels are not rendered as they are hidden by both voxels unless you destroy one of them.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Re: How To Disable Rendering of underground voxels?
« Reply #4 on: August 03, 2021, 12:37:37 PM »
You can use the world limits / extents in World Definition to ensure only chunks within an area are rendered. However, the same optimizations apply.