2.54 Beta: How to setup volumetric textures using the Blender Voxel format

Hi I try to display volumetric files in the Blender Voxel format in Blender 2.54 Beta but I cannot view the data in the rendered image. has anybody a blend-file in which everything is setup correctly so that I just have to replace the path to my voxeldata file? For Blender 2.52 r27226 I have even a template that displays my data (so I also know, that my voxeldata are correct). But the same template does not work any more under 2.54.

i hope anybody can help me with that issue

Are you building from image data such as CT or MR images?


The banding is from the slice overlap which I have not been able to solve for yet, but most of the settings you need are in the pic.

Update: Banding caused by using a reformat of the original axial slices. Axial images are still banded, just not like this one.

yes, i have MRI images and I already wrote a script (http://brainblend.sourceforge.net/) that converts this data to the blender voxel format (four integers and then float data). with an alpha 2.52 version of blender this works but unfortunately not with the newest beta. did the format change? i would like to avoid an image sequence.

Not sure. I had to use an image sequence on mine since I didn’t have volume data to work with. I’ll try some volume data sets and see.

that would be great, thanks!

Haven’t had any luck. Looked around to see if there were some changes, but didn’t really find anything obvious. There are still a bunch of references to using the image sequences, but seeing what you want to and have done, this won’t help. Maybe you could supply the volume you’re trying to render and we could attack this from both ends. I’ll keep looking.

hi ajm, this would be great. attached to this post you find the template, that works for blender 2.5 alpha. and here you can find a T1-image that works with this template in this version

https://mein-ziv.uni-muenster.de/bigmail/index.php?DOWNLOAD.f37460dc6e7383d4a9f243ee9a3748fc

would be great, if you can figure out, what works wrong in the template or in the blender version. as i wrote a toolbox for the fmri community i get each week asking me for a template that works with the current 2.5 version.

Attachments

importing_voxeldata_struct.blend (85 KB)

hello again, Martin, and hi ajm, it would be really very helpful if you could get this voxel rendering business running. in case you want to try 8bit data then here a file i created :

http://www.pistikem.org/blender/skull8bit.bin.bz2

matrix size is 512x512x233, compressed with bzip2. it’s a CT scan of a plastic skull, originally DICOM, then converted to NIFTI, and ultimately here rescaled to 8bit. background is mostly zero, plastic voxels may be in the range [100-255].

furthermore, i have other trouble with the blender GUI although i should admit that i pretty new in this club. for example how does one arrive at the “Influence” panel ? and how come my “Preview” looks so flat with just one black window and no alpha button ? sounds like newbee, right ?

I’ve tried both of the files that you two have posted, and I, so far, have not been able to get any variation to show up. It’s almost as if the data isn’t being read at all, save for the fact that if I reverse the colors of the ramp the opposite of what is expected occurs.

I’ve tried scale, step size, density, you name it, but I can’t get it to render anything but a cube. Image sequence runs good though, but it’s not what we are looking for. Matt Ebb may be someone that we would have to talk to, since I believe that he implemented the function, and even he used image sequences, if I’m not mistaken. I’m at a loss for now, but will look around some more.

If something did change in the code for this function, I don’t think that it was made widely public, but if it worked in an older build, you may have to rely on that.

alright, thanks for your effort. i think, i will contact matt ebb and try to find the file in the sourcecode that handles this issue to figure out what actually happens in the code.

hey valaki, i found a blender 2.52 alpha for linux. you can download it here:
http://www.fileuploadx.de/328790

maybe this version works. I could not figure it out here on my system.

dear Marty, many thanks for the link - i actually needed to locate a 64 bit linux version of 2.5-alpha2, so that finally produced then some rendering output of the 32float version of that skull CT data but not for the (preferred) 8bit version. in any case, i didn’t succeed to make the voxel surfaces opaque which is desired in this particular data set (but obviously less so for regular fMRI cases where transparent views are used frequently). anyway, lets hope that Matt Ebb will hear about these voxel rendering issues we experience currently with the 2.54 version.

Hi Guys, I quickly put together a demo file using that skull data linked above:

http://mke3.net/blender/devel/rendering/volumetrics/skull.jpg

the .blend file is here: http://mke3.net/blender/devel/rendering/volumetrics/skull.blend

Notes:

  • The main thing to remember is that this volume rendering is not intended for solids, or even medical usage at all - it’s really just a nice side effect. The volume shader in blender is intended for gas/particles like clouds or smoke. Having said that, if you crank the density of the volume right up, you can approach something more solid looking. The above example is using a Density Scale of 50.

  • So, to generate something to render, in the Influence panel you have to map the texture to Density rather than the default Emission etc. (would be much better to use Density by default for volumes, but this is a side effect of blender’s material system… :confused: ).

This means that the values in your voxel data will translate to density of the rendered volume, 1 = dense, 0 = empty. You can find this sort of info in any volume rendering tutorial for blender related to smoke etc, so I won’t go into much more detail here.

  • This plastic skull example was quite easy because I didn’t have to isolate any kind of extra tissue etc. To do that normally you’d have to use the ramp option in the Texture’s Color panel. Here’s an example of a scan of my own head, using the ramp to isolate out the skull (right) from all the flesh (left).

http://mke3.net/blender/devel/rendering/volumetrics/skull_ramp_density.png

  • You may notice on a dense volume like this, the shading looks a bit blocky - this is due to the Light Cache, which speeds up rendering a lot, without too much visual quality loss on most cloud/smoke kinds of volumes. The artifacts do show a bit more clearly with very dense volumes though. You can remedy this by either increasing the Light Cache resolution (using more memory) or turning it off completely (using more CPU).

i downloaded the skull file
and re loaded the bin file in texture

but it did not render as the skull?

so how do you make this work to get the render as a skull?

now what is this bin file ?
it’s not a normal image like a JPG image!
so what is it ?

Cat scan image are usually made with a few 100 2D slices of body part
then do you have to make a 3D model out of theses slices before using theses?

Thanks & happy 2.5

@ Marty
interesting subject and ouwl like to udnerstand more about it and voxels!

do you have the script under 2.5?
would be interesting to see this under 2.5!
which is the next current version i guess

and is there a page explaning what the original data is like 100’s of 2D slices being transformed into what to be used in blender!

Thanks

RickyBlender: I’m not sure what’s going on with your setup. You should be able to load up the .bin file in the voxel data texture and just press render.

That file is a raw binary voxel file, it just contains a grid of volume data all in one big chunk. Alternatively you can load up an actual image sequence of slices, and blender will build the 3d grid internally.

I’ve written a bit more information on this stuff here: http://mke3.net/weblog/medical-voxel-data/

[ATTACH=CONFIG]120937[/ATTACH]ok see picture

i extracted the bin file = skull8bits.bin and loaded it in the blend file texture
the zip file is 2.4 MB but the bin file is at 174 MB so may be this is wrong!
i’v extracted with Jzip is this ok or not ?

and did the render and got nothing !

is there other var to be changed or re- adjusted ?
the mat seems to be on volume

Thanks

Hmm…

I am in the same boat as Ricky.

I have downloaded the BIN and the BLEND file. I select the texture tab and browse to the BIN data. I am using Blender 2.55 r33054 (fliciss build) and when I render I see nothing.

Is this really a lost feature? Do I have to downgrade to 2.52?

are there other sample showing examples on how to use voxel
i mean i cannt loate any right now!

may be with particules just to show how it is done!

also is there any wiki of some doc page on voxel?

Thanks

Hi guys, seeing these last few posts made me investigate and further, and found that it was indeed a bug, it wouldn’t work correctly when the voxel data source was using a relative path (which seems to be default now).

I’ve just fixed this in svn, it should work for you now.

thanks!