i l try to render a shape and get "vertex(x,y,u,v)is not available with this renderer". I cannot find the mistake. I use version 1.5. The shape rotates, but when i press the mouse button in order to make a pdf of a frame, nothing happens.Can you help?
void draw()
{
// Begin making the PDF
if (recordPDF) {
beginRaw(PDF, "3D.pdf" ); // If you include "####" in the filename -- "3D-####.pdf" -- separate, numbered PDFs will be made for each frame that is rendered.
}
background(0);
noStroke();
translate(width/2.0, height/2.0, -100);
rotateX(PI*mouseY/height);
rotateY(PI*mouseX/width);
scale(90);
TexturedTriangle(tex);
}
I want to make somekind of "screenshots" and export them as PDF, in order to map them in another step on a shape.
here you can see the code of a pattern i made and try to export those frames i choose by Mouse pressed.
It would be great if someone could help! Thank you(i work with processing 1.5)
import processing.pdf.*;
import processing.opengl.*;
int anzahl = 3;
float[] x = new float[anzahl];
float[] y = new float[anzahl];
float[] z = new float[anzahl];
float[] speedX = new float[anzahl];
float[] speedY = new float[anzahl];
float[] speedZ = new float[anzahl];
// A boolean variable that when set to true triggers the PDF recording process
boolean recordPDF = false;
void setup() {
// OPENGL or P3D mode requires the use of beginRaw() and endRaw() instead of beginRecord() and endRecord().
size(400, 400, OPENGL);
smooth();
void draw() {
// Begin making the PDF
if (recordPDF) {
beginRaw(PDF, "3D.pdf" ); // If you include "####" in the filename -- "3D-####.pdf" -- separate, numbered PDFs will be made for each frame that is rendered.
}
i would like to exchange the wireframe in this code to a drawing i made with black lines on white surface. I want the white areas to be transparent and only the black ones should appear. Is this possible? How can i do this. I am beginner.
I´m new in programming and try to make a 3d-shape from a 2d scribble/painting. I use
toxiclibs-complete-0020.zip and
volumeutils-0003.zip Here is my code i use . Tha programmer who wrote this code used volumeutils-0004. Maybe thats the problem, that i have a older version-bbut i cannot find the newer version for download ANYWHERE. "Cannot instantiate the type VolumetricSpace" is the error i get by trying using this code. What does it mean? I work with PC. Thank you a lot!
/**
* Loads a B&W image and extrudes black pixels into
* a watertight 3D mesh.
* @author toxi
*
* Dependencies: toxiclibscore-0018, volumeutils-0004
* (or newer, available from:
http://toxiclibs.org/ )
*/
import toxi.geom.*;
import toxi.geom.mesh.*;
import toxi.volume.*;
int scale=8;
int depth=32;
PImage img=loadImage("heightmap.gif");
Vec3D worldSize = new Vec3D(img.width, img.height, depth).scale(scale);
VolumetricSpace volume = new VolumetricSpace(worldSize, img.width, img.height, depth);
VolumetricBrush brush = new RoundBrush(volume, scale);
for (int y = 0; y < img.height; y ++) {
for (int x = 0; x < img.width; x ++) {
if (0 == (img.pixels[y * img.width + x] & 0xff)) {
for (int z = 0; z < depth; z++) {
brush.drawAtGridPos(x, y, z, 0.5f);
}
}
}
}
volume.closeSides();
TriangleMesh mesh = new IsoSurface(volume).computeSurfaceMesh(null, 0.1f);
mesh.saveAsSTL(sketchPath("test.stl"), true);
exit();
What I'm doing is writing a sketch which has a white background. Onto this background, I'll draw in black. I'll then want to extrude the black areas into a 3d shape(the white will be voids). I'll then export the 3d shape as a STL and have it 3D printed. How can i extrude only the black areas, in order to form a shape of the black ones?