Light Sequencer Device

Community Forums/Showcase/Light Sequencer Device

tesuji(Posted 2010) [#1]
This is a "visualizer/screensaver/demo thing" I've been working on in between other projects .

*edit* Added windows version download link



Blog Post

Mac OS X (intel) download
http://dl.dropbox.com/u/21540395/LightSequencerDevice_v_0_95.zip (1.5MB)

Windows download
http://dl.dropbox.com/u/21540395/LightSequencerDevice_v_0_95_Windows.zip (1.3MB)

Not everyone's cup of tea but I'm sure there are some here who will enjoy playing around with it.
It was written in blitzmax using minib3d and makes use of the handy BackBufferToTex command :) Not extensively tested yet so I would appreciate any feedback provided. No dependency on GPU shaders or anything too fancy but I've only tried it on a macbook pro.
I'll compile a windows version when I eventually get round to brushing the dust of my neglected winxp box (and maybe even a lunix version).

Features I would like to add if I find time and inclination :

* 3D scene editor/file format
* User images for texture overlays
* Sync to music playback
* Text

Enjoy!

http://spungifungi.wordpress.com/

Last edited 2012


ImaginaryHuman(Posted 2010) [#2]
This is one of the most impressive graphics demo systems I've ever seen. I was really amazed by the visual effects until I realized you can actually access lots of other performances and effects in a cool editor, wowza! Are you using shaders?


jhocking(Posted 2010) [#3]
Oh man that is cool. Yeah I didn't notice the editor at first either. Some effects reminded me of the iTunes visualizer, only y'know better.


Chugs40(Posted 2010) [#4]
Now thats impressive!


DavidDC(Posted 2010) [#5]
Amazing amount of variety. I particularly like Plasma 0 and Lair 5. Well done!


Armitage 1982(Posted 2010) [#6]
Waw crazy effects !
This one remind me a Dos demo from Doomsday called Vivid Experiment : http://pouet.net/prod.php?which=2167

Back in the day I really enjoyed the glass water effect.
(Around 5:20 http://www.youtube.com/watch?v=yQLIJsqkP_s, by the way if Anyone know how to realise such effect I would silently listen !!).


ImaginaryHuman(Posted 2010) [#7]
The glass effect is easy... it's basically a precalculated pixel offset at each pixel. So you generate a glass texture which has x and y offset values stored in it per pixel, then you use that texture to lookup pixels in background image texture. Naturally moving the image around makes it look all warpy and stuff. How to actually code it on OpenGL though I'm not sure other than to do like environment mapping, maybe sphere/cubic mapping?


tesuji(Posted 2010) [#8]
Thanks everyone.

Oh yes, forgot to mention the editor. Hold <i> for info and <enter> to toggle edit mode.

@ImaginaryHuman - No shaders used as yet but can imagine they would be good for an extra post fx layer..

Here's a screenshot of the editor :




puki(Posted 2010) [#9]
This is Mac though - 92% of Blitzers haven't got one.


jkrankie(Posted 2010) [#10]
It's really hypnotic!

If you don't mind me asking, how are you using BackBufferToTex for the feedback/gradual fade effect. I seem to remember trying this once, but got rather strange results. Is it just a texture flag i'm missing, or are you being more clever than that?

Cheers
Charlie


tesuji(Posted 2010) [#11]
Sorry Puki. Can you ever forgive me? Windows version now up.
Caveat - given this is opengl, can't vouch for performance on windows. On my samsung nc10 it was a tad sluggish. May have just been an underpowered machine though.

PS Hooray for blitzmax xplatformness goodness! No source change needed.

@jkrankie

Nothing clever really. Just a createtexture(512,512) and then :

	CameraViewport camera,0,0,TextureWidth(texture),TextureHeight(texture)
	RenderWorld()
	BackBufferToTex(texture)
	CameraViewport camera,0,0,GraphicsWidth(),GraphicsHeight()


think I may even have pinched it from one of the minib3d examples somewhere.


jkrankie(Posted 2010) [#12]
Ah i see! I'm using the exact same thing for reflections in my current game!

So to get the smooth fade you're just reducing the alpha of any surface you're applying the texture to before rendering? I'm confused as to how the texture seems to add to the previous frame rather than clear it?

Cheers
Charlie


puki(Posted 2010) [#13]
Weeeeee!

This is really exciting - but I have to go to bed now and I'll probably not sleep after watching this for a while.

At one point I saw a pink Rubik's cube thing.


tesuji(Posted 2010) [#14]
Oh I think I know what you're getting at..

My feedback texture is applied to a quad infront of the main image.

TextureBlend feedback_tex, tex_blend_mode
EntityFX feedback_quad, 1 (full-bright)
EntityBlend feedback_quad, blend_mode
EntityAlpha feedback_quad, 1.0

where tex_blend_mode = multiply and blend_mode = additive
The blend modes can be altered in edit mode (Keys D & F)
An alpha of 1.0 will give you no fade, < 1.0 will give you increasing fade amounts.

Not sure if that makes sense?


BlitzSupport(Posted 2010) [#15]
This is one of the most impressive graphics demos I have ever seen anywhere!


Sync to music playback



The lazy way to do this would be to set BPM based on the user tapping the keyboard.


jkrankie(Posted 2010) [#16]
Cool, thanks :)

You can audio spectrum data pretty easily using Brucey's BASS module.

Cheers
Charlie


Polan(Posted 2010) [#17]
It crash quite often when switching patterns with vinelin selected.


John Blackledge(Posted 2010) [#18]
Wow - utterly stunning. Thanks.


Mikel(Posted 2010) [#19]
Agreed. I want more.

Outstanding and a thing of beauty.


Nate the Great(Posted 2010) [#20]
amazing graphics! This is even more motivation for me to learn open gl better... although I fear I will always suck at it... This is the kind of screen save people will buy but it does crash pretty often for me on vinelin and sometimes on slick (my favorite one)


MacSven(Posted 2010) [#21]
Great work and cool effects!

COOOOOLLLLLLL


Leon Drake(Posted 2010) [#22]
omg epic-leptic seizurely awesome!


Axel Wheeler(Posted 2010) [#23]
Wow.

It seems to go through the same sequence each time you run it; does it? You might want to randomize both the performance and pattern.

Also the cpu usage is quite high (not surprising on my old machine). Are you using something equivalent to Blitz3d Delay command to release some resources? (Just making sure!)

This is really awesome; keep up the great work!


tesuji(Posted 2010) [#24]
Thanks everyone.

Not managed to quite track down the crashing issue on those few performances but have finally managed to get it reproducable by running it on Ubuntu. Didn't crash for me on windows or OSX. Probably something really obscure.

Quite like the idea of a performance order randomize and/or sequence scramble feature and have had it on my todo list for a while. Should be quite easy to do :).
At the moment you can control the sequence order on the edit screen by dragging the numbers around. The performance order is just down to the file read order from disk (which may be alphabetical?). If you start the app from the CLI you can specify the performance directory and make it use whatever custom performance files you have.

There is indeed a Delay(1) in the mainloop ;-) High CPU use on older machines is most likely down to BackBufferToTex on a 512x512 texture once per frame.


taumel(Posted 2010) [#25]
I really like plasma 1. With a little bit more depth this would be great for like flying by a sun. How does it work? Drawing textures in the background and then zoom/(blur)/reduce them in their brightness?

Last edited 2010

Last edited 2010


tesuji(Posted 2010) [#26]
More or less, although a feedback mechanism is used.

Texture is drawn first as part of a simple 3d scene (noise type animated tv static texture in plasma1).
The whole screen is then copied onto another texture.
An overlay quad gets the copied texture. The overlayed quad is positioned so it's slightly larger than the original screen and partially transparent.
Next frame repeats the process and you have a feedback loop.

You can move the overlay quad around to see the effect of offsetting its position. Hold down Q and move the mouse around slowly to go up,down,left,right and W + mouse to go forwards and back.


taumel(Posted 2010) [#27]
Thanks, hmm i have to think about it, i guess i understand code better than explanations but it sounds like my assumption wasn't this correct. ;O) It definately looks interesting, hot, flickering and alive like a sun. It just lacks a bit more depth. Nice colours in the editor as well and i guess it took you quite some time setting up all the examples and their parameters.


tesuji(Posted 2010) [#28]
Maybe a better explanation than mine and some sample code here http://www.iquilezles.org/www/articles/feedbackfx/feedbackfx.htm

Iņigo Quilez has got some other interesting stuff here : http://www.iquilezles.org/www/index.htm


taumel(Posted 2010) [#29]
Ah okay, now i understand what you meant with feedback, thanks.


taumel(Posted 2010) [#30]
It still has a few issues, a.o. due to bugs in Unity, but nevertheless a still of my try at it.