-
Notifications
You must be signed in to change notification settings - Fork 13
Making and Exporting Meshes
(written for Blender V2.78 and Plugin V5.8)
In this tutorial you will learn step-by-step how to generate and export meshes to CATMAID. As typical example, we will generate a mesh for a single glomerulus of the antennal lobe from a set of projection neurons.
If you haven't yet, I strongly recommend checking out the Basics tutorial first.
Please make sure that you have the CATMAID-to-Blender plugin properly installed and configured. If not, see here for instructions.
First, import the neurons you wish to make meshes from. In our case, we will use the projection neurons of the DA1 glomerulus.
If making meshes based on multiple neurons, you will first have to merge them into a single object. To do so, select all neurons (excluding their somas) by hitting B and drawing a selection rectangle or by shift-clicking them individually. Then either go to Objects-->Join or use the shortcut CTRL-J.
Next, we have to trim the neuron(s) down to the bits that we want to make a mesh of. In our case, we want to keep the dendrites:
First, go to Edit Mode or hit TAB while having the neuron(s) selected.
Now we have to select the nodes that we want to cut off. Either use the B key which we have previously used to draw a selection rectangle or use the C key to "paint" a selection.
To delete the selected nodes just hit X or DEL and confirm that you want to delete the vertices.
Neurons are created as curve objects but we need meshes. To convert, simply click Objects-->Convert to-->Mesh from Curve/Meta/Surf/Text or press ALT-C.
Pro-Tip: for big/complex neurons, we can reduces the number of vertices by reducing surface- and bevel-resolution in the Object data panel prior to conversion.
Next, we will generate a mesh that to fit around our glomerulus. Go to Add-->Mesh-->Ico Sphere.
Move the sphere such that it roughly centres on the glomerulus and scale it such that it is slightly bigger than the glomeruli (shortcut: S).
Tip: You should use a mesh with a shape that already bears resemblance to your final product. This includes e.g. scaling the mesh along single axis to make it fit better. In those cases, just make sure that the resolution of your mesh (i.e. the vertex density) is homogenous.
Now we have to make the mesh fit the glomerulus. Go to the Modifiers panel and add a Shrinkwrap modifier.
Select our neuron object as Target.
You can play around with the settings to make it fit better. Sometimes its worth it adding a Subdivision modifier to make the mesh fit tighter.
Before we can go on, we have to apply the modifier(s). Be aware that the order in which you apply the modifier matters!
This is super simple: go to the Blender-CATMAID plugin and click on Export Volume. Choose a name and optionally add a comment and hit OK. You may have to reload the 3D widget in CATMAID for the list of volumes to refresh.