We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › objLoader and video clash
Page Index Toggle Pages: 1
objLoader and video clash (Read 648 times)
objLoader and video clash
Jun 16th, 2005, 6:55am
 
Hi, I have worked on a couple of projects now where the video image wraps around a 3D object. This is kinda cool but not required.
The libraries used are objLoader, video and openGL

Here is some basic code:

import saito.objloader.*;
import processing.video.*;
import processing.opengl.*;
//
OBJModel model1, model2;

 Movie movie1;

 float w = 80.0;
 float h = 60.0;
 float d =  6.0;
 float s = 6.0;
   
  float a = 60.0;
  float b = 80.0;
  float c = 0.0;
 void setup()
 {
 size(200, 200, OPENGL);
 framerate(50);
 noStroke();
   
   movie1 = new Movie(this, "atGlens.mov");
   movie1.loop();
 
   model1 = new OBJModel(this);
   model1.debugMode();
   model1.load("cyli2.obj");
 fill(1);
 }  

 void draw()
 {
 // The model
 pushMatrix();
 translate(a, b, c);
 scale(8.0);
 model1.draw();
 popMatrix();
 // The video
  movie1.read();    
  pushMatrix();
  translate(a-(w/2), b-(h/2), 5);
  image(movie1, s/2, s/2, w-s, h-s);
  popMatrix();

}

No error msg's occur.
I had to alter the .mtl file since there were issues with the .obj and .mtl export files of Blender and Processing v90.
I am running OS X 10.3.8

Is this a universal malfunction, anyone know what's going on?
Page Index Toggle Pages: 1