gillesferrand / Unity-RayTracing

Demo of volume rendering a data cube in Unity by performing ray tracing on the GPU
64 stars 17 forks source link

How to make the skull cube? #2

Open zhang71896 opened 7 years ago

zhang71896 commented 7 years ago

Dear gillesferrand Hi, my friend , may i ask you how to make the skull cube? : )

Quentin-H commented 7 years ago

What is that lol?

zhang71896 commented 7 years ago

your assets skull.asset, my older brother .

gillesferrand commented 7 years ago

Hi, the asset file was generated by the "loader" script from the raw binary file (which I got from some other demo). Activate the script, and run the demo, and it will be regenerated. With this script you can convert your own data to 3D textures.

rezadarooei commented 7 years ago

hi, sorry I am asking how we must create skull cube from for example 100 tif images is it possible to explain it more?

gillesferrand commented 7 years ago

Hi, my demo directly loads a 3D data cube. The skull file I re-used from the original XNA demo by Kyle Hayward. My own files I make from Python or Fortran. You could use any data software that can output binary files. Alternatively, you may prefer to load the set of individual images inside Unity, this is what Brian Su is doing in the first version of his Unity project. See more discussion in the forum: https://forum.unity.com/threads/3d-volume-rendering-using-raymarching-demo.120780/

gillesferrand commented 6 years ago

Hi, I don't know of a dedicated software for doing this, myself I would stack the images by hand with SciPy.

gillesferrand commented 6 years ago

Sorry I can't take the time to teach you how to use Python (and your hurry doesn't affect my pile of duties).

gillesferrand commented 6 years ago

I never had it, my data come in the form of 3D cubes.

viche72 commented 6 years ago

@gillesferrand thanks so much for sharing your code. It is by far the most straight forward implementation I have found.

I know this question was posted quite some time ago but @rezadarooei if you are still looking for a way to generate useful data files you can try fiji (http://fiji.sc/) an implementation of ImageJ. You can use your individual images, convert them to a stack and save them as an 8bit nrrd file. I have successfully used nrrd files using this library.