Showing posts with label povray. Show all posts
Showing posts with label povray. Show all posts

Sunday, March 11, 2012

Wherefore art?

I always wished I could draw beautiful artwork with brushes and colors, but I wound up being a software engineer instead. That doesn't stop the urges though... between the lines of code, the artist in me continues to kick paint buckets and spill creative ideas all over my mind.

So occasionally the artist in me succumbs to the muse and I try to draw things. But sometimes the software engineer in me sighs and takes over, and thinks there might be a way to write a computer program to automatically create better artwork instead. As you can imagine, the right-brained artist and the left-brained engineer tend to scoff at each other over folded arms, and I usually wind up getting nothing done.

But the other day, the two of them got together while I wasn't paying attention, and they started working together on a secret project called "esnw". They pooled their ideas from all four corners of the globe. The artist described large groupings of abstract patterns and colors that might be interesting if combined. The software engineer captured and organized the patterns and colors, and devised a way to choose a different set of patterns and colors, based on a "roll of the dice."

The software engineer, when he finished the prototype, announced, "Pick a number, any number, and the software will use that number to generate a (usually) interesting abstract set of patterns!" The artist, still feeling rather skeptical, suggested the number 360. The engineer typed 360, and the computer immediately displayed this:


The artist was tickled by the circular irony, bold colors and juxtaposition of regular and irregular shapes. The smirk of the software engineer goaded the artist on... Artist: "how about 825?"


The artist was intrigued. "OK hot-shot, I like that combination of patterns, but I don't really like chartreuse in the foreground... I really like those geometric shapes better."

The software engineer didn't miss a beat, "Ah, so you want to know what that picture would look like on the other side of the looking glass? I'll just type in 'negative 825' then, shall I, and see what it looks like from the back?"


The artist was thinking big now.
Artist: "That's great... now, can you make that a 4x3 foot giant poster?"
Engineer: "Why sure, these can be created at any size."
Artist: "654321!"
Engineer: "654321, what? No, not that size... Oh, you mean create a new one? OK, here you go."


The artist was smug. "Well, that looks rather boring for such a large number."

The software engineer shrugged. "Beauty is in the eye of the beholder... I think that looks rather interesting, myself. I think I'll make that my desktop image."

***

After a week of work, the beginnings of a rather fun art-generator has begun. Currently it only goes up to a million (and down to negative-one-million on the back side,) but that is a lot of different images. And that is just one "world". I have at least 12 additional 3-dimensional worlds coming soon, each with a million possibilities... for example:


If you find this interesting and want to e-mail me a number, I will e-mail you back your very own piece of "esnw-abstract art" directly based on it. And stay tuned, other worlds are on their way!

Oh, the software engineer wants a last word: This is all written in the "POV-Ray" raytracing scene language, and one feature I am building in is the ability to not only write the image, but also to write the related POV-Ray scene text file (a language that can write itself) too, so that you could fine-tune colors and textures once you find a scene you like.

Thursday, January 28, 2010

A new video is "Glacially Inevitable"

Spoiler Alert! The following little article describes many details that may spoil or give away surprises in the following new music video, so if you have not yet seen it, I suggest you watch it first, then read the rest of this article :-) Also, YouTube by default displays these movies in a lower-quality mode, where the music is grainy and the video is small. In order to see this video with better quality audio and video, you can go to the actual movie page by clicking here, and then immediately choose the bigger/better quality version before it starts playing (choose the larger number "480p" in the little pop-up menu at the bottom of the movie player, as well as the two little right-angle arrows to enlarge the display.) For the rest of us impatient-types, the lower-quality version can be instantly watched right here instead.



Back in April 2007 I wrote a slow ambient piece of music by computer-generating a nice chord progression, then slowing it way way down. My thought was to make the music so achingly slow that the listener would begin anticipating the next chord change, but eventually be forced to relax and let the music move at its own glacial pace, and possibly start to enjoy all the sounds "between the notes."

I also wanted to choose synthesizer voices that gave a cold crystalline ring to the music, especially since slow frosty bells are one of the trademark sounds of my "ic42" compositions.

And given my penchant for puns, since the piece was written in C sharp, and it was icy cold and slow, I chose the title "Icy Sharp - Glacially Inevitable." The original 2007-era piece can be heard here.

