I am trying to display SVG files in 3D with Processing.org using either the OPENGL or P3D libraries. The issue, documented here (and other places: 1, 2, and an undesirable library hack), is that these renderers to not support complex shapes (those with holes or complicated breaks).
Is there an alternative to SVG for the graphics, or another library I could use?
Below are image files and code samples. This first image uses the default renderer:
This image uses OPENGL 3D library. You can see it struggles to reproduce the SVG files.
I've posted a zip of this sketch with images and code below. Uncomment the OPENGL line and comment the default line to see the problem.
import processing.opengl.*;
float wh = 0;
void setup() {
//size(600, 600, OPENGL); // use OPENGL
size(600, 600); // use default library
background(255);
smooth();
}
void draw() {
wh = random(40, 200);
PShape s;
String file = "gear" + ceil(random(0, 12)) + ".svg";
s = loadShape(file);
shape(s, random(-20, width), random(-20, height), wh, wh);
}