why the messing up? (box.setTexture)

JaiJai
edited December 2015 in Questions about Code

what is happening here this use to work just fine????

Capture

import shapes3d.*;
import shapes3d.animation.*;
import shapes3d.utils.*;
import processing.video.*;

/*
mix this with cam3D cube
*/
Movie mov;

Shape3D[] shapes; 
Box box;

int shapesNumTot = 1;
float angleX, angleY, angleZ;

void setup() {
  size(800, 600, P3D);

  mov = new Movie(this, "Shots.mp4");
  mov.loop();
  textureMode(NORMAL);

  shapes = new Shape3D[shapesNumTot];

  box = new Box(this);
  //box.setTexture(mov, Box.FRONT); // if I try this instead it blocks my PC.
  box.setTexture(mov); // this works as expected..
  box.setSize(100, 200, 400);
  box.drawMode(S3D.TEXTURE); 
  shapes[0] = box;
}

void draw() {
  background(100);
  pushMatrix();
  camera(0, 0, 300, 0, 0, 0, 0, 1, 0);
  angleX += radians(0.913f);
  angleY += radians(0.799f);
  angleZ += radians(1.213f);
  rotateX(angleX);
  rotateY(angleY);
  rotateZ(angleZ);
  for (int i = 0; i < shapesNumTot; i++) {
    shapes[i].draw();
  }
  popMatrix();
}

void movieEvent(Movie m) {
  m.read();
}

ERRORS

java.lang.RuntimeException: java.lang.NoSuchMethodError: processing.core.PVector.set(FFF)Lprocessing/core/PVector;
    at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
    at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
    at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)
    at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
    at javax.media.opengl.Threading.invoke(Threading.java:191)
    at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)
    at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)
    at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)
    at processing.core.PApplet.run(PApplet.java:2256)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: processing.core.PVector.set(FFF)Lprocessing/core/PVector;
    at shapes3d.Box.calcXYZ(Unknown Source)
    at shapes3d.Box.calcShape(Unknown Source)
    at shapes3d.Box.<init>(Unknown Source)
    at VideoFace.setup(VideoFace.java:47)
    at processing.core.PApplet.handleDraw(PApplet.java:2361)
    at processing.opengl.PJOGL$PGLListener.display(PJOGL.java:862)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:665)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:649)
    at javax.media.opengl.awt.GLCanvas$10.run(GLCanvas.java:1289)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1119)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:994)
    at javax.media.opengl.awt.GLCanvas$11.run(GLCanvas.java:1300)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Answers

  • edited December 2015

    I suspect that the problem is that you are using a version of Shapes3D that is incompatible with the version of Processing you are using.

    PS 2.2.1 use Shapes3D 2.1.5
    PS 3 use Shapes3D 2.2

    The incompatability is caused by changes made to PVector

    If you are going to use both PS2 and PS3 then have separate sketch folders for each of them.

    It worked for me in PS3

  • What is the point of posting the last picture?

  • If you are going to use both PS2 and PS3 then have separate sketch folders for each of them.

    this is me showing you that i do have 2 folders for each ps ver

  • This is me showing you that i do have 2 folders for each ps ver

    Those folders can also be where your Processing versions are installed rather than their respective "sketchbook" folders! >:P

  • JaiJai
    edited December 2015

    Loop when i first installed the p3 it asked me if i wanted to make a new directory so this dont happen and i said yes to this warning so why is it happening ? what you see there in my document folder both p2 and p3 was created by Processing at initial setup not done by me so if i have p2 or p3 open at the time of installing a new library from the download manager then this should be installed respectfully to that ver in its folder, further more what i have in those folders is NOT duplicated in other p ver folders

  • edited December 2015

    Caused by: java.lang.NoSuchMethodError: processing.core.PVector.set(FFF)Lprocessing/core/PVector;

    at shapes3d.Box.calcXYZ(Unknown Source)

    According to the debug above, the NoSuchMethodError happened at shapes3d.Box's calcXYZ() method, while trying to invoke PVector's set() method.

    Notice there's an L right after PVector.set(FFF).
    I believe it probably means method set() is supposed to return this.
    However in older versions of Processing, set() is void! (:|

  • yeah idk about all that like i have stated this was working just fine just a week ago and i have not changed anything

  • edited December 2015

    That's what Java is telling you: It couldn't find any set() method which returns L.

    I remember you said it's happening in your P2 PDE.
    To make sure it's properly configured, hit CTRL+COMMA.
    And pay attention to the path of "Sketchbook location" at the top.
    Close P2 & open P3 and do the same. Make sure they indeed point to diff. paths!

    After that, go to P2's "Sketchbook" path and enter its subfolder "libraries/".
    Delete folder "shapes3d". Then open P2 PDE.
    Reinstall library Shapes3D. It should install the last compatible version for P2.

  • p2 dont have a sketchbook only p3 but ok ill try that

  • p2 = C:\Users\Franks\Documents\Processing & p3 = C:\Users\Franks\Documents\Processing3

  • JaiJai
    edited December 2015

    ure

  • p2 don't have a sketchbook only p3 but ok ill try that...

    So you lied about they had diff. sketchbook folders! [-(
    How could you expect P2 to work w/ P3 libraries in the 1st place??? 8-}

  • JaiJai
    edited December 2015

    no, no lies , if you actually look at the pictures i been posting you can see what i mean, and what do you mean

    How could you expect P2 to work w/ P3 libraries in the 1st place???

    i thought you were not supposed to mix p2 and p3 > now who lie ? lol again this is not me this is your system i do not go in and take things off i just add as i said before i dont edit library i remove then add of which i have not done

    So you lied about they had diff. sketchbook folders

    you did not understood what i meant so let me break it down for you......when i said

    further more what i have in those folders is NOT duplicated in other p ver folders

    i meant nothing that is in p2 is again in p3 folders this includes this sketchbook folders

  • edited December 2015 Answer ✓

    p2 = C:\Users\Franks\Documents\Processing & p3 = C:\Users\Franks\Documents\Processing3

    That's great you have separate sketch folders for PS2 and PS3 all we need to do now is make sure we have the correct version of SHapes3D in each.

    PS2
    1) Use Windows explorer to delete Shapes3D from the `C:\Users\Franks\Documents\Processing\libraries folder.
    2) Launch Processing 2 and reinstall Shapes3D using the library manager
    3) Exit Processing 2

    PS3
    1) Use Windows explorer to delete Shapes3D from the `C:\Users\Franks\Documents\Processing3\libraries folder.
    2) Launch Processing 3 and reinstall Shapes3D using the library manager
    3) Exit Processing 3

    Your example should work in PS3 (did for me), I haven't tried it with PS2

  • ok so p3 does not have Shapes3D but is ok cuz i dont want this twice plus im more of p2 user , on p2 i did the above and it work now im asking myself how this happened ? well thanks guys loop and quark the usual suspect to save the day~ ! now is their a way to use my mic from pc with p2 ? i see this is possible with p3 but not in p2 but as far as this topic goes you guys have helped me and i thank you both

  • another big issue i have is for most libraries is that when i right click on a syntax i cant never get a reference from it like i used to and i import all my libraries from the manager

  • Answer ✓

    PS3 does have a compatible version of Shapes3D, I made a mistake in the PS3 instructions in my last post. I have corrected the mistake so try it again.

  • edited December 2015

    no, no lies , if you actually look at the pictures i been posting you can see what i mean,

    Of course that was cheek-in-tongue, sorry! :-\"
    It'd be illogical to actually lie while asking for help! :))
    The way I see you had 2 sketchbook folders. But somehow your P2 was using the same path as P3! ~:>

  • @quark is ok i dont need this in p3 thanks for noticing your typos or what not.

  • JaiJai
    edited December 2015

    @GoToLoop yeah maybe so but i dont think it was cuz the path in control comma did not show this as being a factor in the mix up i just think there was something beyond the scope of whats been speculated i believe, #uck it' lol if it happens again i will try to to check this leanings from today

Sign In or Register to comment.