llorz / SGA19_zoomOut

code for the paper "ZoomOut: Spectral Upsampling for Efficient Shape Correspondence"
https://arxiv.org/abs/1904.07865
43 stars 9 forks source link

About texture transfer #4

Open Jamesli0123 opened 3 years ago

Jamesli0123 commented 3 years ago

Dear professor, thanks for your great work. could you share the code of how to get texture transfer, looking forward to your reply.

llorz commented 3 years ago

Hi James,

Can you please take a look at this function:

https://github.com/llorz/MatlabRenderToolbox/blob/master/func_render/texture_transfer_pMap.m

Though I do not have a demo for this, it is relatively easy to try, that given a pair of shapes S1 and S2, and a pointwise map T12 from S1 to S2. It will first generate the texture coordinates of S2 based on its XYZ coordinates (you can change to other options); then we use T12 to pull-back the texture coordinates on S1. Given then texture coordinates, and an arbitrary texture image in the same path, you can visualize the textured shapes in meshlab or other apps.

Hope this helps.

Jing