I made an .obj file in blender that I would like to animate via Processing.js but I keep getting the following error:
" at sketch_3d_obj_interlaced_loops.objAbstractShape(sketch_3d_obj_interlaced_loops.java:37)
at sketch_3d_obj_interlaced_loops.draw(sketch_3d_obj_interlaced_loops.java:32)
at processing.core.PApplet.handleDraw(PApplet.java:2094)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:840)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:782)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:453)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
The file “dalle_2.obj” is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
java.lang.NullPointerException: Cannot invoke “java.io.BufferedReader.readLine()” because “reader” is null
at processing.core.PShapeOBJ.parseOBJ(PShapeOBJ.java:168)
at processing.core.PShapeOBJ.(PShapeOBJ.java:40)
at processing.core.PShapeOBJ.(PShapeOBJ.java:27)
at processing.opengl.PGraphics3D.loadShapeImpl(PGraphics3D.java:128)
at processing.opengl.PGraphicsOpenGL.loadShape(PGraphicsOpenGL.java:3383)
at processing.core.PApplet.loadShape(PApplet.java:10899)
at
"
" The file “/Users/***************r/Desktop/3D Paintings/sketch_3d_obj_/data/dalle_.mtl” is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
Personally, I would do away with the objAbstractShape() function and I’m not sure you really need pushMatrix() and popMatrix() unless there is more to your project than is being shown.