Volumetric sprite using OGRE (warning - screenshots)

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!
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Volumetric sprite using OGRE (warning - screenshots)

Post by :wumpus: »

I just created a volume rendering implementation using OGRE, it already looks quite nice. The object shown is a partially alpha transparent RGBA 32x32x32 3d texture created with reaction-diffusion procedural texture generation.

The fish is there to check if the orientation matches and behaves like a normal mesh. Non-transparant meshes can even move through it.

Image

Image

Image
Last edited by :wumpus: on Fri Jan 07, 2005 1:32 pm, edited 1 time in total.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Looks amazing. I was thinking in trying to implement this some day, but my recently busy life didn't allowed me to try :-/
Does it require some kind of fragment program? If not, it would be great for me (GF4MX :P)

Superb ;)
Image
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

It currently uses the brute force approach (orient object, a set of perpendicular slices, to camera, then apply inverse transformation to texture coordinates). Without any kind of vertex of pixel shader.
It does need 3d texture support on your card though.
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post by DWORD »

Looks nice! :) I'm currently experimenting with isosurfaces, and I actually thought about borrowing your dyntex reactor and 3d'ize it to get some volume data, but looks like you've already done that. Would you like to share the 3d version? 8)
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

No problem; the 3D implemementation works outside of OGRE though (it's a computer science project), if you pm me your mail addy I'll send it.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Here's a way cool one!

Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Superb^2 8)

Edit:
Superb^3 (aka, Cubic-superb ;))
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

Groovy!
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Kencho wrote:Superb^2 8)

Edit:
Superb^3 (aka, Cubic-superb ;))
Hehe :) It really makes for impressive effects, albeit it's a pity there are so few decent volume textures on the net and they are hard to create/design.

I'm not sure what to do with my VolumeRenderable yet, use it in an OGRE demo, provide it as seperate add-on, etc.
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post by DWORD »

:wumpus: wrote:No problem; the 3D implemementation works outside of OGRE though (it's a computer science project), if you pm me your mail addy I'll send it.
Please check your PMs. ;)
:wumpus: wrote:I'm not sure what to do with my VolumeRenderable yet, use it in an OGRE demo, provide it as seperate add-on, etc.
A demo would be cool, I would like to see it in action. :P
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Image

Hehe.. I think this demo is becoming quite psychedelic (yep, you're not drunk, you're really seeing an ogre head inside a volumetric julia/mandelbrot set, with dark grey floating quads around it)
User avatar
eugen
OGRE Expert User
OGRE Expert User
Posts: 1422
Joined: Sat May 22, 2004 5:28 am
Location: Bucharest
x 8

Post by eugen »

i like the colors! :wink:
is looking verrrrry nice!
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Yeah! Rainbow color schemes rock

OK, everyone using Azathoth (head) can now take a look at this demo, it's comitted under VolumeTex.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

Wooo, trippy :shock:
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

This is some COOOOL effect !
Banania
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary

Post by AssiDragon »

:shock:
Now that's something.
Hope is the first step on the road to disappointment.
User avatar
Cyberdigitus
Halfling
Posts: 55
Joined: Thu Mar 04, 2004 7:08 pm
Location: Belgium

Post by Cyberdigitus »

Not directly related to the way you render volumetrics, but to generate them, this is a very interesting reseach project:

Simulation of natural phenomena using graphic hardware

They seem to have good volumetrics rendering too. It apears they use both texture slices and impostor techniques, using splitted imposters it's also possible to avoid that intersection effect of the layers and an object inside. More in this big dissertation paper by Mark Harris:

Real-Time Cloud Simulation and Rendering (173 pages .pdf, 3.5 MB)
. . .
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Thanks for the interesting links :) although I'll probably stick with this (relatively) fast and simple implementation without preprocessing, shaders and heavy math.
User avatar
TobascoSpam
Halfling
Posts: 86
Joined: Thu Nov 18, 2004 2:30 am
Location: Texas

Post by TobascoSpam »

Keep up the great work, that looks brilliant. You going to be releasing any code? Incorporate it into the new Azathoth release?
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post by DWORD »

It is incorporated in Azathoth. ;) Just check out from CVS.
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary

Post by AssiDragon »

When I try to run the volumetex demo I get this:

Code: Select all

00:59:45: Finished parsing scripts for resource group General
00:59:45: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: -2005530518
Function: D3D9Texture::_createVolumeTex
Description: Error creating texture. 
File: \Assassin's Personal\Quake2DEV\ogrenew\RenderSystems\Direct3D9\src\OgreD3D9Texture.cpp
Line: 624
Stack unwinding: <<beginning of stack>>
00:59:48: *-*-* OGRE Shutdown
Card properties:

Code: Select all

00:59:40: RenderSystem capabilities
00:59:40: -------------------------
00:59:40:  * Hardware generation of mipmaps: yes
00:59:40:  * Texture blending: yes
00:59:40:  * Anisotropic texture filtering: yes
00:59:40:  * Dot product texture operation: yes
00:59:40:  * Cube mapping: yes
00:59:40:  * Hardware stencil buffer: yes
00:59:40:    - Stencil depth: 8
00:59:40:    - Two sided stencil support: no
00:59:40:    - Wrap stencil values: yes
00:59:40:  * Hardware vertex / index buffers: yes
00:59:40:  * Vertex programs: no
00:59:40:  * Fragment programs: no
00:59:40:  * Texture Compression: yes
00:59:40:    - DXT: yes
00:59:40:    - VTC: no
00:59:40:  * Scissor Rectangle: yes
00:59:40:  * Hardware Occlusion Query: no
00:59:40:  * User clip planes: no
00:59:40:  * VET_UBYTE4 vertex element type: no
00:59:40:  * Infinite far plane projection: no
00:59:40:  * Hardware render-to-texture: yes
00:59:40:  * Floating point textures: no
00:59:40:  * Non-power-of-two textures: yes
Well, that's in DX. With OPENGL I just get a silent crash (and a completely different rendersystem capability, which is rather amusing for me, but that's not related to this demo). I have a GF4GO! 420 32MB with 56.72 drivers. I am not sure wheter is this thing supposed to run on this hardware or not, just posting this away. :)
Last edited by AssiDragon on Thu Feb 03, 2005 1:13 am, edited 1 time in total.
Hope is the first step on the road to disappointment.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

3d textures aren't supported on gf2 hardware (hence the d3d call to make a volume tex fails), although I agree the error messages could be more clear about that.
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary

Post by AssiDragon »

Oh I see. :)

Sometimes I hate when my chip is called GF4GO (sorry for the typo already) when it really is gf2 technology.
Hope is the first step on the road to disappointment.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I've added a new rendersystem capability, RSC_TEXTURE_3D. The VolumeTex demo checks for it and gives a nice error message now.