Now almost three years later, spurred on by a "2010 Reunion Challenge" at Macjams, my main music composition website/hangout, I decided to enhance and extend this piece, reworking the voices, and making a video to accompany it. Unfortunately, being in Southern California meant that I could not video-tape nearby glaciers or ice caves. So I decided to take a more abstract approach... I would build my own computer-generated ice palace instead, using my favorite computer graphics software, POV-Ray.

Since I'm an old-school software engineer by trade, I tend to visualize these 3D worlds in text coordinates. I just never got into those new-fangled fancy 3D modeler visualization tools. That means that when I want a glass oval kind of shape like this:
raytrace povray refraction droplet
I create it by typing in some text commands that look like this:

#declare CrystalShape = sphere
{
<0,0,0>, 1 // 1-unit diameter at origin
interior {ior 1.3} // refractive
scale <1, 1, 0.7> // squish slightly on z axis
rotate -y*360*CLOCK/2 // twist slowly on y axis
}

... and to make a bunch of them rise and twist into a tower, I delicately stack them in nested "while loops" of text commands:

#if (GOING_UP != 0)
#declare LIFT_CLOCK = SegmentRampSin(0.45,0.9, CLOCK); // up: 0 to 1
#else
#declare LIFT_CLOCK = 1-SegmentRampSin(0.1,0.4, CLOCK); // down: 1 to 0
#end

#local pTotalItems = 25; // # of crystals around the perimeter
#local pStartRadius = 10;
#local pTotalHeight = 15;
#local pTwistPerLevel = 0+LIFT_CLOCK*8; // degrees

#local currHeight = 0;
#while (currHeight < pTotalHeight) // 1-outer loop
#local heightTwist = pTwistPerLevel*currHeight;
union // of a loop of crystals
{
#local currItem = 0;
#while (currItem < pTotalItems) // 2-inner loop
#local currAngle = currItem/pTotalItems*360 + heightTwist;
object
{
CrystalShape
texture {CrystalTex}
scale 1/(currHeight/3+1)
translate
rotate -currAngle*y
}
#local currItem = currItem +1;
#end // while 2-inner
} // union
#local pStartRadius = pStartRadius*4/5;

#local currHeight = currHeight +1;
#end // while 1-outer

Do you see it yet? At this point, a few of you are nodding in nerdy excitement, and the rest are just nodding off. Hang in there! Just a little more math, then back to interesting stuff, including my discovery of how to do those movie credits at the end.

So, in order to animate this, I had to create 1,200 unique images to build a single scene, and there were 6 scenes in the whole movie. And because of the complexity of each image (with many refracting crystals, soft shadows, and anti-aliasing on), it was taking about 10 minutes for my computer to create just one image. So just a moment (invokes the calculator)... 1,200 images multiplied by 6 scenes, multiplied by 10 minutes each... meant that it would take about 1,200 hours, or 50 days to generate all the images for this movie! I didn't have that much time, so of course, I cheated. I have a 4-core computer, so I made 4 copies of my rendering program, and ran the 4 programs at the same time, each copy creating a different range of scenes. Now it would only take about 13 days to render all the images. One of the drawbacks of this approach was that made it extremely difficult for me to even check e-mail on my computer since it was running full-blast for 2 weeks. On the positive side, the dragon's den (my computer room) was nice and toasty-warm during that time.

As I began to see the movie take shape, I started thinking about the original name of the music. This ice palace I had created was indeed icy, but it was all rounded and had no sharp edges. So to reduce confusion, I renamed the music video simply "Glacially Inevitable", hoping nobody would notice the text-tonic shift away from the originally dominant music title "Icy Sharp."

The first draft of the movie only had 5 scenes in it, not 6. Luckily I have a captive test audience who is amazingly creative and offers me invaluable critiques and advice. My wife watched an early draft of the movie and said it... "is unresolved, it feels like it is missing something. Can you add another scene, and maybe have the crystal tower melt back down into liquid at the end?"

Ooh, great idea! Oh, but wait a minute... I had built the tower so it could lift up, but not so that it could melt back down... that would take some surgical re-programming, and another 1200 images to create for this new 6th scene. But she was right, it was exactly what the movie needed, and I still had some time left to finish this up before the due-date of February 1, 2010. So I re-worked the graphics and added the water pooling out (and the ripples slowly subsiding, if you watch closely) and started up the rendering of the last scene. While waiting for it to finish, I started assembling the movie scenes in Final Cut and began working on the credits at the end of the movie. Did you know that Final Cut will accept a PDF file and display it like an image? I didn't, until I tried dragging one into the Final Cut project. This discovery meant that I could now make fancier looking credits in a regular old word processor, with multiple fonts, and even embedded images, and have that become the scrolling credits! One more little trick in my movie-making toolbox now... and I promise to use this power for good (I have seen some rather garish and nauseating credits lately.)

Here is the finished product, all sparkly and presented (in all its facets of meaning) for your enjoyment and your thoughts. As always, I look forward to any feelings/interpretations/critiques of my music and video. Drop me a comment or an e-mail, I would love to hear from you.

ttfn,
Eduard, aka "ic42"

Monday, September 22, 2008

New Spacey Music Video for fun

The talented Macjammer Reinholt56 wrote an intriguing ambient piece of music here called "Cosmic Symphony", and when I heard it, various abstract colorful images started floating in my head... so I asked him if it would be OK for me to capture these images as a music video, and he graciously agreed. After a couple of days of designing and laying out the coordinates, I started my computer on the task of creating over 4,000 images (at 640x480) for the movie. 4 days of continuous image-rendering later (with all 4 CPUs cranked at 99%), the movie is ready for viewing here. I hope you like it. I have also made the high-quality 640x480 QuickTime movie available for direct-download too, it is crystal clear and there are details in it that you cannot see in the Google/YouTube videos below. Here is the high-quality version of the movie: 'control-click' or 'right-click' here to download this as a (QuickTime movie) file, and play locally on your computer. Note that it is 284 MB, which will take quite some time to download. But if you are interested in a crisp movie, this is the one to get.

If you wish to leave a comment on the video itself, click here. Or comment here in the blog... I would be very interested in your thoughts on the music video, positive and negative!

ttfn,
Drakonis


(Google's video seems a bit clearer)


(YouTube's video is a little blurry)

Saturday, October 13, 2007

On to the next video... Fractal Serenity

My next video project is "Fractal Serenity"... although I started working on it long before the "Dance of the Technoids" video. It is a much more involved and detailed video, with a bit more of a storyline, although the meanings are twisty and mysteriously shrouded in layers of mist. It started as a dream of a vivid but strange set of landscapes, and a feeling of curiosity and fear.

I have finished the story line, and the pencil sketches for each of the scenes. Lately I have been rendering the sketches as 3D landscapes in POV-Ray (3D computer software), to capture the mystery and intrigue I felt when I visited this place before. I have about 1/2 of these video scenes finished. In the mean time, I have selected a few of the scenes from the video (some are close to complete, some are still early shots with stuff missing), and put together a short trailer, so you can get a glimpse of what's coming. Of course the final product will be crystal-clear DVD quality video and music.

The music you hear was originally computer-generated, then I heavily reworked it into what you hear in the trailer.

The final DVD will likely have a behind-the-scenes extra, where I talk about how I made the music and 3D scenes, show some of the early sketches, and play the original computer-generated seed music, to show how much it has evolved.

Here is the trailer, for your viewing pleasure!


-Link Here-

Sunday, April 1, 2007

Swooshing into blog-space

The time has come, the dragon said, to blog...

So, rummaging around for some mouthwatering eye and ear candy, I have chosen to start my first-ever blog with my first-ever music video. Enjoy! It's description is below.


-Link Here-
Bouncy Electropop music with aliens dancing around large lava lamps (suggesting that music is literally "universal".) Reaching into my 1980's musical subconscious, I wrote a catchy "Depeche Mode"-like techno-flamenco tune, and then created a mosh pit of Technoids dancing to the music in a hyper-realistic dance hall called "The Candy Bar". Music written note by note in Harmony Assistant and finished/EQed in GarageBand. Live acoustic Spanish guitar performed by Ian Beardsley. Video rendered with POV-Ray Mac, and assembled in iMovie. For the technically curious, there are over 1,200 lines of POV-Ray code (all written by hand in the text language, no modelers were harmed...) to create this. The 2.5 minute movie (in final anti-aliased form) took about 14 continuous hours to render all the frames on an old dual 1 Ghz G4 Mac. Free MP3s of this music and others of mine are available at SchwanSongs, or Macjams. This is my first foray into music videos, I'd love to hear your thoughts (pro and con) about the music and video. A high-quality DVD (with a 10+ minute behind-the-scenes "making-of" video, and a trailer for another music video of mine) will be available soon for purchase. I have a much larger, rather different, 3D music video project in progress now.