How is lightsynth formed?

My God...It's full of stars - Neon, Psychedelia, Colourspace, Trip-a-Tron and all flavours of VLM...
Post Reply
User avatar
fritx
Troll (2/10)
Posts: 912
Joined: Tue May 20, 2003 11:51 am 0
Location: Airstrip One
Contact:

How is lightsynth formed?

Post by fritx »

I love the fluid motion and pretty visuals of lightsynths. I think I'd like to code a simple one for myself so I've set about it.

I'm using GL so I thought an FBO would be the way to go.
I created a ping-pong arrangement with a couple of texture targets in the FBO.
I fed back the scene from the display texture onto a mesh and used the texture matrix to scale by a small amount.
ping = pong; repeat

It creates the effect I was expecting from drawing a white quad. It looks like this after a few frames have gone by:

Image

It has the blurriness that I wanted but now I'm unsure what to do to progress from this towards some of the pretty organic effects that Neon gets.
Do I make the feedback mesh have more quads in it and then muck about the texture coords in a more interesting way?
Are there things I can do in the shader other than messing with the tex coords?
What sort of source imagery works best?

Advice is appreciate, cheers.
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: How is lightsynth formed?

Post by gilesgoat »

I can only tell you that even Neon it's close to impossible to generate "cool looking effects" without at least a very minimal editor, I mean even if "you think your best" and you start "fiddling with numbers by hand" is really hard to find out someting "cool looking", you need to be able to fiddle with some params "in real time".

Then math tells you also that "if you want to create chaos, you need a non-linear component in the middle".

Meanwhile I am here swearing ( not at you ) .. it's all "swear city" around here today ..

(*&$(*$&(*#@ ..
Giles the billy goat
"Baa"
User avatar
fritx
Troll (2/10)
Posts: 912
Joined: Tue May 20, 2003 11:51 am 0
Location: Airstrip One
Contact:

Re: How is lightsynth formed?

Post by fritx »

I have those controls at the bottom of the window, I'll hook them up at some point to control various parameters as soon as I figure out what the parameters might be :)
Is the 'RTT feedback' idea a sound place to start off from?
User avatar
gumboot
Baaaaaaa!
Baaaaaaa!
Posts: 7652
Joined: Sun Aug 26, 2007 3:42 am 0
Location: trumpstain!

Re: How is lightsynth formed?

Post by gumboot »

Is this where I can vomit up all of the ideas I never had time to implement in the hopes of seeing somebody do the work for me?
fritx wrote:Do I make the feedback mesh have more quads in it and then muck about the texture coords in a more interesting way?
I'm from the old generation[*] and maybe you shouldn't listen to me, but I'd be highly disinclined to try to swizzle a coarse-grained mesh, because I'd expect ugly triangley artefacts (I had experimented with similarly-styled compression of sampling vector meshes briefly, and just found it to add uglies with the sorts of functions I was using). I would recommend keeping it flat and swizzling the coordinates in the fragment shader to keep it smooth.

fritx wrote:Are there things I can do in the shader other than messing with the tex coords?
Old-generation again, and I'm already starting with the stuff I never got around to, but because I'd started out in a paletted world (and, as is the tradition, I stole palettes from fractint) I was considering a migration to 3D where I would run three entirely separate loops in R, G, and B, (and maybe A), except that I would use one channel to permute another channel in some way, such as swizzling the X and Y deltas of the texture coordinates, or letting the colour bleed through slowly from one to another according to some other regional parameter. Then I intended to run a final pass that would perform the palette look-up of the final data... or maybe do four palette lookups including alpha, and alpha-blend the four layers over the top of each other. So there would have to be liberal use of alpha in your palettes.


[*] By "old generation" I mean the standard translate->blur->decay loop, with a paletted output.
User avatar
fritx
Troll (2/10)
Posts: 912
Joined: Tue May 20, 2003 11:51 am 0
Location: Airstrip One
Contact:

Re: How is lightsynth formed?

Post by fritx »

I'm from the old generation[*] and maybe you shouldn't listen to me, but I'd be highly disinclined to try to swizzle a coarse-grained mesh, because I'd expect ugly triangley artefacts (I had experimented with similarly-styled compression of sampling vector meshes briefly, and just found it to add uglies with the sorts of functions I was using). I would recommend keeping it flat and swizzling the coordinates in the fragment shader to keep it smooth.
I'm using a flat 'connected' mesh for the deform (by connected I mean each vertex shares a colour and tex coord attribute). I don't move the vertex positions at all, just the tex coords. I'm thinking this should help keep artefacts at bay. We shall see.
Old-generation again, and I'm already starting with the stuff I never got around to, but because I'd started out in a paletted world (and, as is the tradition, I stole palettes from fractint) I was considering a migration to 3D where I would run three entirely separate loops in R, G, and B, (and maybe A), except that I would use one channel to permute another channel in some way, such as swizzling the X and Y deltas of the texture coordinates, or letting the colour bleed through slowly from one to another according to some other regional parameter. Then I intended to run a final pass that would perform the palette look-up of the final data... or maybe do four palette lookups including alpha, and alpha-blend the four layers over the top of each other. So there would have to be liberal use of alpha in your palettes.
Interesting idea, cheers. Maybe this would be doable with some sort of colour matrix. Or maybe another texture as a source for the colour transform to get something nicely non-linear as Giles said.
I must admit to being a noob at shader programming and my maths is a bit toss as well so this is a bit of an adventure :)

Eh anyway, it's becoming obvious that I need to chuck out a lot of the oldskool VBO and GLSL stuff to make this more flexible so I'll get on with that now.

Cheers
User avatar
jph_wacheski
Baa!
Baa!
Posts: 42
Joined: Tue Aug 12, 2008 2:24 pm 0
Location: Oakville, Ontario, Canada
Contact:

Re: How is lightsynth formed?

Post by jph_wacheski »

I think you have a good approach,. creating a feedback loop will lead to some interesting visuals. Try just throwing up some random colourfull shapes and start tweeking the feedback level,. size offset of FBO (zoom/blur) and whatever else you can get at,. (I just hook them to the mouse and test,.)

I am currently working on one myself, and am having good results with these techniques,.

Image
Image
Image

I will post an .exe in a bit,. . much more interesting in interactive motion. I would also like to hear more about how the Llamasoft stuff is setup,. just some hints and ideas would be usefull. (I don't have a 360 so can not test the neon myself,. PS3 really needs a lightsynth..,)
http://iterationGAMES.com
remember when we used to play ?
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: How is lightsynth formed?

Post by Barney »

Back on the Amiga I wrote a light synth type program (Lightsystem was the name) - no sound-to-light, I just took advantage of the easily programmed palette rotations to make trippy images. The program ended up being able to make random palettes and choose effects to draw from a selection of random routines, which then got replaced by an interpreted "language" which the user could use to program their own effects. It was pretty awesome, in my opinion. Nothing like the kind of thing people like Jeff and Giles (and others in this thread) are making, but it was running smoothly on a 7mhz 68k CPU :) It even made good use of EHB mode!

The inspiration was an old DOS program called "Dazzle" (last incarnation of which was called "Razzle Dazzle", iirc) but not having any source I had to go to my local library and pull out maths and graphics algorithm books to get the routines I wanted. I remember the plasma-sine thing being the most fun to do.

This makes me want to do something in Direct3D now. I wonder what I can come up with...?
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
tesuji
Posts: 13
Joined: Sun Jan 16, 2005 7:13 pm 0
Location: Brighton,UK
Contact:

Re: How is lightsynth formed?

Post by tesuji »

I too have made some progress using simple feedback effects. Tweaking the feedback mesh properties, position and shape can give seemingly endless variations.

Here's my humble effort using blitzmax/minib3d/opengl :

http://spungifungi.wordpress.com/2010/0 ... er-device/

Image

Eep! 5 Years since my last post here. How lazy.
Post Reply