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

Fix PCDLoader ASCII loading when rgb is float #23734 #23735

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

ghost
Copy link

@ghost ghost commented Mar 16, 2022

Related issue: #23734

Description

ASCII PCD files with the rgb field as an integer can be loaded fine by the PCDLoader.
However, ASCII PCD files with a float rgb field just result in a black point cloud.

This pull request fixes the loading by interpreting the parsed float values as integers when the type of the rgb field is F.
The inspiration for this solution comes from daavoo/pyntcloud@7b4205e (note that that code is in Python, so not directly copyable).

This contribution is funded by Segments.ai.

@mrdoob mrdoob added this to the r139 milestone Mar 16, 2022
@mrdoob mrdoob merged commit 659b689 into mrdoob:dev Mar 16, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 16, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
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

Successfully merging this pull request may close these issues.

3 participants