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

Strange behavior on Plotter #776

Closed
ttsesm opened this issue Jan 3, 2023 · 4 comments
Closed

Strange behavior on Plotter #776

ttsesm opened this issue Jan 3, 2023 · 4 comments

Comments

@ttsesm
Copy link

ttsesm commented Jan 3, 2023

Hi @marcomusy,

Do you have any idea what could be causing the following behavior in the Plotter. When I load my custom mesh files I get this:
Peek 2023-01-03 18-16

When I load instead any other mesh alternative it seems to work fine:
Peek 2023-01-03 18-17

The code that I am using the following:

vp = Plotter(shape=[5,7], axes=0, interactive=0, sharecam=False)
video = Video(os.path.join(dirname, box+".gif"), backend='ffmpeg')  # backend='opencv/ffmpeg'
video.options = "-b:v 8000k -filter_complex \"[0:v] split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1\""

for t in np.arange(0, 1, 0.005):
    for i, mesh_model in enumerate(mesh_models):
         t1 = mesh_model.filename.split('/')[-1].split('.')[0]
         vp.show(mesh_model.lighting(style='ambient'), t1, at=i) # this line gives the first gif
         # vp.show(vd.Cone().lighting(style='ambient'), t1, at=i) # this line gives the second gif
         cam = vp.renderer.GetActiveCamera()
         cam.Azimuth(2)
     video.add_frame()

video.close()
vp.show().close()

The error happens inside the vp.show() inside the for loop and if my custom meshes are more than 30.

@marcomusy
Copy link
Owner

Hi @ttsesm although i'm not 100% sure it might be due to the limited number of textures that your system is capable of handling, does it also happen if you do not add textures?

@ttsesm
Copy link
Author

ttsesm commented Jan 9, 2023

Hi Marco, interesting it seems that you are right. If I do not load the textures it seems to work fine.

However, I do not understand what do you mean that my system is not capable of handling this amount of textures. Do you mean memory wise or something else? Moreover, is there any simple workaround to this?

@marcomusy
Copy link
Owner

To my understanding (but i'm not expert at all with this..) graphics cards can only manage a finite number of textures in the same rendering. I'm not sure why and unfortunately I have no ready workaround for it...

@ttsesm
Copy link
Author

ttsesm commented Jan 9, 2023

I see, then I think I will just create two separate gifs instead of one.

Thanks Marco, your help is always appreciated ;-).

@ttsesm ttsesm closed this as completed Jan 9, 2023
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