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

Render a ply mesh with texture using your render code #33

Open
jinnan-chen opened this issue Apr 8, 2024 · 8 comments
Open

Render a ply mesh with texture using your render code #33

jinnan-chen opened this issue Apr 8, 2024 · 8 comments

Comments

@jinnan-chen
Copy link

Hi, thanks for your great work!
I want to render a mesh.ply with texture in ply file, how to modify the render_data.py to add mode to the scene? Thanks!

@ShunyuanZheng
Copy link
Collaborator

ShunyuanZheng commented Apr 8, 2024

Hi, thanks for your interest.

I think GPS-Gaussian is not suitable for joint rendering with the scene since the unprojected Gaussian points formulate merely a partial representation of humans. However, you can try to save the Gaussian points as in 3DGS and viewed in SIBER. Note that, scale needs a log function and opacity requires an inverse sigmoid function as here.

@jinnan-chen
Copy link
Author

Hi, thanks for replying!
In fact, my question is not about GPS-Gaussian. It is about the data preparation to render multi-view images from original mesh.

@ShunyuanZheng
Copy link
Collaborator

Sorry for misunderstanding the question.

You can load the .ply file with trimesh and export the .obj file with a texture map. Then you can render them as the human scans in render_data.py. If you want to add both scans of human and scene, modify these lines as

    if len(renderer.scene.models) >= 2:
        renderer.modify_model(0, obj, texture)
        renderer.modify_model(1, scene_obj, scene_texture)
    else:
        renderer.add_model(obj, texture)
        renderer.add_model(scene_obj, scene_texture)

@jinnan-chen
Copy link
Author

Thanks, but how to load the .ply file with trimesh and export the .obj file with a texture map using scripts for a lot of mesh.ply files?

@ShunyuanZheng
Copy link
Collaborator

If the material is included in .ply file, just load and save it with Trimesh. However, if it is not included in .ply file, I think you need some other tools to process the data. You can use MeshLab to check whether the material is included.
image
image

@jinnan-chen
Copy link
Author

However, for 2K2K dataset, meshes cannot be processed in this way. But it seems these meshes are rendered the tested in the paper. I wonder how are they rendered using provided code?

@ShunyuanZheng
Copy link
Collaborator

Sorry, I have not actually used 2K2K data for training, so I did not notice it was not feasible to render them with the provided code. I think you can use THuman2.1 data as an alternative since it has been extended from 500 to 2500 models.

@jinnan-chen
Copy link
Author

It seems not released yet.

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

2 participants