fury-gl / fury

FURY - Free Unified Rendering in pYthon.
https://fury.gl
Other
241 stars 181 forks source link

`actor.texture` hides all other actors from the scene #871

Closed robinroy03 closed 4 months ago

robinroy03 commented 6 months ago

Description

actor.texture is hiding all other actors from the scene. It is a function that returns a vtk Actor, so I'm not sure why it is showing this particular behaviour.

Way to reproduce

[If reporting a bug, please include the following important information:]

arr_white = np.full((720, 1280, 3), 255, dtype=np.uint8)

scene = window.Scene()

plane = actor.texture(arr_white) rectangle = actor.rectangle( centers=np.array([[1, 2, 3]]), # (x, y, z) = (1, 2, 3) colors=np.array([[0, 1, 0]]), # Green directions=np.array([1, 1, 1]) # (x, y, z) = (1, 1, 1) ) box = actor.box(centers=np.array([[4, 4, 4]])) # (x, y, z) = (4, 4, 4), default color is Red

scene.add(plane) # comment this line and it displays all 2 scene.add(rectangle) scene.add(box)

window.show(scene, size=(1280, 720))


- [X] Relevant images (if any)

![image](https://github.com/fury-gl/fury/assets/115863770/f8a5e02f-4ff8-49cd-ac92-60e78e6f97b7)
<sub>Before commenting `scene.add(plane)`</sub>

![image](https://github.com/fury-gl/fury/assets/115863770/7c559ac8-15e0-4b53-b617-62650334eb97)
<sub>After commenting `scene.add(plane)`</sub>

- [X] Operating system and versions (run `python -c "from fury import get_info; print(get_info())"`)

WSL (Ubuntu)

{'fury_version': '0.9.0', 'pkg_path': '/home/robinroy/.local/lib/python3.10/site-packages/fury', 'commit_hash': '', 'sys_version': '3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]', 'sys_executable': '/usr/bin/python3', 'sys_platform': 'linux', 'numpy_version': '1.21.5', 'scipy_version': '1.8.0', 'vtk_version': '9.3.0', 'matplotlib_version': '3.5.1'}


Windows 11

{'fury_version': '0.9.0', 'pkg_path': 'C:\Users\Robin Roy\AppData\Local\Programs\Python\Python312\Lib\site-packages\fury', 'commit_hash': '', 'sys_version': '3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]', 'sys_executable': 'C:\Users\Robin Roy\AppData\Local\Programs\Python\Python312\python.exe', 'sys_platform': 'win32', 'numpy_version': '1.26.1', 'scipy_version': '1.11.4', 'vtk_version': '9.3.0', 'matplotlib_version': '3.8.2'}

m-agour commented 4 months ago

Hi @robinroy03 The plane does not actually hide the other actors but rather attracts all the attention, which is expected since the texture size is 720x1280 unit square. However, if you look closely, the other actors are present somewhere in the scene. image