4
$\begingroup$

Hello I would like to expand upon a previous post Create Cross Sections and 2D planes in Blender

I am able to follow the steps outlined in the excellent tutorial linked above, but I am having trouble rendering the resulting 2D slices in a serialized way. I am hoping I can be guided to a resource that will help me understand what I need to do to execute what I'd like to do.

What I'd like to do is render each slice as a 2D image with each image having an identical image size, and all images in frame with respect to each other. The result should be a series of 2D images resembling a CT scan.

Ideally this could be done with some level of automation instead of manually adjusting the camera and object for each slice as there will be ~200 slices.

Series of 2D cross sections

Above is an example of the series of 2D slices in 3D space

enter image description here

And above is an example of a rendered image I would like to produce. However this was a screen shot. And I need to make sure that my images are exactly in frame with each other and rendered at a constant distance from the camera.

Also I should add that I am comfortable writing scripts, but I have no experience programming specifically for blender. Thank you for your help

UPDATE: The below answer worked great for what I was trying to do, and was a much better solution than using boolean expressions to render slices as I had been trying. I simply rendered images of the primary model per the animation shown below. Thank you for your help

$\endgroup$
2
  • $\begingroup$ Why the Python tag in your question? Do you just want to render the slices, an image for each slice? $\endgroup$
    – lemon
    Sep 19 '20 at 21:55
  • $\begingroup$ Yes just to render an image for each slice. Thank you so much for this detailed explanation. I will follow up once I have had a chance try implementing. I tagged python because I was unsure if there was an efficient way to do this within the blender GUI $\endgroup$
    – John Doe
    Sep 20 '20 at 1:06
7
$\begingroup$

That can be done using shader driven by the current frame.

enter image description here

The node settings:

enter image description here

The generated texture coordinates is between 0 and 1.

Value nodes: one is driven by the current frame, the other is the amount of frames (here 100).

We then test if the model part is between frame and frame + 1 / number of frames.

If yes, emission surface and emission volume. If not transparent.

The driver is based on the scene and its current frame:

enter image description here

All is done with Cycles.

Depending on the camera settings, that can be perspective or orthographique (so constant size).

$\endgroup$
1
  • 2
    $\begingroup$ The variable frame is known to the driver namespace. The driver above can be created on a property by simply typing #frame directly into the property box. $\endgroup$
    – batFINGER
    Sep 20 '20 at 4:55
0
$\begingroup$

I also would like to generate several 2D slices of a volume and the method proposed by lemon is very good but is it possible to do the same thing while keeping the colors and the shadows of the original volume?

Thank you in advance.

$\endgroup$
1
  • $\begingroup$ This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. $\endgroup$ Sep 1 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.