Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Benjohn Barnes, posted on February 27, 2001

Image Description, by Benjohn Barnes

Hi there. This image comes from a test renderer I've put together to experiment with shadowing in volumetric environments.

The model (I think it's 128^3 voxels) is a Pink noise function with some scaling and bracketing to create the desired cloud cover.

The rendering is achieved by simply drawing the volume as 128 overlaid, textured polygons. Each polygon is rendered twice, once textured with an RGB transparency map, and once textured with an RGB emission map.

The transparency map is essentially just the initial volume of cloud data. The emission volume data however, is generated by "illuminating" the cloud data set. Illumination is achieved by sweeping a light map through the volume data. The light levels of the map's pixels are used to illuminate the voxels of a slice of the volume, and then the voxels are used to attenuate the pixels of the light map, casting shadows on subsequent layers of the volume. As well as generating shadows, the volume is "normal shaded" without ever explicitly defining a normal data set - which is nice. The technique works particularly well for clouds because you get glow filtering through some of the thinner bits of fluff.

Each image takes a few seconds to draw at the moment. This is rather slow! Most of this time is due to texture transfer, and my iBook having a sedate 3d card. In a multi-resolution setting (it's the future, boys and girls), impostors could be used to "flatten" blocks of the volume into a single polygon. It's a bit tricky to do shadowing "on the card" with openGL, but it's not impossible by any means. I believe it may be a better trade off to do the shadowing and impostor generation in software (with Shear Warp), and final texture composting in hardware.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

February 27, 2001, 01:31 PM

Wow. That looks beautiful. Using 128 128x128 textures to render voxels is a
really clever idea. You can even do perspective rendering of voxels fast by scaling
down the "back" polygons appropriately.

Can you explain how you do the "normal" shading in more detail? Are you computing
normals for each voxel using marching cubes, then applying the light from the shadow
map or is something else going on?



February 27, 2001, 02:19 PM

Wow, although splitting the voxels up into textured planes is a relatively old technique, the emission/transparency map stuff does make it look quite nice. I'd thought about trying that technique but never got around to it - looks like it comes out even better than I would have expected. Too bad it takes up so much texture memory for such a relatively small area... not to mention the fillrate needed. Ouch. :)

Still, for offline rendering it still has quite a bit of promise, and there's a few hacks you could always do to make things faster (such as reducing the number of voxel-texture layers - most clouds are a lot shorter than the are wide, for example).


February 27, 2001, 02:23 PM

That looks nice. Like I'm looking straight up with the sunset in front of me.


February 27, 2001, 02:42 PM

Very nice, although to tell the truth, I dont understand all of what you did from the description. For example, what is pink noise?

I like the idea for the illumination, but is it possible to illuminate from a direction not alaigned with an axis? Also, why do you need seperate polygons for each voxel?


February 27, 2001, 02:49 PM

How do you deal with alternative viewing angles?
For example, can you view that same volume from the top, or will it be transparent because of polygon orientation.

Mat Noguchi

February 27, 2001, 03:23 PM

This sounds like the technique presented at the 2000 SIGGRAPH for cloud rendering:

A simple, efficient method for realistic animation of clouds

Yoshinori Dobashi, Kazufumi Kaneda, Hideo Yamashita, Tsuyoshi Okita and Tomoyuki Nishita
Pages 19 - 28

You can d/l it directly if you have a subscription to the ACM Digital Library.



February 27, 2001, 03:30 PM

wow, I ahve those exact clouds floating overhead right now. Excellent photo-realistic effect, infact are you sure your not just posting a picture of a sunset!:) How fast does it run.

Ian Romanick

February 27, 2001, 05:05 PM

The paper is also available at Heh...gotta love those Google searches. Plug the title of the paper in, and this site comes up as the first hit. :)

Mark Friedenbach

February 27, 2001, 05:13 PM

Read the description, it's in there.


February 27, 2001, 08:52 PM

i'm wondering how you could use it on
cheap cards , cause using 128 textures would kill the
framerate no ?

is a demo available somewhere ??


February 28, 2001, 05:22 AM

Wow, that's amazingly complex for something that looks exactly like a subdivision plasma-cloud :)

This thread contains 11 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.