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

ValueError: No blender available! #1

Open
SeungHunJeon opened this issue Mar 26, 2024 · 4 comments
Open

ValueError: No blender available! #1

SeungHunJeon opened this issue Mar 26, 2024 · 4 comments

Comments

@SeungHunJeon
Copy link

SeungHunJeon commented Mar 26, 2024

When I created the conda environment according to the description, there were two conflict errors regarding 'perlin-numpy' and 'wfc-python'.

Then, I manually annotated two lines in 'environment.yaml' file,

  • perlin-numpy==0.0.0
  • wfc-python==0.0.0

(I think the wfc is already defined in the terrain-generator project, then I ignore this issue)

and installed perlin-numpy via the following command:
pip install git+https://github.com/pvigier/perlin-numpy

==================================================================================================

Waiting for parallel creation...
Traceback (most recent call last):
File "/home/oem/workspace/terrain-generator/examples/generate_with_wfc.py", line 265, in
create_mesh_from_cfg(
File "/home/oem/workspace/terrain-generator/examples/generate_with_wfc.py", line 81, in create_mesh_from_cfg
tiles, wave, wave_order, wave_names = solve_with_wfc(cfg, shape, initial_tile_name)
File "/home/oem/workspace/terrain-generator/examples/generate_with_wfc.py", line 35, in solve_with_wfc
tiles = create_mesh_pattern(cfg)
File "/home/oem/workspace/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 101, in create_mesh_pattern
tiles = ray.get(tiles)
File "/home/oem/anaconda3/envs/wfc/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
return func(*args, **kwargs)
File "/home/oem/anaconda3/envs/wfc/lib/python3.8/site-packages/ray/private/worker.py", line 2309, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): ray::create_mesh_tile() (pid=245962, ip=143.248.247.74)
File "/home/oem/workspace/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 79, in create_mesh_tile
mesh = cached_mesh_gen()
File "/home/oem/workspace/terrain-generator/terrain_generator/utils/utils.py", line 99, in mesh_gen
mesh = mesh_gen_fn(cfg)
File "/home/oem/workspace/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/basic_parts.py", line 225, in create_platform_mesh
wall_mesh = create_wall_mesh(cfg.wall)
File "/home/oem/workspace/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/basic_parts.py", line 181, in create_wall_mesh
mesh = merge_meshes(meshes, cfg.minimal_triangles)
File "/home/oem/workspace/terrain-generator/terrain_generator/utils/mesh_utils.py", line 26, in merge_meshes
mesh = trimesh.boolean.union(meshes, engine=engine)
File "/home/oem/anaconda3/envs/wfc/lib/python3.8/site-packages/trimesh/boolean.py", line 44, in union
result = engines[engine](meshes, operation='union', **kwargs)
File "/home/oem/anaconda3/envs/wfc/lib/python3.8/site-packages/trimesh/interfaces/blender.py", line 43, in boolean
raise ValueError('No blender available!')
ValueError: No blender available!
(create_mesh_tile pid=245962) platform_0.0_0.5_1111_f_wall
('middle_bottom', 'middle_right') does not exist in cache, creating platform_0.0_0.5_1111_f_wall
('middle_bottom', 'middle_right')e35d734d3ea4c0a6ee2a1b9097ee671d.obj ...
(create_mesh_tile pid=245962) stair_0.0_0.5_wall
('middle_left', 'middle_right')7 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_right')7_96e709b0b7a7afe0a6eaa72e71426861.obj ...
(create_mesh_tile pid=245962) stair_0.0_0.5_wall
()8 does not exist in cache, creating stair_0.0_0.5_wall()8_82562b98e1bc4ee96601d19503ba01ff.obj ...
(create_mesh_tile pid=245948) stair_0.0_0.5_wall
()3 does not exist in cache, creating stair_0.0_0.5_wall()3_7af4e61deb919ac897b1c760420192ec.obj ...
(create_mesh_tile pid=245948) stair_0.0_0.5_wall
()9 does not exist in cache, creating stair_0.0_0.5_wall()9_69c958c09baebfaf3092a32b695d294a.obj ...
(create_mesh_tile pid=245948) stair_0.0_0.5_wall
()10 does not exist in cache, creating stair_0.0_0.5_wall()10_bcb15549bca9b007fe246cc7f88a226c.obj ...
(create_mesh_tile pid=245948) stair_0.0_0.5_wall
()11 does not exist in cache, creating stair_0.0_0.5_wall()11_6b6538c4c07ff41f8426c64345c827de.obj ...
(create_mesh_tile pid=245952) stair_0.0_0.5_wall
()5 does not exist in cache, creating stair_0.0_0.5_wall()5_2ce3ec98aa999a25c9140de017291d40.obj ...
(create_mesh_tile pid=245962) stair_0.0_0.5_wall
('up', 'right')12 does not exist in cache, creating stair_0.0_0.5_wall('up', 'right')12_a16aac5f7b26f51597bd16cdfe7bf8db.obj ...
(create_mesh_tile pid=245948) stair_0.0_0.5_wall
('middle_left', 'middle_bottom')12 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_bottom')12_1d352467ae6382bfaf08b2752952ecea.obj ...
(create_mesh_tile pid=245952) stair_0.0_0.5_wall
()12 does not exist in cache, creating stair_0.0_0.5_wall()12_4686c25451d1e48c7625af95521754cd.obj ...
(create_mesh_tile pid=245952) stair_0.0_0.5_wall
()13 does not exist in cache, creating stair_0.0_0.5_wall()13_cf1ab0246a68502c82724653409321e0.obj ...
(create_mesh_tile pid=245964) stair_0.0_0.5_wall
('middle_left', 'middle_right')3 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_right')3_a8f94034aeaa3f331cdbeec4daf0d26f.obj ...
(create_mesh_tile pid=245964) stair_0.0_0.5_wall
('middle_left', 'middle_bottom')13 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_bottom')13_69657f91659fa50311ce5d06bb6a889a.obj ...
(create_mesh_tile pid=245964) stair_0.0_0.5_wall
('up', 'right')13 does not exist in cache, creating stair_0.0_0.5_wall('up', 'right')13_1518a4ad415d37f31374a46c22e58856.obj ...
(create_mesh_tile pid=245970) stair_0.0_0.5_wall
('middle_left', 'middle_right')2 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_right')2_f7540e5b00d4a92c1d55c43037183c3a.obj ...
(create_mesh_tile pid=245998) stair_0.0_0.5_wall
('middle_left', 'middle_right')4 does not exist in cache, creating stair_0.0_0.5_wall('middle_left', 'middle_right')_4_7e6c089c7a422905339084e726bfeac3.obj ...
(create_mesh_tile pid=245969) platform_0.0_0.5_1110 does not exist in cache, creating platform_0.0_0.5_1110_dceb99597353a0166a93213fe486c354.obj ...
(create_mesh_tile pid=245966) door_s_3.0 does not exist in cache, creating door_s_3.0_e6a4c96be98a3a48d317dea367f22cd4.obj ...

Process finished with exit code 1

The example code collapsed with above issues

@SeungHunJeon SeungHunJeon changed the title perlin-numpy dependency ValueError: No blender available! Mar 26, 2024
@LiuYiKai6
Copy link

It seems that you haven't installed blender. Run 'sudo apt-get install blender' will solve this problem.
But then I meet another problem.

Traceback (most recent call last):
File "examples/generate_with_wfc.py", line 265, in
create_mesh_from_cfg(
File "examples/generate_with_wfc.py", line 81, in create_mesh_from_cfg
tiles, wave, wave_order, wave_names = solve_with_wfc(cfg, shape, initial_tile_name)
File "examples/generate_with_wfc.py", line 35, in solve_with_wfc
tiles = create_mesh_pattern(cfg)
File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 101, in create_mesh_pattern
tiles = ray.get(tiles)
File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
return func(*args, **kwargs)
File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/ray/_private/worker.py", line 2309, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(CalledProcessError): ray::create_mesh_tile() (pid=2721959, ip=101.6.64.195)
File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 79, in create_mesh_tile
mesh = cached_mesh_gen()
File "/home/user/project/terrain-generator/terrain_generator/utils/utils.py", line 99, in mesh_gen
mesh = mesh_gen_fn(cfg)
File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/basic_parts.py", line 229, in create_platform_mesh
mesh = merge_meshes(meshes, cfg.minimal_triangles)
File "/home/user/project/terrain-generator/terrain_generator/utils/mesh_utils.py", line 26, in merge_meshes
mesh = trimesh.boolean.union(meshes, engine=engine)
File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/boolean.py", line 44, in union
result = _engines[engine](meshes, operation='union', **kwargs)
File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/interfaces/blender.py", line 55, in boolean
result = blend.run(_blender_executable +
File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/interfaces/generic.py", line 90, in run
check_call(command_run,
File "/home/user/miniconda3/envs/wfc/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/blender', '--background', '--python', '/tmp/tmpb_tegtcd']' died with <Signals.SIGABRT: 6>.

@SeungHunJeon
Copy link
Author

It seems that you haven't installed blender. Run 'sudo apt-get install blender' will solve this problem. But then I meet another problem.

Traceback (most recent call last): File "examples/generate_with_wfc.py", line 265, in create_mesh_from_cfg( File "examples/generate_with_wfc.py", line 81, in create_mesh_from_cfg tiles, wave, wave_order, wave_names = solve_with_wfc(cfg, shape, initial_tile_name) File "examples/generate_with_wfc.py", line 35, in solve_with_wfc tiles = create_mesh_pattern(cfg) File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 101, in create_mesh_pattern tiles = ray.get(tiles) File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper return func(*args, **kwargs) File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/ray/_private/worker.py", line 2309, in get raise value.as_instanceof_cause() ray.exceptions.RayTaskError(CalledProcessError): ray::create_mesh_tile() (pid=2721959, ip=101.6.64.195) File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/create_tiles.py", line 79, in create_mesh_tile mesh = cached_mesh_gen() File "/home/user/project/terrain-generator/terrain_generator/utils/utils.py", line 99, in mesh_gen mesh = mesh_gen_fn(cfg) File "/home/user/project/terrain-generator/terrain_generator/trimesh_tiles/mesh_parts/basic_parts.py", line 229, in create_platform_mesh mesh = merge_meshes(meshes, cfg.minimal_triangles) File "/home/user/project/terrain-generator/terrain_generator/utils/mesh_utils.py", line 26, in merge_meshes mesh = trimesh.boolean.union(meshes, engine=engine) File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/boolean.py", line 44, in union result = _engines[engine](meshes, operation='union', **kwargs) File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/interfaces/blender.py", line 55, in boolean result = blend.run(_blender_executable + File "/home/user/miniconda3/envs/wfc/lib/python3.8/site-packages/trimesh/interfaces/generic.py", line 90, in run check_call(command_run, File "/home/user/miniconda3/envs/wfc/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/blender', '--background', '--python', '/tmp/tmpb_tegtcd']' died with <Signals.SIGABRT: 6>.

Thanks! I resolved the previous issue.

I also encountered the identical error message.

@mktk1117
Copy link
Collaborator

Thanks for the report! It seems like the blender is failing to merge some meshes. Could you try setting the minimal_triangle param to false to check if it works?

@LiuYiKai6
Copy link

Thanks for the report! It seems like the blender is failing to merge some meshes. Could you try setting the minimal_triangle param to false to check if it works?

Yes! I've tried to do that before and the code works. So I think it's something wrong with blender. But I can't figure out why up to now.

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

3 participants