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

[Texturing] Improve texturing quality on (low-poly) user mesh after retopology #677

Merged
merged 38 commits into from
Jan 15, 2020

Conversation

cvere
Copy link
Contributor

@cvere cvere commented Aug 2, 2019

Description

Subdivide a retopo mesh for texturing efficiency.
If a mesh has been simplified, we subdivide it with corresponding new uv coords. This enables to make more fine grain decision on the best visibilities to use per triangle to create the final texture.

The subdivision method is based on edges length and mesh number of points. We create texture atlases for the subdivided mesh. Then, we return the retopo mesh with these texture atlases.

Features list

  • Subdivide a mesh with an "edge length" criterion
  • Subdivide a triangle, depending on the number of edges to subdivide
  • Return the retopo mesh textured

Implementation remarks

Rewriting of already existing methods to subdivide a mesh.

cvere added 29 commits July 11, 2019 10:53
Mesh keeps uvCoords, normals, pointsVisibilities,.. attributes
Remove function arguments which became redundant (knowing Mesh has new attributes)
First "level" of pointer removed !
override sizeOfStaticVector for object (instead of pointer)
use simple objects inside functions (instead of declaring & deleting pointers) and use references
Modify functions to subdivide a mesh to update uv coords, and use it to texture a simplified mesh.
WARNING: for now, all meshes with uv coords are subdivided & mesh subdivision assumes that the mesh already has uv coords. The texturing of a subdivided mesh only works for meshes with one texture atlas
Update _atlases and _trisMtlIds when subdividing a mesh : add new triangles to the right atlas
(++ _trisMtlIds is now a  std::vector)
- new structure for edges
- subdivision based only on edges length
- main_texturing save the simplified & textured mesh
new criterion for subdividing an edge : the edge on the retopo mesh must be longer than the local mean of edges length in the reference mesh
bug fix : texturing a retopo mesh after Meshroom's uv generation
@fabiencastan fabiencastan force-pushed the dev/texturing_retopomesh branch from 08ed5d4 to b57b423 Compare September 9, 2019 12:24
@fabiencastan
Copy link
Member

TODO: remove inputRetopoMesh and retopoMesh and rely only on dense point cloud.

@fabiencastan fabiencastan added this to the 2019.3 milestone Jan 5, 2020
@fabiencastan fabiencastan merged commit 96e705c into develop Jan 15, 2020
@fabiencastan fabiencastan deleted the dev/texturing_retopomesh branch January 15, 2020 10:53
@fabiencastan fabiencastan changed the title Dev/texturing retopomesh [Texturing] Improve texturing quality on (low-poly) user mesh after retopology Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants