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

Asking about the visualization code #13

Open
ngoductuanlhp opened this issue Jun 1, 2024 · 5 comments
Open

Asking about the visualization code #13

ngoductuanlhp opened this issue Jun 1, 2024 · 5 comments

Comments

@ngoductuanlhp
Copy link

Hi @henry123-boy

Thank you for your great work!

I'm currently try to visualize the 3D trajectory using your Blender script. Could you clarify which Blender version you are using? I encounter several errors due to the incompatible Blender version.

Thanks.

@cherubicXN
Copy link
Collaborator

Blender 4.0 is used for 3D trajectory visualization

@AstroTheKat
Copy link

AstroTheKat commented Jul 1, 2024

@cherubicXN thank you for this project and the tip!

Is there any chance you could provide some step-by-step instructions for setting up Blender to render the 3D trajectories via create.py? The command given in the README suggests one can use Blender on MacOS to do this, but there are a few details missing. For example, packages like trimesh and matplotlib need to be installed using Blender's versions of Python and pip.

Regarding the version of Blender needed, I'm not sure 4.0 would work with create.py, unless I'm missing something. For example, bpy.ops.import_mesh.ply was removed in Blender 4.0, and probably needs to be replaced with bpy.ops.wm.ply_import. See links below for more on this:

Otherwise, I get the error: AttributeError: Calling operator "bpy.ops.import_mesh.ply" error, could not be found

@a-mirecki
Copy link

a-mirecki commented Jul 2, 2024

Hey @AstroTheKat I've been there, you have a different version thus should replace line 58:

bpy.ops.wm.ply_import(filepath=str(ply_path))
basename = basename.split('\\')[-1]

with

bpy.ops.import_mesh.ply(filepath=str(ply_path),use_verts=True)

then you need to open blender, go to scripting, open console and for each module do

import pip
pip.main([“install”, “trimesh”])

for each module. Lmk whether that was it

@Boey-li
Copy link

Boey-li commented Aug 15, 2024

@cherubicXN @a-mirecki Hello, thanks for your help! I have implemented as you suggested and I still have a bug

  File "/Users/baoyu/research/visualizer/create.py", line 62, in <module>
    obj = bpy.data.objects[basename]
KeyError: 'bpy_prop_collection[key]: key "assets/sintel_bandage_3d_2" not found'

Have you met this issue before? And the blender did not have tracking animation shown in the repo:

Screen.Recording.2024-08-15.at.12.56.21.PM.mov

@boytjj
Copy link

boytjj commented Sep 7, 2024

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

6 participants