Voxel Rendering (Ray Casting)

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
petraszd
Gnoblar
Posts: 6
Joined: Mon Jan 18, 2010 9:18 pm
Location: Lithuania

Voxel Rendering (Ray Casting)

Post by petraszd »

Hello,

I am doing some personal-educational stuff with OGRE One day (today) I
thought: "I am using this great library, but I am not contributing any code
back".

"At least" - I thought - "You could show your stupid project to
community".

So, this my little project:

Voxel Rendering.
Tags: Real Time, Ray casting, 3D Textures and GPU shaders for rendering.
Graphic Engine: OGRE
GUI: Qt

Screenshots:

Image

Image

Image

Image

Image

Image

More:
http://picasaweb.google.com/petraszd/VoxelRendering

Video:
http://www.youtube.com/watch?v=-XudybyOTIE

Source Code:
http://bitbucket.org/petraszd/master-voxels/

Voxel data from:
http://www.volvis.org/

My dev platform is Linux OS. Theoretically, it must work with Windows and Mac
OS'es, but no empiric results so far.
psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm
x 7

Re: Voxel Rendering (Ray Casting)

Post by psquare »

Very cool.

I guess you do the complete ray casting in the pixel shader?

Is it just the one cube(dataset) in a 3D texture for now? Or can you handle multiple blocks raycasted and then sorted back to front/or front to back. I mean for huge data sets..

*Edit* Not sure if you already know this, but you can get rid of the Moiré patterns using hit point refinement by the way. Looks very cool for iso-surfaces and is hardly 6-8 lines of code.
http://medvis.vrvis.at/fileadmin/public ... CG2005.pdf
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

Re: Voxel Rendering (Ray Casting)

Post by Ruud v A »

Looks very cool indeed!
Rambus
Greenskin
Posts: 100
Joined: Tue Aug 01, 2006 6:50 am
Location: Canada
x 6
Contact:

Re: Voxel Rendering (Ray Casting)

Post by Rambus »

Very cool!

I'll be playing around with the source for sure :)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Voxel Rendering (Ray Casting)

Post by jacmoe »

For 'a stupid project' this really is awesome! :mrgreen:

Do post more about it, not only now, but later also. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
petraszd
Gnoblar
Posts: 6
Joined: Mon Jan 18, 2010 9:18 pm
Location: Lithuania

Re: Voxel Rendering (Ray Casting)

Post by petraszd »

@everybody
Thanks for comments.

@psquare
Yes, I do almost all work within shaders and yes now it is just one cube and one 3D texture. It's actually starts to hurt, because when 3D Texture does not fit into GPU memory - app stops working. I am planning to work on this issue.

@jacmoe
It is experiments for my master thesis and deadline is start of summer. So, I am not going to abandon it until then.


By the way, I am not native English speaker, so sorry for all possible "All your base are belong to us" moments.
Irydion
Kobold
Posts: 26
Joined: Thu Nov 12, 2009 10:02 pm
Location: France
x 1

Re: Voxel Rendering (Ray Casting)

Post by Irydion »

petraszd wrote:"All your base are belong to us"
What you say :lol:

Your project looks very cool (and the Qt interface seems to be simple and functional :))
Somebody set up us the bomb !
psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm
x 7

Re: Voxel Rendering (Ray Casting)

Post by psquare »

petraszd wrote: @psquare
Yes, I do almost all work within shaders and yes now it is just one cube and one 3D texture. It's actually starts to hurt, because when 3D Texture does not fit into GPU memory - app stops working. I am planning to work on this issue.
Yeah, that's what I thought. Anyway, good luck with your thesis and if you need pointers/resources on chopping up/bricking the dataset, rendering, etc, please feel free to PM me. I did some work in this area about 2 years ago, but I am no expert!
User avatar
petraszd
Gnoblar
Posts: 6
Joined: Mon Jan 18, 2010 9:18 pm
Location: Lithuania

Re: Voxel Rendering (Ray Casting)

Post by petraszd »

Hi,

Just added so called "Transfer Function" Widget to my demo program. It let's me interactively select voxels' impact on final result.

Image

Video demo of the tool:

http://www.youtube.com/watch?v=fNb_8JlZeSc

Have a nice day.
User avatar
skullfire
Gremlin
Posts: 150
Joined: Sat Mar 19, 2005 7:51 pm
Location: San Jose, Costa Rica
Contact:

Re: Voxel Rendering (Ray Casting)

Post by skullfire »

That is just too impressive. Really good job.
I may have alzheimer, but at least I dont have alzheimer.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Voxel Rendering (Ray Casting)

Post by jacmoe »

That's seriously interesting! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
petraszd
Gnoblar
Posts: 6
Joined: Mon Jan 18, 2010 9:18 pm
Location: Lithuania

Re: Voxel Rendering (Ray Casting)

Post by petraszd »

petraszd wrote:...it is just one cube and one 3D texture...
No, it is not.

After some big code rewrite, now it is possible to load several 3D textures (I even create my own ZIP related file format - yeah! That is so professional...).

Image


Positive direction color pass now can be splited into several muli-cubes:

Image


And video:
http://www.youtube.com/watch?v=ImdYg9bmWUo
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

Re: Voxel Rendering (Ray Casting)

Post by Ruud v A »

Cool, but what is the purpose of having an array of the same data?
User avatar
petraszd
Gnoblar
Posts: 6
Joined: Mon Jan 18, 2010 9:18 pm
Location: Lithuania

Re: Voxel Rendering (Ray Casting)

Post by petraszd »

No purpose at all...

And the main point; is that it is not the same data. It is 64 "different" 3D textures. I was too lazy to generate something more interesting, so just copy the same texture into 64 different files. But technically program thinks it is not the same data.

The main minus of this program was that if You try to feed it with too big texture it just falls down on its knees because it can put whole texture in GPU memory. And now it is possible to split that big texture into smaller peaces and try to feed program with them.

So this is the plan: I will have to find out or generate bigger data sets, instead of recopying smaller ones.
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

Re: Voxel Rendering (Ray Casting)

Post by Ruud v A »

Ah, I see. Cool! Maybe a nice feature too would be to overlay two different textures (like different types of scans of the same thing)?
Post Reply