Open thomaswan opened 1 month ago
Usually blender can't get vertex color from obj file. ( In my case blender 3.6.2 ) You can export as ply with vertex color from original obj file by tool like MeshLab. There is also issue about this. https://github.com/pengHTYX/Era3D/issues/14#issuecomment-2151641469
it's a clipping problem after the training. simple clamping like the code below may circumvent the problem where values spike above 1.0f
def optim_clr(case, img_path, mesh_dir, save_dir, device):
...
np_colors= to_numpy(color_model.colors)
np.clip(np_colors, 0.0, 1.0, out=np_colors) #clamp
tensor_colors = torch.tensor(np_colors ,dtype=torch.float32,device=device)
save_obj(vert, face, f'{save_dir}/refine_{case}.obj', tensor_colors.detach())
...
@bananaman1983 Could you guess about this issue too ? https://github.com/pengHTYX/Era3D/issues/26
dunno TBH. would like to take a look into it though. I've been noticing it too. it's weird. with normals flipped in the wrong axes and stuff
@bananaman1983 Excellent! you also solved the issue of noise in the colors of my exported mesh. by:
texture_color = torch.clamp(color_model.colors.detach(), min=0, max=1)
save_obj(vert, face, f'{save_dir}/refine_{case}.obj', texture_color)
@bananaman1983 @miaowu99 Great Job ! You solved this issue ! https://github.com/pengHTYX/Era3D/issues/4 👍
@pengHTYX You can check it too !
Import it3000-mc256.obj to blender, color attribute can be used as material base color. However, import refinename.obj file to blender, color attribute is not found.