GL line fun...

Community Forums/Showcase/GL line fun...

Taron(Posted 2010) [#1]
Ah screw it, I wasn't sure, if I should post this, but it's too much fun and kinda pretty. It's a GL line/particle test I just wrote after seeing _Skully's beautiful goodnight treat for the kids.

If you compile this with BLide's publishing compression it comes to 93kb.

Instructions are in the AppTitle...



MGE(Posted 2010) [#2]
Gorgeous. wow..


DavidDC(Posted 2010) [#3]
Of course you should have posted it! It's great!


Taron(Posted 2010) [#4]
THANKS! It's somehow fascinating and reminds me of how much my father would've loved to see all this. Ah well...

I still have to test how fast it would run with normal max2d commands.

Thanks again!

Small update...(not the cleverest, but kinda fun. Switch between lines and quads as well as left/right for offset multiplications)



_Skully(Posted 2010) [#5]
Very pretty...looks like a plasma fire when you get enough going :)


beanage(Posted 2010) [#6]
Cant think of another person doing something as cool as simple as this, thanks, awesome as always!


Taron(Posted 2010) [#7]
If I'd only finish something bigger, haha!
THANK YOU! :}

It's actually one heck of a sandbox, too. I've added a few more things and get even wilder results. Loads of fun...


Taron(Posted 2010) [#8]
More pretty patterns... playing around with the alpha of the vertecies is quite a blast. Very fascinating patterns...



Nate the Great(Posted 2010) [#9]
wow nice... I wish I was this good at cool effects and GL


_Skully(Posted 2010) [#10]
Can we create polygons with this direct OpenGL technique? or a mesh even... I'd like to capture the backbuffer texture, map that onto a mesh and manipulate the vertices


ImaginaryHuman(Posted 2010) [#11]
Neat :-)


DavidDC(Posted 2010) [#12]
I'd like to capture the backbuffer texture, map that onto a mesh and manipulate the vertices

Yes me too - my one track mind wanted to see how it looked as a kaleidoscope. You know, render as a texture onto a circle of tri's with their texture coords flipped appropriately.


Taron(Posted 2010) [#13]
but of course you can! Go right ahead! :}
If you do a framebuffer solution, PLEASE, post it here, too!

Look at the code and you'll see that it simply creates either QUADS or LINES, but it's straight up GL.

...Oh, AND THANKS! :}


Taron(Posted 2010) [#14]
There you go...just took a primitive approach with a pixel buffer, but it does it, too, I think. I still want to learn about the FBO solution, but I appear to be too stupid so far. Considering that I know next to nothing about GL, my crawling forward leads to some results already...

(not very fast, but hey)
HIT "Z" to toogle through mirror modes...



DavidDC(Posted 2010) [#15]
Hey thanks Taron! Sorry I didn't reply earlier. Have been upgrading my PC.

I don't know much GL either but I had a quick play/hack (below). It looks a little dark compared to the "pretty patterns" version above. Not sure what's wrong...

Maybe this kind of effect doesn't suit kaleidoscopes too much (although I did stumble on a few quite nice drawings). Fluids and plasma are prob more suited - although your fireworks might look interesting :-)




Taron(Posted 2010) [#16]
OH NO, tHAT's FANTASTIC, DAVID!
Just go pageup to increase the brightness and it's one heck of a looker! SWEET!

I'll check out what you've done there in a moment for sure! Uh, how I hope this thread will keep going!

THANKS, and I'm honestly thrilled!

KaleidoscopeII(60/mirror, h, w/2,h/2,0)



DavidDC(Posted 2010) [#17]
Well what do you know... Looks better when you can see it! :-)


_JIM(Posted 2010) [#18]
This is very inspirational. Keep this thread going :)

Wonder if some shaders on top of this would improve the "wow" factor.


Taron(Posted 2010) [#19]
Considering that the my old laptop gets the "woha" factor as soon as the word "Texture" appears... :D

Yup, this could become something completely wicked. I even thought about some deferred solution, which could make this a real trip. But, YEHAH, go right ahead, I'm already all giddy to see what you guys would do to this!!!

And, as a small reminder, anyone who'd like to make use of a FRAME BUFFER OBJECT solution, I'm swinging on my toes to see that! :}


_JIM(Posted 2010) [#20]
I just wish I had more time to mess around with this. Right now most of my "time assigned to coding" goes right into my project and I can't delay it, because the other guys'll kill me heh.

Well, you were playing with shaders in that worm test. How did you do that if not on your amazingly old laptop? :)


Taron(Posted 2010) [#21]
On my 8core mac pro under winXP64 with NVidia 7300. ;)

Ah rats...tell the boys, that you're just doing some mental jogging to stay in shape! :}

Here's a little nicer version. You can control the "motionblur" now, too. Additional mirror/kaleidoscope modes. Additional quad (fan) modes.



DavidDC(Posted 2010) [#22]
Holy smokes! (instant reaction).... Looking closer with great interest :-)


Boiled Sweets(Posted 2010) [#23]
Is this code public domain?


DavidDC(Posted 2010) [#24]
OK so I've basically been spending the last hour gazing in wonder. Both at the output AND the code! Maybe it's because I'm a kaleidoscope nut, but I really find this exciting.

Yet I'm feeling embarrassed that I can't work out how that extra kaleidoscopic complexity has wormed its way in there? That's exactly what I was originally trying to do with the original "KaleidoscopeII" fn, but scrapped it because there were holes in the output. Yet you seem to have done just that. But where?

You have this wonderful ability to produce amazing effects from such a minimal code base. I really admire that. But in this case you've gone too far - the extra complexity seems to have been conjured from nothing! That's not playing fair :-)

Now if those spinners drifted slowly around the screen - maybe along smooth random spline paths... (hehe)


Taron(Posted 2010) [#25]
LOL, hahaha! Thanks, David!
To your kaleidoscope, which I consider just as ingenius and simple, I've added the mirroring solution I've written earlier only as test for the buffers. A whole lot more can be created out of both solutions to really create some unusual visuals.

Boiled Sweets, well, I post such things here to create a platform for all of us to exchange ideas and grow. As long as you're not planning to commercialize this tool as one of your screensavers or claim for it to be yours, but you want to learn from it to write your own, that's exactly what it's for. Other than that the rights remain with all contributers. I think I'd personally explode, if I saw our little toy here as a product somewhere! So, be good and join the fun, but contain other aspirations with it...please. Fair question, though. I think ultimatively just because it's here, it's kinda pd by default, not sure.

Thanks for asking, though! <even if it feels a lil' icky>


_Skully(Posted 2010) [#26]
though. I think ultimatively just because it's here, it's kinda pd by default, not sure.


Not really... the Code Archives specifically states that code posted there is PD... technically speaking, just because you post code here doesn't mean its PD... I suppose one could always say "I thought it was" but you have caveated its use... which is essentially like a license.

just IMHO.. no legal presedence here.


Taron(Posted 2010) [#27]
I just wished non of that would ever have to be a topic. Call me naive, but all the corruption scratches our power to evolve wholeheartedly. I enjoy far too much to share my findings and hope to find us all linking our minds to learn from each other and enable us to produce the best we can produce. If someone bounces in to take advantage of it with the result of discouraging such a common disclosure of discoveries, it's more than just a shame. The least I'd expect is real participation and some action that boosts our readiness to share with and trust each other. It's all too easy for all of us to crawl back into our own machine and just develop by ourselves, some hoping for some profits, others just trying to endulge.

One day, if we manage to as a species, we will remember the oldest of all understandings and that is that we have managed to survive and thrive, because we had the ability to work together! It became our nature to do so. Millenia of deceitful propaganda and idealisations of superiority devorced us from the jaded roots that once made us strong.

I offer you my mind, because I can feel this power and hope that you recognize the same, be it consciously or due to the resulting sense of joy. And I'm telling you, it's almost too much joy for me when we bounce this innocent little code back and forth between us!

And thanks, Skully, I kinda thought the same.


dmaz(Posted 2010) [#28]
I'm no expert and don't claim legally binding knowledge...

you hold all copyright to your "specific" code, basically the code as a whole unless posted in the code archives as _Skully said. the issues with that though are; -you- have to prove infringement and posting in a forum like this will make "fair use" an easy defense. not to mention that if you really wanted to keep the code close you could have either prefaced it with copyright or limited license or even just posted an executable.... any specific algorithms above are not copyrightable(though maybe patentable :( ) so anybody can glean that information they need for free.... but that's exactly what it sounds like you and most of us want, which I applaud! ideas are not protect-able by copyright but the work put into it is.


Boiled Sweets(Posted 2010) [#29]
Perhaps I should have made it clear that it would be a FREEWARE screen saver and would acknowledge IN LARGE PRINT that the code was written by you and/or the Blitz community.

No worries, just an idle thought.


Taron(Posted 2010) [#30]
What you should do is add what's minimally necessary to actually turn this into a screensaver and post the updated code! That would be the spirit.
You could offer your website as release channel, knowing that it wouldn't be limited to it, while it very well could become the spot for more releases of that kind. I think that would be fantastic! And I think you'd have a beautiful idle thought there! :}

Again, I wished that copyrights and patents would all become redundant troubles of the past right along with money, actually, haha. Rise above indoctrinations and embrace the full and increasing capacity of human ingenuity!
<I'm gonna go offer my freshly roasted coffeebeans now, see if I can get some batteries!> :P

But, really, if we were putting our heads together, I can imagine that we'd come up with a system that would free us from monetary ties, realising that our basic needs can be covered elegantly and beautifully by ingenuity in different fields (architecture and agriculture to name the first). When you truely enjoy something, you move outside of the realm of egocentricity and status ambitions. When you create something, research and discover something, you are in a sincere zone outside of civilization's rules and doctrins. Relating to this garanties you that you are in the right field. Opportunism is for banksters, agents and industrials, who'd all be screwed, if we'd know better.

So, well, let's start or rather continue here and see how these babysteps get us to join our minds more and enable us to do better.

One more little thing, though, I've learned from most of you all that enabled me to write bmax code in the first place and more than once I took complete sections of code to get things rolling. But it's been key for me to understand what's going on in order to apply my ideas and get to where I want to take things. I'm still learning and feel like I know next to nothing. My advice, however, never take code and rest on the result, but understand what's going on, heck, ruin it or improve it, but make it your understanding. You, genius brother, have a brilliance that can only come from you and it would be wasted, if not applied!