Skip to content

Cannot export correct ply file after remesh function. #3053

Answered by Grantim
zhangzhousuper asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like the issue is that you have invalid colors vector, you need to update it on decimation and remesh. It works with decimation because decimation does not produce new vertices, and color vector has valid size (while colors are still not updated correctly), but remesh produce new vertices and color vector after it is smaller than it should be (and not updated).

I suggest you to add update code like this, so your color vector will stay valid and updated.

    MR::VertColors temp;
    MR::MeshLoadSettings mls;
    mls.colors = &temp;
    MR::Mesh mesh = *MR::MeshLoad::fromAnySupportedFormat("test.ply", mls);
    MR::SaveSettings points_save_set;
    points_save_set.colors = &temp;

   …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zhangzhousuper
Comment options

@Grantim
Comment options

Answer selected by zhangzhousuper
@zhangzhousuper
Comment options

@Grantim
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants