V

Avatar



hmm.3

I have done a couple of jobs using ribbons but never got to make something i’ve always found pleasing to me eyes. I’ve seen over the web some guys creating interesting applications for this kind of generative “art”, its pretty used these days and it should, and just like i said a while ago, its beautiful; its very beautiful; things grow. I love to see things grow, and what kind of things grow? how do they grow? i don’t know, but its in my todo-list to find out and use that to upgrade this piece. I want it to have variations, different growing rates, different species and mix it all together and bring something good looking, good enough for realtime and appealing. Hopefully i won’t get bored before i achieve all this. Anyway here’s something i just did. awkward part: i’ve taken a 3d effect and converted it to 2d. uhmm i wonder why?

( this is the updated version of the effect. new scene with more growing things )





Text render for java/processing using opengl

I found out a nice way to write text in Processing with java+opengl.  It easily renders 2d and 3d text. It should be also easy to draw billboard text in 3d space. Here is the source code and an example on how to use it in processing:


import java.text.*;
import com.sun.opengl.util.*;
import com.sun.opengl.util.j2d.*;

class VTextRenderer
{
VTextRenderer( String fontName, int size )
{
_fontName = fontName;
_fontSize = size;
_textRender = new TextRenderer( new Font(fontName, Font.TRUETYPE_FONT, size), true, true, null, true );
_textRender.setColor( 1.0f, 1.0, 1.0, 1.0 );
//_textRender.setUseVertexArrays( true );
}

VTextRenderer( String fontName, int size, boolean antialiased, boolean mipmap )
{
_fontName = fontName;
_fontSize = size;
_textRender = new TextRenderer( new Font(fontName, Font.TRUETYPE_FONT, size), antialiased, true, null, mipmap );
_textRender.setColor( 1.0f, 1.0, 1.0, 1.0 );
//_textRender.setUseVertexArrays( true );
}

void print( String str, int x, int y )
{
_textRender.beginRendering( width, height, true );
_textRender.draw( str, x, y );
_textRender.endRendering();
_textRender.flush();
}

void print( String str, float x, float y, float z )
{
print( str, x, y, z, 1.0f );
}

void print( String str, float x, float y, float z, float s )
{
_textRender.begin3DRendering();
_textRender.draw3D( str, x, y, z, s );
_textRender.end3DRendering();
_textRender.flush();
}

void setColor( float c )
{
setColor( c, c, c, 1 );
}

void setColor( float c, float a )
{
setColor( c, c, c, a );
}

void setColor( float r, float g, float b )
{
setColor( r, g, b, 1 );
}

void setColor( float r, float g, float b, float a )
{
_textRender.setColor( r, g, b, a );
}

void setSmoothing( boolean flag )
{
_textRender.setSmoothing( flag );
}

/// ____________________________________________________
/// Members
int _w, _h;

String _fontName;
int _fontSize;
TextRenderer _textRender;
Font font;
}


import processing.opengl.*;

int WIDTH = 800;
int HEIGHT = 600;
float aspectRatio = WIDTH/(float)HEIGHT;

VTextRenderer textRender;

///___________________________________________________________
void setup()
{
size( WIDTH, HEIGHT, OPENGL );
hint( ENABLE_OPENGL_4X_SMOOTH );
frameRate( 60 );

//  logger = new VLog( this, “log.txt” );

aspectRatio = width/(float)height;

//textRender = new VTextRenderer( “Arial”, 100 );
textRender = new VTextRenderer( “Arial”, 100, true, true );
}

///___________________________________________________________
void draw()
{
// Write in 2d
background( 0 );
textRender.print( “vitamin”, 0, 100 );

// Write in 3d
perspective( PI*0.25,  aspectRatio, 1, 1000 );
camera( 0, 0, 100, 0, 0, 0, 0, 1, 0 );
scale( 1, -1, 1 );  // oh well. processing likes the upside down way, i dont know why.
((PGraphicsOpenGL)g).beginGL();
textRender.print( “vitamin”, 0, 0, sin(millis()*0.001)*100, 1/10.0 );
((PGraphicsOpenGL)g).endGL();
}

///___________________________________________________________
void stop()
{
super.stop();
}





[We.are.in.Helsinki.3D]

WIN32 VERSION | MACOSX VERSION | LINUX VERSION | SOURCE CODE

2 days ago i found a website that had a rolling ball made with AS(flash), so i thought, why dont i try [We.are.in.Helsinki] as a 3D application, balls rolling around and all that? That would be fun, and it might get some attention to the art scene – it could or maybe not.. worth a try and there is nothing good on tv, maybe a 3rd dimension will help – i thought.  So  i spent some time working and here is a first working version of [WAIH,3D] (might contain obvious bugs and unattractive features but what tha hell):

WIN32 VERSION | MACOSX VERSION | LINUX VERSION | SOURCE CODE

waih_shot_314

[WAIH,3D]

New versions might come out. I have few ideas for this project, so i believe i will be digging more into it sooner or later. Some better physics comes to mind, some more visual effects, adding human body interaction, maybe multi touch integration. I just need to try out some ideas and see which ones get to see the daylight. Meanwhile rejoy with it, its fun to play and it has source code available for the more creative ones =)





[WaiH] v4.0


(video generated with no interaction at all)

http://www.pixelnerve.com/downloads/processing/waih_v4_win32.zip (windows)
http://www.pixelnerve.com/downloads/processing/waih_v4_macosx.zip
(mac)
http://www.pixelnerve.com/downloads/processing/waih_v4_linux.zip (linux)

fixed exporting problems (something about minim effects and fullscreen, still a mistery).

new features:

. handle all generators/samples and the activator by click and drag.
. set activation range as global or individually by a toggle button on the menu.
. change frequency/amplitude per generator.
. physics got a little better, not realistic but that wasn’t the point anyway.

it was fun to make. enjoy!





, Next