Voxel Rendering (Ray Casting)
- petraszd
- Gnoblar
- Posts: 6
- Joined: Mon Jan 18, 2010 9:18 pm
- Location: Lithuania
Voxel Rendering (Ray Casting)
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:
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.
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:
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.
-
- Hobgoblin
- Posts: 554
- Joined: Tue Nov 14, 2006 3:26 pm
- x 7
Re: Voxel Rendering (Ray Casting)
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
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
- 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)
Looks very cool indeed!
-
- Greenskin
- Posts: 100
- Joined: Tue Aug 01, 2006 6:50 am
- Location: Canada
- x 6
- Contact:
Re: Voxel Rendering (Ray Casting)
Very cool!
I'll be playing around with the source for sure
I'll be playing around with the source for sure
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: Voxel Rendering (Ray Casting)
For 'a stupid project' this really is awesome!
Do post more about it, not only now, but later also.
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.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- petraszd
- Gnoblar
- Posts: 6
- Joined: Mon Jan 18, 2010 9:18 pm
- Location: Lithuania
Re: Voxel Rendering (Ray Casting)
@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.
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.
-
- Kobold
- Posts: 26
- Joined: Thu Nov 12, 2009 10:02 pm
- Location: France
- x 1
Re: Voxel Rendering (Ray Casting)
What you saypetraszd wrote:"All your base are belong to us"
Your project looks very cool (and the Qt interface seems to be simple and functional )
Somebody set up us the bomb !
-
- Hobgoblin
- Posts: 554
- Joined: Tue Nov 14, 2006 3:26 pm
- x 7
Re: Voxel Rendering (Ray Casting)
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!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.
- petraszd
- Gnoblar
- Posts: 6
- Joined: Mon Jan 18, 2010 9:18 pm
- Location: Lithuania
Re: Voxel Rendering (Ray Casting)
Hi,
Just added so called "Transfer Function" Widget to my demo program. It let's me interactively select voxels' impact on final result.
Video demo of the tool:
http://www.youtube.com/watch?v=fNb_8JlZeSc
Have a nice day.
Just added so called "Transfer Function" Widget to my demo program. It let's me interactively select voxels' impact on final result.
Video demo of the tool:
http://www.youtube.com/watch?v=fNb_8JlZeSc
Have a nice day.
- skullfire
- Gremlin
- Posts: 150
- Joined: Sat Mar 19, 2005 7:51 pm
- Location: San Jose, Costa Rica
- Contact:
Re: Voxel Rendering (Ray Casting)
That is just too impressive. Really good job.
I may have alzheimer, but at least I dont have alzheimer.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: Voxel Rendering (Ray Casting)
That's seriously interesting!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- petraszd
- Gnoblar
- Posts: 6
- Joined: Mon Jan 18, 2010 9:18 pm
- Location: Lithuania
Re: Voxel Rendering (Ray Casting)
No, it is not.petraszd wrote:...it is just one cube and one 3D texture...
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...).
Positive direction color pass now can be splited into several muli-cubes:
And video:
http://www.youtube.com/watch?v=ImdYg9bmWUo
- 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)
Cool, but what is the purpose of having an array of the same data?
- petraszd
- Gnoblar
- Posts: 6
- Joined: Mon Jan 18, 2010 9:18 pm
- Location: Lithuania
Re: Voxel Rendering (Ray Casting)
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.
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.
- 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)
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)?