Unity + PCX Point Cloud Import

This workflow outlines how to convert .e57 files into Unity-readable .ply files using CloudCompare and the PCX package.


βœ… Requirements


πŸ”„ Step-by-Step Workflow

1. Open .e57 File in CloudCompare

  • Drag and drop or use File > Open.

  • When prompted with the Global Shift/Scale dialog:

    • ❌ Untick Preserve global shift on save

    • βœ… Apply shift (click "Yes to All")

circle-info

This ensures Unity gets baked local coordinates instead of referencing massive world coords.

Global shift/scale dialog

2. Change Colors to RGB

  • In the DB Tree, select the cloud (NOT the container folder).

  • In the Properties panel at the bottom, switch "Colors" from Scalar to RGB.

Change "Colors" to RGB

  • In the DB Tree, select the cloud (NOT the container folder).

  • Go to Edit β†’ Apply Transformation.

  • Translate using the negative of the shifted box center:

circle-info

This moves your point cloud's centre to (0, 0, 0) in Unity.

Apply transformation dialog

4. Export as Binary .ply

  • Select just the point cloud in DB Tree

  • Go to File β†’ Save

  • Choose format: PLY mesh (*.ply)

  • When prompted:

    • βœ… Choose Binary format


5. Drop into Unity

  • Move the .ply file into Assets/Resources/

  • Unity will auto-import it via PCX and generate an .asset

  • Select the .asset and switch the "Container Type" to ComputeBuffer - press Apply.

Change "Container Type" to ComputeBuffer

6. Render in Unity

  • Drag the .asset into the scene and align properly.


πŸ§ͺ Troubleshooting

Problem

Fix

Nothing visible

Check camera position, point size, or global position

Still using real-world coords

Re-import .e57, apply global shift properly, uncheck preserve

Render errors

Ensure PCX is installed via Git package or direct file import

Missing RGB

Confirm export with colour data in CloudCompare


🧠 Tips

  • For performance, keep point counts under 10 million per asset

  • Use ComputeBuffer-based rendering unless you need physical colliders

  • Always recenter before export to avoid floating point precision issues

Last updated