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 · 3 comments
Open

Asking about the visualization code #13

ngoductuanlhp opened this issue Jun 1, 2024 · 3 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

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

4 participants