gewähltes Thema: colladaloader

Bitte geben Sie den Sicherheits-Code ein:   Hier →  
Zurück zur Hauptseite
Secret Admirer (am 06 Aug 13, 11:56
Thank you very much, it's working! You're a lifesaver.
Webmaster (am 04 Aug 13, 18:11
You got two Problems here:
  • your cube is a group of triangles → ungroup it!
  • your model must contain at least one triangle AND one line

  • You'll find your example on my public folder ("ungrouped_fluffy_with_one_line.kmz")

    I'm going to add it into the troubleshooting section. Thanks for Your feedback.
    Secret Admirer (am 01 Aug 13, 18:50
    Hey, first time using this library and I'm sorry to ask but I can't get it to work on the kmz and dae files that I'm exporting. I'm using processing 2.0 and Sketchup release 8.0.16846 as indicated in the guide on a Windows 7 64-bit I also followed all the steps indicated such as making the unique textures and removing groups and it doesn't work. Even creating a simple cube with or without textures and exporting it doesn't work, however the dae and kmz files that are in the library examples folder work perfectly, so I'm assuming there's something wrong with my exporter? But that's weird because I'm using the correct sketchup version. These are the files i'm using along with the example code: http://www.mediafire.com/?i6zbbyt96n56j6z I hope anyone can help me out here, I have zero idea of what I might be doing wrong. This is the error log if that helps java.lang.RuntimeException: java.lang.NullPointerException at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58) at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:100) at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:205) 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:483) at processing.opengl.PGL.requestDraw(PGL.java:1155) at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1602) at processing.core.PApplet.run(PApplet.java:2141) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at cooladaLoader.LoadingHelper.convertSkpCoordsToProcessing(LoadingHelper.java:228) at cooladaLoader.LoadingHelper.(LoadingHelper.java:79) at cooladaLoader.ColladaLoader.(ColladaLoader.java:32) at demob.setup(demob.java:45) at processing.core.PApplet.handleDraw(PApplet.java:2245) at processing.opengl.PGL$PGLListener.display(PGL.java:2643) at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:576) at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:561) at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1054) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1024) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:899) at javax.media.opengl.awt.GLCanvas$8.run(GLCanvas.java:1065) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666) at java.awt.EventQueue.access$400(EventQueue.java:81) at java.awt.EventQueue$2.run(EventQueue.java:627) at java.awt.EventQueue$2.run(EventQueue.java:625) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:636) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Markus (am 05 Feb 13, 20:37
    Seemds to be rougue path configs. Take a look to Ralfs Post from 25 Sep 11, 13:14 (.dae-bug) and take a look to Apples Path Structure (here) too BtW: kmz should always work
    Hua (am 05 Feb 13, 11:47
    Hi Markus, the exception in the last message happens when I load ".dae" file. it says:/Users/whitegreen/Downloads/objs/models/untitled (Not a directory) when I load a ".kmz" file
    Hua (am 05 Feb 13, 11:45
    Hi, Markus, Thank you for sharing the codes, I followed the guidelines to install the lib and export the .kmz file from Sketchup 8, but it says: the actual file is made by Google SketchUp 8.0.3161 and not 'Google SketchUp 8.0.3117'. It might contain a different XML-Structure Any suggestions?
    Markus (am 29 Jan 13, 15:03
    It seems that's not a Problem of ColladaLibrary (except mac). Such of problems appear when you mix 32bit JVM with 64 Bit native binaries (dll, so) or 64JVM with 32 bins. You also try to compile the sources with eclipse on your 64 bit mashine
    rastafermo (am 26 Jan 13, 18:12
    hi everybody..i have a problem with the collada loader..it works everything with the Processing 1.5 version..but i need to use the version 2 of the program, because it allows to compile for the web/android/mac etc...in that version when i start an example it displays an error that tells that the loader can not work on 32-bit mode..i don't know ehat to do..please help..thanks
    Markus (am 13 Jul 12, 19:46
    OK, now I wrote an addon to my colladaloader to get more than one model into your scetch. download it here. It tooks me more time than expected. Enjoy it, hope it helps
    Owen (am 07 Jul 12, 21:16
    Markus, thanks for your response. So then I import the text files and display them as 3d how? Sorry, its unclear to me. Would it be possible to post a working example? I'm also trying now to just import one DAE, then delete the ColladaLoader and load a different one and its not working either. Something like: models=null; models = new ColladaLoader[files.length]; Why does this not work? Thanks.
    Markus (am 03 Jul 12, 00:30
    No you can't. But You can do something like that: (run it twice for "house_monopoly.dae", "truck5_8.dae" then read/parse txtfiles)
            for (Triangle tri : triangles)
                if (!tri.containsTexture)
                	String points = ""+
                	//addstring to a file "noTextures.txt"
                } else
                    //maybe weak: give Filename a better distinguishable Name
                	String imageName = tri.imageFileName; 
                    String texturePoints = ""+imageName+";"+
                	//addstring to a file "withTextures.txt"
            for (Line lin : lines)
                String linepoints = ""+lin.A.x+";"+lin.A.y+";"+lin.A.z+";"+
                //addstring to a file "lines.txt"
    I don't know if processing allows to serialize Objects (i.e Triangle). If so then wrap Triangle/Line to a serializable Object and save it -> the easy way!
    Owen (am 27 Jun 12, 20:37
    Is it possible to include multiple different models in one sketch? This code, for example, only shows multiple copies of the first model created:
     *  Import and display 3D COLLADA (.dae) file from Sketchup
     *  collada_import_04.pde by Owen Mundy owenmundy.com (2012)
     *  Based on original file by Markus Zimmermann
     *  Requires COLLADA 3D Model Loader for the Processing
     *  https://github.com/Pro/processing-collada-loader
     *  This file is in the public domain
    import colladaLoader.*;
    import processing.opengl.*;
    ColladaLoader[] models;
    String[] files = {
      "house_monopoly.dae", "truck5_8.dae"
    void setup()
      size(500, 500, OPENGL);
      models = new ColladaLoader[files.length];
      // Import COLLADA model (from "data" folder inside your sketch folder)
      for (int i = 0; i < files.length; i++) {
        models[i] = ColladaLoader.getInstance(sketchPath + "/data/" + files[i], this);
    void draw()
      for (int i = 0; i < files.length; i++) {
        translate(width/2-50, height/2+100, 300);
    Markus (am 02 Apr 12, 23:07
    do you use ".dae" with textures? if textures is located on different path the Exception may appear. Use a kmz instead to solve my software-Bug or read Ralfs posting on 25 Sep 11, 13:14

    Another issue is: an imported picture in your model doesnt work too. You have to delete it and replace it with a big rectangle that include your picture as a texture
    Felipe (am 29 Mar 12, 01:22
    Hello, I'd like to ask for help on few errors I get when trying to import models from Google's Sketchup 8 into Processing (actual version is 1.5.1). Error is "cooladaLoader.ColladaLoaderException: Data read from xml-file are not consistent" Also, if you'd like (and I think this would be very useful), I can help elaborating a "FAQ" page for this library, since searching for it on the web does not give satisfactory results! Thank you for your time, Att,
    Markus (am 28 Sep 11, 14:43
    Vielen Dank für den Hinweis. ich werde dem in einer nächsten Release nachgehen
    Ralf (am 25 Sep 11, 13:14
    Vielen Danke für Ihre schnelle Hilfe! Nun funktioniert es. Allerdings musste ich " model = ColladaLoader.getInstance("truck5_8.dae", this);" gegen "model = ColladaLoader.getInstance(sketchPath("../data/truck5_8.dae"), this);" ersetzten. Das ist aber nicht schlimm, Hauptsache es funktioniert! Vielen Dank für diese tolle Bibliothek!
    Markus (am 24 Sep 11, 20:39
    Möglicherweise war "Duffbeer" das erste File, das Du geöffnet hast? Vielleicht hat mac probleme beim überschreiben von bereits vorhandenen gleichnamigen Files (doc.kml und model-directory löschen)
    Ralf (am 23 Sep 11, 13:52
    Guten Tag, Ich benutze Processing jetzt schon eine Weile und wollte nun einmal ihre Library ausprobieren. Allerdings ist dies sehr Mysteriös. Wenn ich ihre Beispiele ausprobiere, funktioniert lediglich "Duff Beer", bei den anderen (und auch bei meinen eigenen Versuchen) kommt folgende Fehlermeldung "error in opening zip file". Unten in der Konsole befindet sich folgender Inhalt: Exception in thread "Animation Thread" java.lang.RuntimeException: error in opening zip file at cooladaLoader.LoadingHelper.unzip(LoadingHelper.java:196) at cooladaLoader.LoadingHelper.<init>(LoadingHelper.java:41) at cooladaLoader.LoadingHelper.<init>(LoadingHelper.java:61) at cooladaLoader.ColladaLoader.<init>(ColladaLoader.java:31) at cooladaLoader.ColladaLoader.getInstance(ColladaLoader.java:46) at SusanOnWall.setup(SusanOnWall.java:38) at processing.core.PApplet.handleDraw(Unknown Source) at processing.core.PApplet.run(Unknown Source) at java.lang.Thread.run(Thread.java:680) Leider werde ich daraus nicht schlau! Ich arbeite mit einem Mac. Vielleicht können Sie mir weiterhelfen. Vielen Dank, und mit freundlichen Grüße, Ralf
    merckx.kris@gmail.com (am 01 Sep 11, 21:22
    What does this exception mean? Exception in thread "Animation Thread" java.lang.RuntimeException: /Users/krismerckx/Desktop/data/models/model.dae (Not a directory)
    Webmaster (am 11 Jul 11, 09:38
    open zip-> you should see a colladaLoader11.jar inside archive -> drag & drop that to your lib folder (see screenshot). If not, try to rename zip file to colladaLoader11.jar then drag&drop to library folder

    P.S. earthlink rejects my answer-mails to you
    colladaLoader_HELP (am 08 Jul 11, 23:33
    when i download your mac 64bit .jar files it unzips to my mac as a folder with many class files/how do i use this to replace the older .jar file in the library?
    Webmaster (am 09 May 11, 16:24
    I think a mac 64 Bit compilation file may solve your problem

    1. download processing latest version and move zip to desktop
    2. double-click processing-1.5-macosx.zip then dblclk Processing.app (to create a home-folder)
    3. move Processing.app to folder /Users/your_user_name/Documents/Processing/
    4. download from die-seite.ch my colladaloader, and unpack zip
    5. move data folder to: /Users/your_user_name/Documents/Processing/
    6. move colladaLoader11 and all its subdirs to folder /Users/your_user_name/Documents/Processing/libraries/
    7. Now replace /Users/your_user_name/Documents/Processing/libraries/colladaLoader11/library/colladaLoader11.jar
        with a special compiled version for mac 64 bit (link here) (unpack zip first)

    So at the end you have the following tree (and a 64bit jar):
    (and some more datas from me)
    (and some more examples from me)
    /Users/your_user_name/Documents/Processing/libraries/colladaLoader11/library/colladaloader11.jar (= mac 64 bit version)

    Now start processing as always and load my examples. On my mac its working now (see screenshot). Does it work on yours too?
    Rudie Goudschaal (am 04 May 11, 07:40
    Colladaloader Dear Sir, I'am working omong others with Mac OSX 10.4.11 (Intel dual processor) with Java 1.5.0-19-b02-306. Furthermore I'am working for more then 10 years with SketchUp Pro (selling and making manuals) and I tried your Colladaloader on a SketchUp 8 file from my Mac (OSX 10.5) It gives an error by loading the file in the script to show a simple box from SU to Processing. The script is from your website / instructions. Do you have a suggestion? http://www.ontmoeting.nl and http://www.3dontwerpen.nl are some websites. Thanks beforehand, Rudie Goudschaal Huizen, the Netherlands E-mail: info@alfazet.nl
    Webmaster (am 26 Oct 10, 15:42
    Post here your feedback or questions