Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point cloud test model? #31

Open
zeux opened this issue Oct 7, 2023 · 6 comments
Open

Point cloud test model? #31

zeux opened this issue Oct 7, 2023 · 6 comments

Comments

@zeux
Copy link
Contributor

zeux commented Oct 7, 2023

One of the important use cases of glTF I've seen that doesn't seem to be covered in this repository are point clouds.

glTF-Sample-Models had MeshPrimitiveTest but I'm not really suggesting including that one - it feels like we should have some test instead that is a more realistic/heavy-weight test of point clouds specifically.

Sketchfab has a lot of assets that are point cloud scans but I'm not sure what the licensing restrictions here are. I'm thinking of something along these lines: https://sketchfab.com/3d-models/flower-point-cloud-photogrammetry-13a409d10f154d5dbfd009fe75d52222

@DRx3D
Copy link
Contributor

DRx3D commented Oct 7, 2023

I agree (that there should be heavy point cloud models). The model you suggested (Flower Point Cloud Photogrammetry) is great because it is CC-BY. It is currently in XYZ point cloud format. Can someone convert this to glTF?

@zeux
Copy link
Contributor Author

zeux commented Oct 8, 2023

Sketchfab natively supports conversion to glTF; for convenience I'm attaching the glTF export here for the asset above:

flower_point_cloud_photogrammetry.zip

@zeux
Copy link
Contributor Author

zeux commented Oct 8, 2023

Hmm maybe this specific export isn't ideal - in addition to position and color, the file also contains normal data but it's redundant (every point has the same normal), which is probably a mistake in source asset or in the converter. So we'll need to post-process this or find a better scan.

@zeux
Copy link
Contributor Author

zeux commented Oct 8, 2023

Okay, I cleaned up the glTF file manually (using glTF-Transform to repack the buffer data. Attaching the result.

gltf.report loads and renders the scene correctly, modulo what looks like sRGB issues:

image

Babylon.JS:

image

Sketchfab for comparison:

image

flower_point_cloud_cleaned.zip

@zeux
Copy link
Contributor Author

zeux commented Oct 8, 2023

Ok, yeah, I had to convert the colors from sRGB to linear color space using a one-off C program. After conversion, the Babylon.JS render is now correct (using point size=2 here); I think we should now be able to use this asset.

image

flower_point_cloud_linear.zip

@wallabyway
Copy link

wallabyway commented Nov 8, 2023

Compressed with MeshOpt and Unlit extension

source files: https://github.com/wallabyway/minimal-pointcloud-gltf#flower

Flower_point-cloud_linear_unlit_MeshOpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants