Posts In: Algorithmic Art

Scattering II

The last one was after a half-day (morning) of work, now here's after a full day.  Better scattering, better surface, and a bad attempt at clouds (they'll get better).  Definitely the best so far! 🙂

 

Real-time Procedural Planet with Atmospheric Scattering

Scattering

I swore that I wouldn't go to bed until I made a good-looking planet in ShaderToy.  No complexity, no frills, no BS...just finding out what makes a planet look good.  LT planets look pretty bad IMO.

Thankfully, I was successful.  Not to say that this is the best-looking planet ever, or anything, but it's a definite improvement over my previous works.  AND, I finally implemented "the real deal" atmospheric scattering, instead of the cheap hacks I've been using up to this point.  It took many hours of staring at O'Neil's GPU gems article.  In the end, I was able to simplify his implementation to about 13 lines and achieve good results.  It's nice to finally have this technique under my belt 🙂

Real-time Planet with Atmospheric Scattering

 

Not sure yet if this level of quality will be achievable in-game yet...but given that it's running at 60FPS in just a pixel shader, I would say it will probably be fine 🙂

Beauty in Simplicity II

Pretty happy with how this came out. Do not congratulate me, I am not the one who created a universe in which 29 lines of simple code can create such beauty. It is not my work.

"Simplicity"

 

Click to view it evolving in real time.  Click here for full-size still.

Beauty in Simplicity

It's difficult to grasp the fact that elegant simplicity can produce infinitely complex beauty. But this is a fact of our universe...incredible.

A one-line equation is at the heart of this beauty.

 

It is easy to lose oneself in such things.

(PS - My last visit to fractals looked like this. It is comforting to know that I am making progress.)

Procedural Sound Synthesis

It had to happen sooner or later...audio synthesis (not composition, but actual synthesis) is one of the only realms of procedural generation that I have yet to touch...well, at least, that was true yesterday. But not anymore! 😀

Yesterday I finally indulged myself in trying out audio synthesis. I read a few basic materials on the subject, but, much to my surprise, audio synthesis is incredibly simple! It seems like the audio people really enjoy making up their own fancy terminology for everything, but, honestly, it's dead simple: audio synthesis is the study of scalar functions of one variable. Period. That's literally all there is to it: a sound wave is f(t), nothing more, nothing less. Wow! That's great, because I'm already pretty darn familiar with Mr. f(t) from my work in other fields of procedural generation. Is it coincidence that it always comes back to pure math? I think not 😉

Here are a few sound effects that represent my first-ever endeavors into audio synthesis. I know, they're terrible, but they were made from scratch by someone who has only known how to synthesize audio for less than 24 hours, so maybe that makes them a little better. In the fancy audio terms, I guess you could say that I used "additive synthesis," combined with "subtractive synthesis," and even a little "frequency modulation" on top of that. But really, all I did was write some math. Sums of sines ("additive synthesis")...multiplications of those sums ("subtractive synthesis")...domain distortions ("frequency modulation"). All the usual procedural tricks. Heck, I even did the equivalent of fractal noise! Turns out it works just as well in audio. Those magical fractals 🙂

Well, here they are. Someday they'll get better, but certainly not in time to have procedural sound effects for LT1. Oh well. Maybe next time.

Procedural Sound 1
Procedural Sound 2
Procedural Sound 3
Procedural Sound 4
Procedural Sound 5

Sometimes...

February 12, 2013 Algorithmic Art 5 Comments

...the computer can still surprise me, even after all this time.  And the surprises keep getting better.  Tonight I stumbled on a really lovely system, had to take a while to just roam around and bask in the stars 🙂

 

A Nice Star System

 

*whispers to computer* thank you, that was really nice, but I hope someday you will surprise me with a whole universe...? 🙂

Procedural Nebulae III

January 14, 2013 Algorithmic Art 3 Comments

What an exciting night. If you search the tag "procedural nebulae" on this blog, you'll find no shortage of posts. Indeed, I've been fascinated with nebulae for as long as I've been a graphics programmer, and have been trying to crack them procedurally for as long as I've known about procedural generation. My attempts have always been spirited, but lackluster. For Limit Theory, I once again revisited the topic, starting from scratch and trying to come up with some new ways to attack the problem. The solution was fairly good, and certainly my best so far (well, not counting the path-traced nebula, which was cheating). But, as you can see from the screenshots, they really don't look that much like nebulae. I've been quite "content" with this solution...at least, content enough to ship the game with it. But not truly satisfied.

Tonight, I am truly satisfied. I allotted a few hours for revisiting the nebula code, just to see if I could push the quality a little further. With a few new creative ideas and a wee bit heavier math (but not much), I've succeeded. They aren't perfect, and, of course, they're still obviously not real. But they are far more real than any of my previous work, and I would be more than happy if this was the algorithm that shipped with the game.

The nice thing is that I've only just started to explore the possibilities of this new approach, so I'm sure I'll be able to push it even a bit further than this with a few more hours of tweaking! 🙂

Procedural Space Stations II

A little bit over a year ago, I spent an hour or so whipping up a really silly/stupid algorithm for building radial space stations. Over the past few days, I've been cooking up some more advanced geometric technology to use in my second attempt. Today, I started building a new algorithm for procedural space stations. I'm very pleased to say that my results in one day are a whole lot better than they were last year!! Good to know I'm making progress 🙂

Right now, the procedural building blocks that the algorithm is using are extremely simple, just beveled boxes and a radial wheel-like thing (borrowing from my first algorithm). But this repertoire can obviously be greatly expanded, and the algorithm is able to automatically analyze the pieces and figure out how to build a structure out of them! It's pretty cool stuff...I must say, this new algorithm is simple but elegant, just the way I like them 🙂

Here's an example schematic:

And here's me exploring it in-game:

Again, notice how structurally simple everything is. There's definitely nothing fancy going on here yet, but you can already see some nice visuals emerging...it feels quite cool to be able to duck in and out of those spokes and fly around this superstructure! I can't wait to see how good this algorithm can get. I'm actually way more excited about these results than the ship results! Although, in the end, I think the algorithms can be unified...because a ship and a space station aren't really that different, are they?

Erosion

March 10, 2012 Algorithmic Art 0 Comments

I've been playing around with post-processing functions (so to speak) on the terrain heightfields. When I designed the current terrain engine, I did so in such a way that terrain chunks have some amount of overlap, with the idea being that a "small amount" of post-processing can be done on the heightfield while avoiding seams. Of course, the only way to do this for anything that requires information about surrounding heights is to compute some redundant information (i.e., to overlap tiles a bit) and discard it.

Inspired by http://www.decarpentier.nl/scape-procedural-extensions, I started playing with using finite differences to modulate the heightfield according to its normal vector. The results are very compelling, although I'm not getting as nice of results as Giliam yet, presumably because he's using an analytic derivative and distorting the input to the noise function, whereas I'm using a finite difference and just distorting texture coordinates.

Certainly looks promising.

Binary Sunset

A tribute to the greatest movie ever 🙂

The colors get quite interesting when you start adding more suns!