Starting v4.1, Voxel Play introduces an algorithm to detect voxel occlusion. This algorithm is designed for a third-person perspective and can detect which chunks and voxels occlude the character. It won't work in first-person view.

Enable this feature in Voxel Play Environment:

Those parameters are:

  • Target: the character or target gameobject that should remain visible.
  • Radius: the see-through radius around the target.
  • Height Offset: voxels below the character altitude plus this height offset won't be affected. This is useful to prevent ground from going transparent.
  • Alpha: the default transparency for affected voxels.

Only opaque and cutout voxels are compatible with this feature (ie. building blocks, tree leaves, etc. but no vegetation or water).

You can also define certain see-through properties per voxel definition:

The See-Through mode defines how this voxel will react when it goes into invisible mode. The options are:

  • None: voxel will remain as it's, occluding the character.
  • Transparent: voxel will be rendered with transparency. 
  • Replace: the voxel will be fully replaced by another voxel (so the possibilities are enormous - you can replace the voxel with other with different textures for example).
  • Fully Invisible: the voxel will not be rendered at all when occluding the character.

If alpha is zero, the voxel will be completely discarded.

Please note that no voxel data is modified when this effect is activated - this option only affect to the rendering of the voxels.

In the video below, the alpha setting is set to zero so occluding voxels are completely discarded during the rendering state:

Now, rendered with alpha = 0.15f: