sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Import OBJ with Materials v2.1 20131118

    Scheduled Pinned Locked Moved Plugins
    279 Posts 87 Posters 378.6k Views 87 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TIGT Offline
      TIG Moderator
      last edited by

      @khai said:

      I think it's stored as the VT entries.

      ah yes here we go

      http://local.wasp.uwa.edu.au/~pbourke/dataformats/obj/ - Full OBJ Format Spec

      @unknownuser said:

      vt u v w

      Vertex statement for both polygonal and free-form geometry.
      
      Specifies a texture vertex and its coordinates. A 1D texture
      requires only u texture coordinates, a 2D texture requires both u
      and v texture coordinates, and a 3D texture requires all three
      coordinates.
      
      u is the value for the horizontal direction of the texture.
      
      v is an optional argument.
      
      v is the value for the vertical direction of the texture. The
      default is 0.
      
      w is an optional argument.
      
      w is a value for the depth of the texture. The default is 0.
      

      Thanks - I see it now... wait for update...

      TIG

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        @bagatelo said:

        @chris fullmer said:

        I'm confused Bagatelo. What are you asking? This is a plugin that will import .obj into SU. The inverse would be an .obj exporter.

        Chris

        Yes, I mistake. I have think about EXPORT model with obj file types. But .3ds is very good.

        I try to import this model ( http://www.evermotion.org/modelshop/show_product/sculpture-01-am34/1806/0/0/ ) into sketchup and the plugin don't work properly. Export with 3ds Files from MAX result crash in Sketchup.

        FBX files maybe can be de very best option.

        Since I'm not going to pay $35 for a model of a small statue I can't see how the actual file is structured - looks like it might be very complex though !!! The current OBJ Importersare quite limited...

        TIG

        1 Reply Last reply Reply Quote 0
        • A Offline
          avariant
          last edited by

          Cool, thanks TIG. I've been using Jim's importer for a long time.

          One thing I've encountered with materials. You are assuming that the 'd' tag comes after the Kd tag, but it doesn't necessarily. It can show up anywhere in the list. The obj format doesn't require a specific order. So, if 'd' comes first, the plugin is crashing.

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            Thanks for the info... I'm looking at uv mapping to so a fix might be soon...
            I also need to trap mtl's with a texture but no colour [using texture.average_color if no Kd ?]... I am looking at various fixes and other improvements... Please check out the Ruby Forum over the coming days...

            TIG

            1 Reply Last reply Reply Quote 0
            • K Offline
              Khai
              last edited by

              ok for some reason I'm not getting anything at all.
              it's asking for the measurements, I see it reading lines at the bottom, it asks me if I want to flip Axis...then nothing appears on screen.

              edit : testing an idea. I think it's do to with the choice of measurements. hold on...

              1 Reply Last reply Reply Quote 0
              • K Offline
                Khai
                last edited by

                yup it's metres and kilometres.... looks like it's coming in so tiny you can't see it. (Inches, Feet, yards, Miles, Millimetres, Centimetres are working ok)

                1 Reply Last reply Reply Quote 0
                • K Offline
                  Khai
                  last edited by

                  and I'm happy to report the UVmapping is now spot on πŸ˜„

                  1 Reply Last reply Reply Quote 0
                  • EarthMoverE Offline
                    EarthMover
                    last edited by

                    Tested also and it's working Great!!! Thanks TIG. I tried to import a few Lounge Chairs that I had for Vue in .obj format that crashed SU with the previous importer and the new version handled them flawlessly.

                    3D Artist at Clearstory 3D Imaging
                    Guide Tool at Winning With Sketchup
                    Content Creator at Skapeup

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      I have at last got working - texture mapping, units dialog, YZ-flip, crash avoidance etc etc...

                      Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=172790#p172790

                      Note that the file has been renamed and you need to delete any earlier ones...

                      It's still not perfect, takes ages with large files and large/complex/smoothed objs come out slow/messy/in_need_of_fixing...

                      Feedback please.

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        Khai
                        last edited by

                        ok I'm getting strange results here. some OBJ's just won't import for some reason. Trying to figure it out atm.. the affected OBJ's will load into other app's ok tho, so I'm not sure what the issue could be.

                        Update.

                        the affected OBJ's import with Jim's Ruby ok (apart from flipped Axis and no UVmapping), so it looks like a bug somewhere..

                        want me to send you a copy of one of the affected OBJ's to test with?

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          @khai said:

                          ok I'm getting strange results here. some OBJ's just won't import for some reason. Trying to figure it out atm.. the affected OBJ's will load into other app's ok tho, so I'm not sure what the issue could be.

                          Update.

                          the affected OBJ's import with Jim's Ruby ok (apart from flipped Axis and no UVmapping), so it looks like a bug somewhere..

                          want me to send you a copy of one of the affected OBJ's to test with?

                          Please send... Waht errors do you get in the console etc ?

                          Jim's code for the faces is effectively the same in both versions ??? πŸ˜•

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • K Offline
                            Khai
                            last edited by

                            thats the problem.. I'm not getting any errors (unless I'm doing something wrong the console window is remaining blank).... I'm just not getting the object...

                            the steps I'm getting :

                            select Ruby
                            Select OBJ
                            asked what unit's. (choose at random here)
                            Status bar shows the lines being read

                            here on a file that works I see the OBJ loaded. on a file thats not working, the view jumps, nothing is shown.

                            asked if I want to flip axis. (y/n)

                            no change in scene from start. - this also happens if I choose Metres or kilometers with an OBJ that does work ok. (obj will load as Feet...) the affected OBJ's will load with Jim's original script tho shrug

                            ok.. where do you want me to send the files to? I can't seem to attach them here...

                            1 Reply Last reply Reply Quote 0
                            • TIGT Offline
                              TIG Moderator
                              last edited by

                              @khai said:

                              thats the problem.. I'm not getting any errors (unless I'm doing something wrong the console window is remaining blank).... I'm just not getting the object...

                              the steps I'm getting :

                              select Ruby
                              Select OBJ
                              asked what unit's. (choose at random here)
                              Status bar shows the lines being read

                              here on a file that works I see the OBJ loaded. on a file thats not working, the view jumps, nothing is shown.

                              asked if I want to flip axis. (y/n)

                              no change in scene from start. - this also happens if I choose Metres or kilometers with an OBJ that does work ok. (obj will load as Feet...) the affected OBJ's will load with Jim's original script tho shrug

                              ok.. where do you want me to send the files to? I can't seem to attach them here...

                              Zip the file and attach it to a PM...

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • K Offline
                                Kgon
                                last edited by

                                Hello everyon!!

                                Well,i'm trying this plugin and it seems awesome , but im having a problem with it, after the import nothing shows up..i mean sketchup makes the entire process ( count of the lines) and once SU finish ...nothing is displayed in the screen...it says " x number of lines processed" but the su file is clean as when you open a new file..so...m i doing something wrong? i'm trying importing a XFrog tree ,sometimes su ask me for to flip yz ,sometimes don't but no matter what option i select yes or not nothing works..., any clue ??

                                By the way my xfrog trees are in max ,i open them in max then i export them like an .Obj file format ..Could it be a max exporting issue that don't let the object importer works well with the xported Object??

                                1 Reply Last reply Reply Quote 0
                                • Chris FullmerC Offline
                                  Chris Fullmer
                                  last edited by

                                  In the other importers, once you import a model, you have to then click somewhere in the model to place the imported piece. Try that and see if it helps.

                                  Chris

                                  Lately you've been tan, suspicious for the winter.
                                  All my Plugins I've written

                                  1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    Khai
                                    last edited by

                                    tried that Chris, no go.

                                    with some OBJ's they are just not importing for some reason.. I've sent an example to TIG and I hope he can figure out why...

                                    1 Reply Last reply Reply Quote 0
                                    • K Offline
                                      Kgon
                                      last edited by

                                      Yup , don't go placing it anywhere...let's wait if TIG find the tricky thing,I really hope so because the good 3d vegetation it's very important to achieve realism in renderings,that's why i need this plugin work perfect so bad. πŸ˜„

                                      1 Reply Last reply Reply Quote 0
                                      • Chris FullmerC Offline
                                        Chris Fullmer
                                        last edited by

                                        Another thought, if you have them in Max already, why not export as .3ds?

                                        Lately you've been tan, suspicious for the winter.
                                        All my Plugins I've written

                                        1 Reply Last reply Reply Quote 0
                                        • K Offline
                                          Kgon
                                          last edited by

                                          Hey Chris , It's quite simple. There is a limited number of faces that the .3ds allows per model. The 3ds file format only supports 64 000 faces and the Highly detailed vegetation may contain more than 540 000 and a .obj supports that quantity of faceS. That's why can't converte my trees into .3ds. Well, i could import a Xfrog tree..but ....DAM !! THERE IS NOT TEXTURES...it's not supposed that this .obj Importer would keep the texture cordenates or the UV mapping?? iT WOULD BE IMPOSIBLE TO MAP 540 000 faces PROPERLY with a texture wich is a .tiff Leaf

                                          1 Reply Last reply Reply Quote 0
                                          • TIGT Offline
                                            TIG Moderator
                                            last edited by

                                            Here's v1.3 http://forums.sketchucation.com/viewtopic.php?p=172790#p172790

                                            I've trapped errors stopping most files importing - it works fine for all modestly sized OBJs, though some very complex ones still just won't take the textures - however, since these are added to the model they could be manually applied to the group/faces afterwards...

                                            TIG

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 13
                                            • 14
                                            • 2 / 14
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement