Volumetric "Bitmaps"?

10 posts

Flag Post

I was pondering over alternate methods to drawing clouds, namely a very low resolution 3D renderer (that would calculate lighting levels for a small volumetric space, along with total alpha through the depth of the space at any given surface coordinate) and realized that if I wanted to fill this volume with any kind of realistic noise without it being the sponge that 3D perlin noise is I’d need some of the methods that the bitmapdata class has.

Namely threshold and bucket fill (to divide the noise into two spongy regions, then find one contiguous segment to separate out).

Threshold is easy enough to reconstruct, bucket fill less so.

While this is probably a dead end line of reasoning, I was curious if there was already a volumetric bitmap implementation out in the world.

 
Flag Post

bucket fill is simply a recursive function ( a looping one works too ) Basically you fill the cells next to the one of interest than are the same color as the starting point. Then you apply the same to the cells next to that one.

 
Flag Post
Originally posted by qwerber:

bucket fill is simply a recursive function ( a looping one works too ) Basically you fill the cells next to the one of interest than are the same color as the starting point. Then you apply the same to the cells next to that one.

I know how it works, it’s more a thing of managing the execution.

 
Flag Post

didn’t i participate in creating a specialized iterative bucket fill that operated on an Array for a dungeon thing for you?

why not adapt that for BitmapData. use getVector and it can still operate on a 1D Array, requiring modification only for the color ranges

 
Flag Post
Originally posted by skyboy:

didn’t i participate in creating a specialized iterative bucket fill that operated on an Array for a dungeon thing for you?

I don’t recall that at all.

 
Flag Post

Originally posted by Draco18s:

I don’t recall that at all.

maybe it was someone else. i’ll search with google

 
Flag Post

I imagine you’d store it as a vector, then provide some render method as well as the floodFill and perlin methods.

 
Flag Post

The perlin noise would be godawful slow though, as I’d have to use Skyboy’s AS3 implementation (native doesn’t have a Z component).

And while his implementation is fast, it can only do about 10000 pixels per frame.

 
Flag Post

You can try using Pixel Bender and passing in a set of random values as a ByteArray

 
Flag Post

http://www.kongregate.com/forums/4-programming/topics/171875?page=3#posts-3755177

easily adapted into a floodfill. i’m going to work on it to increase speed more.