2
$\begingroup$

I'm relatively new to Blender and currently, I'm working on creating medical imaging displays on a website using three.js. I've managed to import DICOM files using the MedBlend library (https://github.com/drmichaeldouglass/MedBlend), which imports them as a volume in VBD format. While I can render the images within Blender, I had some difficulties when attempting to export them to GLTF format. Unfortunately, it's not working as expected.

I'm wondering if anyone has experience with this process or knows if it's possible to achieve.

enter image description here


Update here is what I tried after reading some comments

I added a Principled BSDF node, Surface and Volume Absorption node connected to Volume socket.

Result: it works on a mesh type but not a volume type

I added a Principled BSDF node, Surface and Volume Absorption node connected to Volume socket.

Result: it worked on a mesh type but not to a volume type

enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ Is gltf even able to export volumetrics? I thought it only supported common triangulated meshes, materials and armatures. $\endgroup$
    – Lauloque
    Commented Mar 21 at 12:40
  • $\begingroup$ Here in the Blender manual are details about how to export volumes: Import-Export glTF 2.0. You will need a Volume Absortion node instead of the Principled Volume and there are more specific explanations. $\endgroup$ Commented Mar 21 at 12:45
  • $\begingroup$ @L0Lock I read it is possible, but I just started it. So it's a bit confusing for me $\endgroup$
    – Young Wang
    Commented Mar 21 at 13:41
  • $\begingroup$ @GordonBrinkmann, thank you. Yeah, i tried that, i'm new to blender and I followed the instruction but not sure why it didn't work. $\endgroup$
    – Young Wang
    Commented Mar 21 at 13:42

1 Answer 1

2
$\begingroup$

The glTF 2.0 format supports volumetric materials via KHR_materials_volume and related extensions KHR_materials_transmission and KHR_materials_ior. Blender 3.x and higher support exporting all these extensions to glTF files out-of-the-box as described on the glTF page of the Blender Manual.

Note however that KHR_materials_volume is specifically designed to work with a solid volume of material, bounded by a manifold mesh of polygons. This is very different from VDB volumes, and no compatibility with VDB is available at this time (although personally I think it would be awesome, but there would be a lot of work involved to make it happen). You can read more about the technical design goals of KHR_materials_volume in the Overview section and some of the sections that follow.

For examples of working glTF volumes in Blender, all you have to do is click File -> Import -> glTF 2.0 and load an appropriate glTF sample model. Try importing AttenuationTest, DragonAttenuation, and/or MosquitoInAmber, for example. Then go to the "Shading" tab in Blender, and select one of the meshes that appears to have volumetric effects. There will be a node graph constructed by the glTF importer, and this graph is intended to round-trip back through glTF export, so it can be used as an example of something that's possible to export to glTF.

$\endgroup$
1
  • $\begingroup$ massive thanks for this detailed answer. I was hoping to retain the textural look of fog or point cloud of my rendering. but too bag it is not support for VDB. $\endgroup$
    – Young Wang
    Commented Mar 21 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .