nardove

Icon

ricardo sanchez | interactive designer & code enthusiast

First steps in C++

Since March 2010 I decided to get serious about learning C++, coming from a Flash Designer background learning this stuff has prove to be not the easiest, basically to do what I want I have to learn not only C++, but OpenGL, GLSL, memory management and the list goes on and on. But thankfully there are two very good frameworks for C++ creative coding, OpenFrameworks and Cinder, making the learning curve a bit more manageable.

After a few months of playing around with OF I manage to get the following demos.

Read the rest of this entry »

SOBEL INVADERS

Very cheesy title, indeed. Inspired from this web site http://letitbloom.com/#ralph, the following sketch is about using an image gradient to control particles motion. Now that I know how it works, I find it easy, but when I first saw it my jaw hit the floor, so I try asking the author how it works, and very kindly he replies the following:

The process is as following.
1->Generate Perlin in black and white
2->Generate text, place in center (here this was all pregenerated so I could use the flower etc).
3->Imagine the whiteness to be a height value. Darker == lower, ligher == higher.
4->Convert the bitmap into a slope / normal map. Follow this process :
4.1.Convolution with a 3×3 kernel, y-1 and y+1 as 1,div by 2 bias 127, copy to red channel
4.2.Convolution with a 3×3 kernel x-1 and x+1 as 1, div by 2, bias 127, copy to blue channel
Now red and blue are converted into slope values for every pixel. Use this slope value to accelerate or decelerate your particles.
Use a linked list with small datatypes for your particles. Read out from the slope map to move them, add some elastics…et voila.

I have read that email about 10 times to get it, and bomb some forums asking how it works.

Basically you need to convolve at pixel location using two 3×3 kernels (by the name Sobel Operator), so convolving 2 times, one for X values and a second time for Y values, give you a 2D vector that represents the direction and magnitude of the gradient at that specific location, then all you need to do is use that vector as acceleration value for the particles.

View sketch

Read the rest of this entry »

SWIMMING JELLIES

3D jellyfish swimming simulation build with Processing and Toxi library.  This personal project had a long run, it started back in late-2009 when I was looking for a 3D sketch to work on so I can learn some 3D basics. From there I found my first 3D problem to solve, how do I draw a hemisphere? Few months later and I manage to finish a pretty good looking jellyfish, working together with Cedric Kiefer. It end up being a nicely detail digital organism, you can read about it here.

Since the initial idea I wanted to simulate their motion, I always found them fascinating to look at. So I took what I learn from the jellyfish and change a couple of things, the major change was the adoption of the toxi library, it has a very good set of math and physic elements that work together seamlessly, which help me to over come most if no all of the 3D motion, calculations and formulas I needed to achieve the main goal.

I had a jellyfish already, so the next step was to make them navigate in the 3D space, for that I went back to the steering behaviors code from the koi fish pond, and add the extra dimension “Z”. Adding the Z was easy but once that was in place I encounter another bigger(at least for me) problem, 3D orientation and rotation. I spend lots of time in the forums and books, and I did ask lots of question, I think I upset some people in the process, but they all help and the orientation got implemented.

Hope you like it.

View sketch

Read the rest of this entry »

JIMRXN COVER COMPETITION

A friend jimrxn started a competition to design a cover for his release early next month, I submit 2 different designs hand draw and digital. The last time I draw something was ages ago, looking at this I think I will scan what I can find and archive it.

Here they are, fingers cross!!!

 

Hand draw

Start it doing some sketches, I thought to scan them and retouch them in Photoshop, but anything I did inspired me to take them to Photoshop, today Jim send me the latest scan (that he retouch) and I decided to leave it as it is. I will take this and draw the ink and add the shadows and that cartoony look.

Read the rest of this entry »

JELLYFISH

Here is my first 3D programming attempt. Not sure what motivates me to do a jellyfish, but its been a very good learning project, I learn a lot of 3D texture mapping, some basic OpenGL concepts, basic lights and blend modes, organic motion simulation, and general programming stuff.

The folloing is a series of images to show the different stages of the learning curve and the progress made.

 

First umbrella geometry.

Read the rest of this entry »

KOI FISH POND

This is one of my latest Processing personal projects, inspired by the Oasis installation by everyware.kr, the source code is a modification of different logics & algorithms by Daniel Shiffman, Fligth404, and Levitated.

Following some images to illustrate a bit of the work progress from start to finish.

I think the first time I saw Daniel Shiffman Additive Wave sketch, I though: I can take that and make a fish swimming.

Read the rest of this entry »

GLOWING ORBS

My very first work with Processing, I started about 2 years ago.

I knew about Processing since the iTunes got the Magnetosphere Visualizer, the creator from Flight404 kindly put some tutorials on his blog, and that was enough for me to give it a try.

So I did, I started by using the noise method for the motion, and after that I use the very famous Additive Blending tutorial, its been great, inspiring and very easy to put it all together and for that I say Thanks to Robert Hodgin.

View

Read the rest of this entry »

Pages

RSSTwitter: nardove