nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
933 stars 328 forks source link

How to generate a single texture file, instead of many separate texture files? #77

Closed mrbemani closed 6 years ago

mrbemani commented 7 years ago

How to generate a single texture file, instead of many separate texture files? I wanna fix the model in some 3d editing software, like zbrush, then regenerate the uv, but I only know how to do it with a single texture file. Can "texrecon" produce a single texture file which contains all the textures in one big png?

nmoehrle commented 7 years ago

@andre-schulz has made adjustments to the texture atlas generation such that it should produce a single texture atlas. Please refer to the single-texture-atlas branch of his fork.

mrbemani commented 7 years ago

thanks for the quick reply!

soulslicer commented 7 years ago

This fork doesnt work anymore due to the recent API changes:

/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp: In function ‘void tex::from_images_and_camera_files(const string&, std::vector<tex::TextureView>*)’:
/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp:154:25: error: ‘image_undistort_bundler’ is not a member of ‘mve::image’
                 image = mve::image::image_undistort_bundler<uint8_t>(image,
                         ^
/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp:154:68: error: expected primary-expression before ‘>’ token
                 image = mve::image::image_undistort_bundler<uint8_t>(image,
                                                                    ^
/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp:155:30: warning: left operand of comma operator has no effect [-Wunused-value]
                     cam_info.flen, cam_info.dist[0], cam_info.dist[1]);
                              ^
/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp:155:51: warning: right operand of comma operator has no effect [-Wunused-value]
                     cam_info.flen, cam_info.dist[0], cam_info.dist[1]);
                                                   ^
/home/raaj/mvs-st/libs/tex/generate_texture_views.cpp:155:51: warning: right operand of comma operator has no effect [-Wunused-value]

How did you guys get it to compile?

soulslicer commented 7 years ago

Ok, I just integrated this particular commit and it seems to generate single texture files

https://github.com/andre-schulz/mvs-texturing/commit/20c59f80ccec149fae05ceb17ab70f225d1d2c5a

andre-schulz commented 7 years ago

FYI, I've updated my fork of mvs-texturing with the latest changes. It should compile without errors now.

soulslicer commented 7 years ago

Can I check..if my texture/image that is being sampled is larger than 1024*1024, does your code still make sure that the texture file gets expanded accordingly?

nmoehrle commented 6 years ago

@andre-schulz can you answer that?

nmoehrle commented 6 years ago

Closing this due to inactivity.