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

How to remove faces with no texture in TextureMesh #352

Closed
XudongYong opened this issue Jul 10, 2018 · 12 comments
Closed

How to remove faces with no texture in TextureMesh #352

XudongYong opened this issue Jul 10, 2018 · 12 comments

Comments

@XudongYong
Copy link

Specifications like the version of the project, operating system, and hardware

openMVS master, Ubuntu 16.04 with 16G RAM

Steps to reproduce the problem

Hi @cdcseacave ,
Thanks for your great contribution! Currently, I'm trying to modify the normal pipeline (SparsePointCloud -> DensifyPointCloud -> Mesh -> Texture) without using the DensifyPointCloud step. Now, I can get a reasonable 3D model except one thing. From below snapshot, we can see there are several faces with no texture but just predefined yellow color and these faces are introduced owing to mesh with sparse point cloud.
To keep the effect, I want to remove these faces with no texture. I look deep into the source code and find the part named "create texture patches" in function FaceViewSelection() of SceneTexture.cpp, and I think maybe I can remove faces in the last element of texturePatches, but I don't know how to establish the relationship between "scene.mesh.faces" and "texturePatches.Last().faces".
For the problem "how to remove faces with no texutre", could you give me any suggestions?
snapshot00

@XudongYong
Copy link
Author

Today I fix this issue and my guess is right, that "scene.mesh.faces" and "texturePatches.Last().faces" is one-to-one correspondence in index. Meanwhile, the faceTexcoords should also be updated after removing textureless faces. Since this issue has been fixed, I will close this thread.

@calmelo
Copy link

calmelo commented Jul 29, 2024

Today I fix this issue and my guess is right, that "scene.mesh.faces" and "texturePatches.Last().faces" is one-to-one correspondence in index. Meanwhile, the faceTexcoords should also be updated after removing textureless faces. Since this issue has been fixed, I will close this thread.

How did you resolve the problem? Can you share steps and codes?

@cdcseacave
Copy link
Owner

Pls try this PR #1162

@calmelo
Copy link

calmelo commented Jul 30, 2024

Pls try this PR #1162

Thanks! But I use the 1.1.1 version, and the changes are adapted to version 2? I try to add those codes to version 1.1.1, which leads to the incorrect results. Some places which can be textured correctly are textured with the empty color. This is really strange. Do you know how can I fix this bug?

@cdcseacave
Copy link
Owner

Pls use latest OpenMVS code in develop

@calmelo
Copy link

calmelo commented Jul 31, 2024

Pls use latest OpenMVS code in develop

However, the latest texture result is incorrect. What's the difference between poses of version 2 and version 1? I can get the correct texture using version 1.1.1

@cdcseacave
Copy link
Owner

there are no differences

@calmelo
Copy link

calmelo commented Jul 31, 2024

there are no differences

Version2.3.0, master branch, can obtain the correct result using "TextureMesh scene_dense.mvs -m scene_dense_mesh_refine.ply -o scene_dense_mesh_refine_texture.mvs" from the openmvs_sample. However, using the same data and command, version 1.1.1 get the error "14:15:19 [App ] unrecognised option '-m'". I change the -m to --mesh-file, and get the error "14:15:29 [App ] error: invalid project". Why I get the different results using version 2.3.0 and 1.1.1?

@calmelo
Copy link

calmelo commented Jul 31, 2024

there are no differences

There are my own data result of version 1.1.1 and 2.3.0:
openmvs1 1 1
openmvs2 3 0
The result of version 1.1.1 is correct, but the result of version 2.3.0 is significantly offset towards the upper right.

@cdcseacave
Copy link
Owner

so you are saying that you get the correct result with 2.3.0, so just use it, no need for 1.1.1 now, right?

Version2.3.0, master branch, can obtain the correct result 

@calmelo
Copy link

calmelo commented Jul 31, 2024

so you are saying that you get the correct result with 2.3.0, so just use it, no need for 1.1.1 now, right?

Version2.3.0, master branch, can obtain the correct result 

Now for my own data, I can get the correct result using version 1.1.1, but cannot get the correct result using version 2.3.0. I don't know why, so I want to know the differences between the two branch.

@calmelo
Copy link

calmelo commented Jul 31, 2024

Pls try this PR #1162

I try to add those codes to version 1.1.1, which leads to the incorrect results. Some places which can be textured correctly are textured with the empty color. The empty color is set to white.
openmvs1 1 1_remove

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