Loading...
Logo
Processing Forum

Background concert visuals

in General Discussion  •  Other  •  2 months ago  
Good Morning Y'all,

I'm in a band and we've looking to put some cool visuals behind us as we play. I've started a few attempts, based on generating random sized boxes and ellipses of different colors, but I don't like how it's turned out. I would love to get any suggestions.  If I were to really dream big, I would like to see a simple 3D road with randomly generated trees going by.

But if that's a little too ambitious  maybe something like this would be cool:

Ultimately, as long as it is constantly and randomly evolving (and easy enough for me to put together) I think it would work. I just plan on running it behind the band with a projector and a laptop.

Any suggestions will be greatly appreciated, sorry for the rambling, and thanks in advance...

Liegev.


Replies(2)

Starter code for anyone looking to help...

Copy code
  1. int time;
  2. ArrayList<Fly> flies = new ArrayList();

  3. void setup() {
  4.   size(600, 400, P3D);//screen.width,screen.height);
  5.   //smooth();
  6.   colorMode(HSB, 1000);
  7.   time = millis()+50;
  8. }

  9. void draw() {
  10.   background((millis()/100)%1000, 1000, 1000);
  11.   if( millis() > time ){
  12.     if( flies.size() < 100 ) flies.add( new Fly() );
  13.     time = millis() + 50;
  14.   }
  15.   for( int i=flies.size()-1;i>=0;i--){ if( flies.get(i).draw() ) flies.remove(i); }
  16.   
  17. }


  18. final int max_types = 2; // Total number of different things.
  19. class Fly {
  20.   int type;
  21.   color c, k;
  22.   PVector pos, vel, dim;
  23.   float rot;
  24.   Fly() {
  25.     type = int( random(max_types) );
  26.     pushStyle();
  27.     colorMode(RGB,255);
  28.     c = color(random(255), random(255), random(255));
  29.     k = color(random(255), random(255), random(255));
  30.     popStyle();
  31.     if ( random(1) < .5 ) {
  32.       pos = new PVector( (random(1)<.5)?width+50:-50, random(height), 0 );
  33.       vel = new PVector( -pos.x, random(height), 0);
  34.       vel.limit(random(.1, 5));
  35.     } else {
  36.       pos = new PVector( random(width), (random(1)<.5)?height+50:-50);
  37.       vel = new PVector( random(width), -pos.y, 0);
  38.       vel.limit(random(.1, 5));
  39.     }
  40.     dim = new PVector( random(40,200), random(40,200), random(40,200) );
  41.     rot = random(TWO_PI);
  42.   }
  43.   boolean draw(){
  44.     pos.x+=vel.x;
  45.     pos.y+=vel.y;
  46.     rot+=.01;
  47.     rot%=TWO_PI;
  48.     switch(type){
  49. //      case 0:
  50. //        pushStyle();
  51. //        pushMatrix();
  52. //        noFill();//fill(c);
  53. //        stroke(c);
  54. //        translate(pos.x, pos.y, pos.z);
  55. //        rotate(rot);
  56. //        rectMode(CENTER);
  57. //        rect(0,0,dim.x, dim.y);
  58. //        popMatrix();
  59. //        popStyle();
  60. //        break;
  61.       case 1:
  62.         pushStyle();
  63.         pushMatrix();
  64.         fill(c);
  65.         noStroke();//stroke(k);
  66.         translate(pos.x, pos.y, pos.z);
  67.         rotate(rot);
  68.         rectMode(CENTER);
  69.         rect(0,0,dim.x, dim.y);
  70.         popMatrix();
  71.         popStyle();     
  72.         break;
  73.       default:
  74.         pushStyle();
  75.         pushMatrix();
  76.         fill(c);
  77.         noStroke();//stroke(k);
  78.         translate(pos.x, pos.y, pos.z);
  79.         rotate(rot);
  80.         ellipseMode(CENTER);
  81.         ellipse(0,0,dim.x, dim.y);
  82.         popMatrix();
  83.         popStyle();
  84.         break;
  85.     }   
  86.     return( pos.x > width + 60 || pos.x < -60 || pos.y > height + 60 || pos.y < -60 );
  87.   }
  88. }
Oh man, this is already spectacular! 

I just changed the window size to 1195 by 500 and I've been staring at it four hours.

Thanks!