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

      Kristoff

      Can you PM me the OBJ/MTL etc [zipped].
      I'd like to see if I can find out the cause anyway... πŸ€“

      TIG

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

        Kristoff

        I got the 'Ford' OBJ file by PM.
        It imported fine for me... IF I set the units to 'meters' - it also then comes in at the correct 'size'!
        If you use 'mm' it is tries to make some edges that are 1000 times too small 0 as you might have seen in other threads that guarantees that geometry fails to be made. SUp / OpenGL doesn't like anything smaller than about 0.1mm...
        The importer reads the OBJ file's 'header' and if it has 'units=' in it then that is given as the default displayed in the dialog as it starts, otherwise it defaults to 'inches'.
        In the case of this 'Ford' OBJ there's no header info at all, so you need to take a guess - trying larger scale units should always make geometry as the 0.1mm is never likely but of course the imported object might then be the wrong 'size'.
        Meters are a common unit in non-US made OBJs...
        So, panic over - try it in 'meters' and it should work fine... πŸ€“

        TIG

        1 Reply Last reply Reply Quote 0
        • KrisidiousK Offline
          Krisidious
          last edited by

          damn counting with 10's burned me again... (hits self in head meter not millimeter!)

          awesome plugin. I also love the groupstoobj.rb ...

          By: Kristoff Rand
          Home DesignerUnique House Plans

          1 Reply Last reply Reply Quote 0
          • E Offline
            eloiraiol
            last edited by

            Because the images do not appear in the trial, only show the textures in SketchUp itself. Where is a picture is blank!

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

              @eloiraiol said:

              Because the images do not appear in the trial, only show the textures in SketchUp itself. Where is a picture is blank!

              Please explain your problem another way... I don't understand πŸ˜•

              TIG

              1 Reply Last reply Reply Quote 0
              • W Offline
                wyatt
                last edited by

                I'm stepping into an area that I don't fully understand, so hopefully this question makes sense. I would like to import an obj with vertex colors turned on. I have a tcs file that I believe contains the vertex color data, but the obj and mtl don't appear to reference that file at all. I haven't found much searching Google for the tcs file format. Is it possible to import vertex colors into SU?

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

                  @unknownuser said:

                  I'm stepping into an area that I don't fully understand, so hopefully this question makes sense. I would like to import an obj with vertex colors turned on. I have a tcs file that I believe contains the vertex color data, but the obj and mtl don't appear to reference that file at all. I haven't found much searching Google for the tcs file format. Is it possible to import vertex colors into SU?

                  Not with this tool - it only imports 'faces' with their colors/textures - not even raw 'edges'...

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    Vertex colours, the connected face should have a surface that blends the colour from each vertex?

                    Thomas Thomassen β€” SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • W Offline
                      wyatt
                      last edited by

                      Yes, that's the idea.

                      1 Reply Last reply Reply Quote 0
                      • majidM Offline
                        majid
                        last edited by

                        thanx again TIG πŸ‘ now I can play with sculptris + SU

                        My inspiring A, B, Sketches book: https://sketchucation.com/shop/books/intermediate/2612-alphabet-inspired-sketches--inspiring-drills-for-architects--3d-artists-and-designers-

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

                          @unknownuser said:

                          I'm stepping into an area that I don't fully understand, so hopefully this question makes sense. I would like to import an obj with vertex colors turned on. I have a tcs file that I believe contains the vertex color data, but the obj and mtl don't appear to reference that file at all. I haven't found much searching Google for the tcs file format. Is it possible to import vertex colors into SU?

                          Wyatt, where di you get the "tcs" file? I think I know what you're asking, but I have not seen any tcs file at any point. I'm scheming some things right now along these lines.

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

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wyatt
                            last edited by

                            Hey Chris. Yes, the tcs file comes from tree[d]. I'm not at my computer right now, but from what I remember it's a series of rgb values that I believe tree[d] uses to compute the color variations in the leaves. It would be great if you are figuring out a way to use that data in SU. Let me know if I can help.

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              pibuz
                              last edited by

                              +1 to Wyatt's request! Could be very useful using Tree[d] trees!

                              WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                              1 Reply Last reply Reply Quote 0
                              • Z Offline
                                zubenelgennubi
                                last edited by

                                thank you so much!!!!!

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  rattusNOR
                                  last edited by

                                  worked very well... thanks!!

                                  1 Reply Last reply Reply Quote 0
                                  • 3 Offline
                                    3deviator
                                    last edited by

                                    hellow TIG, i got some problem using this plug-ins. i don't know if the import OBJ plug-ins have a problem or the software i used. I use Frecle tree[d] 3.1 its a free tree generator software to generate tree and export it to .obj file and then import it to sketchup pro 8 using Import OBJ. when i finish importing it, the tree has no texture even i use import OBJ[with texture]as seen in the pictures. whats the problem for it TIG? Anyways, heres the link for tree[d]3.1 software http://www.frecle.net/index.php?show=treed.about . It is great help to us if you can fix this one, we can generate trees and load it to sketchup. hope you will reply this post, thanks.


                                    Exported files


                                    imported files to sketchup

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

                                      3deviator

                                      The fault isn't with OBJimporter itself but rather with the 'tree[d]' OBJ exporter.
                                      It makes a OBJ file describing the geometry and a MTL file describing the materials but fails to export the image files to which the MTL file refers.
                                      If you open the MTL file with notepad you'll see some image files specified at the end of each material definition - e.g. map_Kd wood03.png
                                      These image files are in the tree[d] 'Textures' folder - typically it's C:\Program Files\gile[s]\plugins\tree[d]\Textures
                                      Copy the missing image files from that folder to the folder into which you have exported your OBJ/MTL files.
                                      Now your image OBJ file imported into a SKP 'with Textures' will have the textures applied...
                                      Now for the rub! The exported/imported tree[d] is relatively 'useless' !!! It has single sided leaf faces and the texture is only applied to the front faces, so all of the backs show as the default back color - usually a blue/gray AND the leaf faces have visible edges and a diagonal line across the middle.Unfixed SKP
                                      BUT there is a way to fix these issues... β˜€
                                      Put the attached script [ FixtreeD.rb] into ../Plugins folder and reopen the SKP with the tree in it, so that the script is loaded.
                                      Now edit the group containing the tree and type FixtreeD.new into the Ruby Console (it runs on all entities in the current context, so DON'T use it outside of the tree group's edit).
                                      All coplanar edges will be removed.
                                      All other edges are hidden, and no longer cast/receive shadows.
                                      The leaves' front materials are copied to their backs.
                                      Hidden Geometry is switched 'off'.
                                      Progress is reported in the Status Bar and Ruby Console
                                      It can take some time to process a complex tree that has 1000s of partsPut into ..Plugins folder... The attached zip file contains a tree[d] exported OBJ/MTL AND the required images listed in that MTL [but not exported by tree[d]!], it also contains the imported OBJ tree showing the problems...Examples This image shows what the 'fixed' tree looks like with the edges/back_faces etc sorted...Example of 'fixed' SKP

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • pilouP Offline
                                        pilou
                                        last edited by

                                        TIG is Mac Gyver! πŸ‘

                                        http://img.over-blog.com/500x500/0/06/68/87/Le-couteau-de-Mac-Gyver.jpg

                                        Frenchy Pilou
                                        Is beautiful that please without concept!
                                        My Little site :)

                                        1 Reply Last reply Reply Quote 0
                                        • honoluludesktopH Offline
                                          honoluludesktop
                                          last edited by

                                          I'm guessing that's a render of a made-up model? If so, add a zip-gun, wrap it into a bracelet, and represent it:-)

                                          1 Reply Last reply Reply Quote 0
                                          • 3 Offline
                                            3deviator
                                            last edited by

                                            Thanks for your reply TIG, this is very nice script, its a Great Help. Thanks a lot. It works fine although it took too long in processing but you will also satisfied with the output. I'm very impress of what you did TIG,your truly "The Incredible Giant".

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

                                            Advertisement