please format code with </> button * homework policy * asking questions
Hello everyone,
First of all, I am new using processing. I am just trying to see a 3D model in the screen using loadShape();
I used blender to export an .obj file (the monkey model), and I saved it in the same folder of the processing sketch. This is the code I used to load the model, but anything happens:
PShape modelo;
void setup() {
size(1920, 1080);
modelo = loadShape(“3D_Model.obj”);
}
void draw () {
background(0);
shape(modelo);
}
I just get this error:
Unsupported format: 3D_Model.obj
java.lang.NullPointerException: Cannot invoke “processing.core.PShape.isVisible()” because “shape” is null
at processing.core.PGraphics.shape(PGraphics.java:4124)
at processing.core.PApplet.shape(PApplet.java:12558)
at sketch_3D_viewer.setup(sketch_3D_viewer.java:23)
at processing.core.PApplet.handleDraw(PApplet.java:2142)
at processing.awt.PSurfaceAWT$9.callDraw(PSurfaceAWT.java:1440)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:356)
Thank you for your time,
Almudena.