Here’s my simple 3D-trick (or 2.5D, I know) using the color value as a z-value in 3D-space:
– to start with we have circular sprites, I’ve used a radial gradient fill, with values 0x00 around edges and 0xFF at the center,
with blendMode.NORMAL looking like this:
– when changed to BlendMode.LIGHTEN, on the area where the sprites overlap, we get this
Yes, looks like the sprites really had depth.
From the color values blendMode.LIGHTEN chooses the brighter, or as a number, larger one, like max(a,b),
or like we were having a z-buffered rendering, imaging having more sprites – kind of a voronoi mountain !
After adding some filtering ephasizing the 3D-effect and adding the color tones, we end up having this:
Although we’re limited to a very narrow depth in z-scale as well as a very limited number of colors – only 256 shades or levels, I found this method rather interesting in all its simplicity.
Here’s some results I came up with:
At the bottom of that there’s a text – may not be the best use of textField-input, but try typing something…
I don’t know if it’s for any use for anyone – but here’s the source code
(reminds me of some old ’80’s computer game, should I add a penguin jumping from one block to another ? )
… stay tuned, might be source code and most probably some more examples coming up ! Wish I had the time to make a couple of more experiments like for instance if using linear gradientFill gives a ‘plane’ in 3D-space and what happens with BlendMode.DARKEN or BlendMode.SUBTRACT – a hole or anti-material ?