combining shape3d with JMCvideo texture
in
Contributed Library Questions
•
2 years ago
Hi everybody,
i want to combine the shape3D library with a JMCvideo image. I was thinking something like this:
loading of video goes like this:
in the javadocs they say it could load a PImage:
http://www.lagers.org.uk/s3d4p/distribution/web/reference/shapes3d/Mesh2DCore.html#setTexture(processing.core.PImage)
i've found somebody that was talking about:
is it something with refreshing the texture?
i want to combine the shape3D library with a JMCvideo image. I was thinking something like this:
- // put in setup
- void makeBezierShape() {
// Create a Bezier object based on array of PVector
bz = new Bezier2D(v, v.length);
// Create a new BezierShape (3D) based on Bezier object
// with 36 slices (along Bezier curve length), 20 segmnts
// (round 360 circumference and will use normals to enable
// shading.
bzshape = new BezShape(this, bz, 36, 20);
//texture(harpCam);
}
// put in draw
void BezierTexture(){
PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;
GL gl = pgl.beginGL();
gl.glViewport(0, 0, widthSketch, heightSketch);
bzshape.setTexture(myMovie);
//myMovie.image(gl, 0, 0, myMovie.width, myMovie.height);
bzshape.drawMode(Shape3D.TEXTURE);
pgl.endGL();
}
loading of video goes like this:
- PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;
GL gl = pgl.beginGL();
gl.glViewport(0, 0, widthSketch, heightSketch);
myMovie.image(gl, 0, 0, myMovie.width, myMovie.height);
pgl.endGL();
in the javadocs they say it could load a PImage:
http://www.lagers.org.uk/s3d4p/distribution/web/reference/shapes3d/Mesh2DCore.html#setTexture(processing.core.PImage)
i've found somebody that was talking about:
- solved by extending JMCVideoGL to support positioning the texture in 3D space.
is it something with refreshing the texture?
1