mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.7k stars 1.31k forks source link

[ENH, BUG] Adding to and Fixing Blender Tutorial #10684

Closed alexrockhill closed 2 years ago

alexrockhill commented 2 years ago

First, the link to the Blender YouTube tutorials has broken here https://mne.tools/dev/auto_tutorials/forward/80_fix_bem_in_blender.html and also in general Blender has updated to version 3.0 which as I've heard is a top to bottom rewrite so I think everything in a screenshot is out of date or at least should be checked that things are still in the same place.

Second, and relatedly on a larger note, I think even though pyvista and mne.viz.Brain are amazing, it would be nice to have a more general example to leverage the super figure generating power of Blender. I think MEG, EEG and iEEG (and maybe also fNIRS) would be super cool to export as .obj files with more of the style of once you do this, go at it however you like in Blender. I think this more hands off approach and treating Blender as just the plotting software for the last step is a lot more maintainable since Blender is pretty fast-moving. I do think the tutorial is super useful but I think the overhead with checking them every Blender version and updating screenshots/remembering to check that they work since it's not covered by CIs is a bit cumbersome. And, I think the blender documentation is really good so maybe we could just link there instead of having Blender use documentation in MNE. I think it might be a conversation worth having to do a bit of refactoring to make sure things don't get out of date, but still contain very useful information in the tutorial while adding an example with sensors and not just surfaces.

larsoner commented 2 years ago

Works for me, @wmvanvliet you worked a bit on the Blender tutorial, thoughts on cutting it down in favor of saying "look at the Blender docs for how to do these operations"?

wmvanvliet commented 2 years ago

I am in favor of cutting it down. But let's have some links to specific parts of the Blender documentation that are helpful. Blender is a huge software package.

wmvanvliet commented 2 years ago

@alexrockhill You mean something like this? https://github.com/wmvanvliet/mne-blender

alexrockhill commented 2 years ago

@alexrockhill You mean something like this? https://github.com/wmvanvliet/mne-blender

Yes! It might be more portable to put the color of the vertices in an obj file though so that there isn't any bpy scripting if it can be avoided.

alexrockhill commented 2 years ago

I am in favor of cutting it down. But let's have some links to specific parts of the Blender documentation that are helpful. Blender is a huge software package.

Maybe a video would be helpful. Would be out of date at some point but at least for Blender 3 would be ideal (and all major releases when Blender 4 comes out).

hoechenberger commented 2 years ago

I've added this to the 1.1 milestone, is anyone actively working on this?

wmvanvliet commented 2 years ago

Yes! It might be more portable to put the color of the vertices in an obj file though so that there isn't any bpy scripting if it can be avoided.

Is there a way to animate that?

wmvanvliet commented 2 years ago

@hoechenberger I think we can remove the specific blender instructions and instead point to specific parts of the official blender documentation quite quickly. Building a better MNE-Python <-> Blender bridge (either by exporting files that Blender can read, or scripting Blender to read MNE-Python objects) will take more time and should probably not be scheduled for the next release.

alexrockhill commented 2 years ago

I thought I would have a chance today but it might not be until tomorrow (middle of the night European time)

alexrockhill commented 2 years ago

Yes! It might be more portable to put the color of the vertices in an obj file though so that there isn't any bpy scripting if it can be avoided.

Is there a way to animate that?

I'd really want to look into that, that would be very cool and portable!

alexrockhill commented 2 years ago

@hoechenberger I think we can remove the specific blender instructions and instead point to specific parts of the official blender documentation quite quickly. Building a better MNE-Python <-> Blender bridge (either by exporting files that Blender can read, or scripting Blender to read MNE-Python objects) will take more time and should probably not be scheduled for the next release.

I would like to see fixing the links done before the release. +1

alexrockhill commented 2 years ago

Sorry I've been busier than I thought, maybe just push this to 1.2.

hoechenberger commented 2 years ago

No worries, @alexrockhill! Will push