Pandas 3D obj model loading












0















I have been trying to build a game using pandas3D and I saw the load model function only uses x, bam and egg. files.



But I only have obj files.



How can I load obj models to pandas? I have tried converting from .obj to .x but pandas gives me an error.




Unable to open X file:
/c/Users/inbar/PycharmProjects/untitled3/3D/v1.x :xfile(error): Cannot
open /c/Python27/etc/../v1.x for reading. Unable to open X file:
/c/Python27/etc/../v1.x :xfile(error): Cannot open
/c/Python27/etc/../models/v1.x for reading. Unable to open X file:
/c/Python27/etc/../models/v1.x :loader(error): Couldn't load file
v1.x: all matching files on model path invalid (the model path is
currently:
"/c/Users/inbar/PycharmProjects/untitled3/3D;/c/Python27/etc/..;/c/Python27/etc/../models")
Traceback (most recent call last): File
"C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
line 146, in
app = MyApp() File "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
line 32, in init
self.surface =loader.loadModel("v1.x") File "C:Python27directshowbaseLoader.py", line 170, in loadModel
raise IOError, message IOError: Could not load model file(s): ['v1.x']




after using Obj2Egg i got this errror
C:UsersinbarDesktopt>obj2egg.py -n30 -b -t -s OBJ.obj
option -t not recognized



This Version: $Id: obj2egg.py,v 1.7 2008/05/26 17:42:53 andyp Exp $
Info: info >at< pfastergames.com

Extended from: http://panda3d.org/phpbb2/viewtopic.php?t=3378
.___..__ .___.___.___.__..__ . .
| [__)[__ [__ [__ | |[__)|/|
| | [___[___| |__|| | |
obj2egg.py [n##][b][t][s] filename1.obj ...
-n regenerate normals with # degree smoothing
exaple -n30 (normals at less 30 degrees will be smoothed)
-b make binarmals
-t make tangents
-s show in pview

licensed under WTFPL (http://sam.zoy.org/wtfpl/)









share|improve this question





























    0















    I have been trying to build a game using pandas3D and I saw the load model function only uses x, bam and egg. files.



    But I only have obj files.



    How can I load obj models to pandas? I have tried converting from .obj to .x but pandas gives me an error.




    Unable to open X file:
    /c/Users/inbar/PycharmProjects/untitled3/3D/v1.x :xfile(error): Cannot
    open /c/Python27/etc/../v1.x for reading. Unable to open X file:
    /c/Python27/etc/../v1.x :xfile(error): Cannot open
    /c/Python27/etc/../models/v1.x for reading. Unable to open X file:
    /c/Python27/etc/../models/v1.x :loader(error): Couldn't load file
    v1.x: all matching files on model path invalid (the model path is
    currently:
    "/c/Users/inbar/PycharmProjects/untitled3/3D;/c/Python27/etc/..;/c/Python27/etc/../models")
    Traceback (most recent call last): File
    "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
    line 146, in
    app = MyApp() File "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
    line 32, in init
    self.surface =loader.loadModel("v1.x") File "C:Python27directshowbaseLoader.py", line 170, in loadModel
    raise IOError, message IOError: Could not load model file(s): ['v1.x']




    after using Obj2Egg i got this errror
    C:UsersinbarDesktopt>obj2egg.py -n30 -b -t -s OBJ.obj
    option -t not recognized



    This Version: $Id: obj2egg.py,v 1.7 2008/05/26 17:42:53 andyp Exp $
    Info: info >at< pfastergames.com

    Extended from: http://panda3d.org/phpbb2/viewtopic.php?t=3378
    .___..__ .___.___.___.__..__ . .
    | [__)[__ [__ [__ | |[__)|/|
    | | [___[___| |__|| | |
    obj2egg.py [n##][b][t][s] filename1.obj ...
    -n regenerate normals with # degree smoothing
    exaple -n30 (normals at less 30 degrees will be smoothed)
    -b make binarmals
    -t make tangents
    -s show in pview

    licensed under WTFPL (http://sam.zoy.org/wtfpl/)









    share|improve this question



























      0












      0








      0








      I have been trying to build a game using pandas3D and I saw the load model function only uses x, bam and egg. files.



      But I only have obj files.



      How can I load obj models to pandas? I have tried converting from .obj to .x but pandas gives me an error.




      Unable to open X file:
      /c/Users/inbar/PycharmProjects/untitled3/3D/v1.x :xfile(error): Cannot
      open /c/Python27/etc/../v1.x for reading. Unable to open X file:
      /c/Python27/etc/../v1.x :xfile(error): Cannot open
      /c/Python27/etc/../models/v1.x for reading. Unable to open X file:
      /c/Python27/etc/../models/v1.x :loader(error): Couldn't load file
      v1.x: all matching files on model path invalid (the model path is
      currently:
      "/c/Users/inbar/PycharmProjects/untitled3/3D;/c/Python27/etc/..;/c/Python27/etc/../models")
      Traceback (most recent call last): File
      "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
      line 146, in
      app = MyApp() File "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
      line 32, in init
      self.surface =loader.loadModel("v1.x") File "C:Python27directshowbaseLoader.py", line 170, in loadModel
      raise IOError, message IOError: Could not load model file(s): ['v1.x']




      after using Obj2Egg i got this errror
      C:UsersinbarDesktopt>obj2egg.py -n30 -b -t -s OBJ.obj
      option -t not recognized



      This Version: $Id: obj2egg.py,v 1.7 2008/05/26 17:42:53 andyp Exp $
      Info: info >at< pfastergames.com

      Extended from: http://panda3d.org/phpbb2/viewtopic.php?t=3378
      .___..__ .___.___.___.__..__ . .
      | [__)[__ [__ [__ | |[__)|/|
      | | [___[___| |__|| | |
      obj2egg.py [n##][b][t][s] filename1.obj ...
      -n regenerate normals with # degree smoothing
      exaple -n30 (normals at less 30 degrees will be smoothed)
      -b make binarmals
      -t make tangents
      -s show in pview

      licensed under WTFPL (http://sam.zoy.org/wtfpl/)









      share|improve this question
















      I have been trying to build a game using pandas3D and I saw the load model function only uses x, bam and egg. files.



      But I only have obj files.



      How can I load obj models to pandas? I have tried converting from .obj to .x but pandas gives me an error.




      Unable to open X file:
      /c/Users/inbar/PycharmProjects/untitled3/3D/v1.x :xfile(error): Cannot
      open /c/Python27/etc/../v1.x for reading. Unable to open X file:
      /c/Python27/etc/../v1.x :xfile(error): Cannot open
      /c/Python27/etc/../models/v1.x for reading. Unable to open X file:
      /c/Python27/etc/../models/v1.x :loader(error): Couldn't load file
      v1.x: all matching files on model path invalid (the model path is
      currently:
      "/c/Users/inbar/PycharmProjects/untitled3/3D;/c/Python27/etc/..;/c/Python27/etc/../models")
      Traceback (most recent call last): File
      "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
      line 146, in
      app = MyApp() File "C:/Users/inbar/PycharmProjects/untitled3/3D/panda3d tutorial.py",
      line 32, in init
      self.surface =loader.loadModel("v1.x") File "C:Python27directshowbaseLoader.py", line 170, in loadModel
      raise IOError, message IOError: Could not load model file(s): ['v1.x']




      after using Obj2Egg i got this errror
      C:UsersinbarDesktopt>obj2egg.py -n30 -b -t -s OBJ.obj
      option -t not recognized



      This Version: $Id: obj2egg.py,v 1.7 2008/05/26 17:42:53 andyp Exp $
      Info: info >at< pfastergames.com

      Extended from: http://panda3d.org/phpbb2/viewtopic.php?t=3378
      .___..__ .___.___.___.__..__ . .
      | [__)[__ [__ [__ | |[__)|/|
      | | [___[___| |__|| | |
      obj2egg.py [n##][b][t][s] filename1.obj ...
      -n regenerate normals with # degree smoothing
      exaple -n30 (normals at less 30 degrees will be smoothed)
      -b make binarmals
      -t make tangents
      -s show in pview

      licensed under WTFPL (http://sam.zoy.org/wtfpl/)






      python pandas 3d






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 '18 at 20:59







      j.doe

















      asked Nov 21 '18 at 16:50









      j.doej.doe

      42




      42
























          2 Answers
          2






          active

          oldest

          votes


















          0














          Please use following code to convert obj to egg which is native format supported by panda3D
          Obj2Egg



          Else you will have to convert Obj to Collada for that you may use any software like blender.






          share|improve this answer
























          • I did use obj2egg but it didnt work and gave me this error

            – j.doe
            Nov 21 '18 at 20:56











          • Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

            – Paritosh Kulkarni
            Nov 21 '18 at 20:58



















          0














          You can in fact load .obj model files in Panda3D, starting from version 1.10.
          Just add load-file-type p3assimp to your config.prc file in the etc folder of your Panda3D installation, and you can then load .obj models using model = self.loader.load_model("my_model.obj").






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416937%2fpandas-3d-obj-model-loading%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Please use following code to convert obj to egg which is native format supported by panda3D
            Obj2Egg



            Else you will have to convert Obj to Collada for that you may use any software like blender.






            share|improve this answer
























            • I did use obj2egg but it didnt work and gave me this error

              – j.doe
              Nov 21 '18 at 20:56











            • Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

              – Paritosh Kulkarni
              Nov 21 '18 at 20:58
















            0














            Please use following code to convert obj to egg which is native format supported by panda3D
            Obj2Egg



            Else you will have to convert Obj to Collada for that you may use any software like blender.






            share|improve this answer
























            • I did use obj2egg but it didnt work and gave me this error

              – j.doe
              Nov 21 '18 at 20:56











            • Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

              – Paritosh Kulkarni
              Nov 21 '18 at 20:58














            0












            0








            0







            Please use following code to convert obj to egg which is native format supported by panda3D
            Obj2Egg



            Else you will have to convert Obj to Collada for that you may use any software like blender.






            share|improve this answer













            Please use following code to convert obj to egg which is native format supported by panda3D
            Obj2Egg



            Else you will have to convert Obj to Collada for that you may use any software like blender.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 21 '18 at 19:29









            Paritosh KulkarniParitosh Kulkarni

            608413




            608413













            • I did use obj2egg but it didnt work and gave me this error

              – j.doe
              Nov 21 '18 at 20:56











            • Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

              – Paritosh Kulkarni
              Nov 21 '18 at 20:58



















            • I did use obj2egg but it didnt work and gave me this error

              – j.doe
              Nov 21 '18 at 20:56











            • Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

              – Paritosh Kulkarni
              Nov 21 '18 at 20:58

















            I did use obj2egg but it didnt work and gave me this error

            – j.doe
            Nov 21 '18 at 20:56





            I did use obj2egg but it didnt work and gave me this error

            – j.doe
            Nov 21 '18 at 20:56













            Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

            – Paritosh Kulkarni
            Nov 21 '18 at 20:58





            Then convert you model to .dae and then use it. For this conversion you can use any free tool like blender. which has exporter for this.

            – Paritosh Kulkarni
            Nov 21 '18 at 20:58













            0














            You can in fact load .obj model files in Panda3D, starting from version 1.10.
            Just add load-file-type p3assimp to your config.prc file in the etc folder of your Panda3D installation, and you can then load .obj models using model = self.loader.load_model("my_model.obj").






            share|improve this answer




























              0














              You can in fact load .obj model files in Panda3D, starting from version 1.10.
              Just add load-file-type p3assimp to your config.prc file in the etc folder of your Panda3D installation, and you can then load .obj models using model = self.loader.load_model("my_model.obj").






              share|improve this answer


























                0












                0








                0







                You can in fact load .obj model files in Panda3D, starting from version 1.10.
                Just add load-file-type p3assimp to your config.prc file in the etc folder of your Panda3D installation, and you can then load .obj models using model = self.loader.load_model("my_model.obj").






                share|improve this answer













                You can in fact load .obj model files in Panda3D, starting from version 1.10.
                Just add load-file-type p3assimp to your config.prc file in the etc folder of your Panda3D installation, and you can then load .obj models using model = self.loader.load_model("my_model.obj").







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 18 '18 at 20:00









                qwerty12345qwerty12345

                7315




                7315






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53416937%2fpandas-3d-obj-model-loading%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents