question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VideoMaker ~ actors not rendered bug

See original GitHub issue

The VideoMaker class is a bit buggy. Some actors (e.g. cells) are not rendered in the video frames. This is probably because in brainrender.scene the vtkplotter plotter is populated with show(*self.get_actors()... while videomaker uses show().

This will be fixed when I update the VideoMaker class (currently under development in the Animation branch), but for now a workaround is to:

  1. render the scene with Scene.render()
  2. Close the scene by pressing ‘q’
  3. Use videomaker to crate the video.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19

github_iconTop GitHub Comments

1reaction
FedeClaudicommented, Apr 7, 2020

Hi,

If you’ll look to the example script I’ve linked above you’ll notice that I’ve changed a few things around as I’ve reorganised the code.

The code for making videos is not in brainrender.animation.video, which means that you’ll have to change

from brainrender.Utils.videomaker import VideoMaker

to

from brainrender.animation.video import BasicVideoMaker as VideoMaker

This is an example of how you can make a simple video:

import brainrender
brainrender.WHOLE_SCREEN = True
brainrender.SHADER_STYLE = 'cartoon'
from brainrender.scene import Scene


from brainrender.animation.video import BasicVideoMaker  as VideoMaker


scene = Scene(display_inset=False, camera="sagittal")

scene.add_brain_regions(['MOs'])

vmkr = VideoMaker(scene)
vmkr.make_video(azimuth=1, niters=360, duration=30, save_name="test")

The problem with windows is (presumably) a bug with vtkplotter which is what brainrender uses for creating the renderings and the videos. You won’t get an error because of it, so the code should run smoothly, but unfortunately the video will not be formatted correctly.

p.s.: I’m hoping for the author of vtkplotter to fix this issue soon, but if you need to make a video urgently we can work out a solution together, let me know 😃

0reactions
FedeClaudicommented, Apr 8, 2020

@youeh1 if you’d like you could test the new code for creating videos, which doesn’t require ffmpeg and also lets you save videos as .avi.

To do so you need to:

  1. Install brainrender from the animation github branch with:
pip uninstall brainrender
pip install brainrender git+https://github.com/BrancoLab/BrainRender.git@animation
  1. Install termcolor and opencv with
pip install termcolor opencv-python

Then you can try creating a video. The code for creating videos is the same as what you’ve already used, but hopefully you’ll get better results.

Let me know if you get a chance to try this and if you get better results, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VideoMaker ~ actors not rendered bug · Issue #45
The VideoMaker class is a bit buggy. Some actors (e.g. cells) are not rendered in the video frames. This is probably because in ......
Read more >
Strange Offset Actors Bug in the Movie Render Queue and ...
I am working for a videogame studio and i am currently facing a strange bug in Unreal Engine 5: When i use the...
Read more >
Top 12 Most Common iMovie Problems and Solutions [2022]
More videos on YouTube · 1. iMovie Export Failed · 2. iMovie Error -50 · 3. Slow Speed · 4. Distorted Files ·...
Read more >
User Manual
A spot light is manually adjustable to cast light in a certain direction with a definable ... View, but it will not be...
Read more >
Contact - Page 576 of 977
The actor didn't move a lot, but the camera did, so we allowed for some error by softening the edges and changing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found