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

    Need Help to Create Useful Obj Files

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    7 Posts 3 Posters 326 Views 3 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.
    • Mistro11M Offline
      Mistro11
      last edited by

      I made some picture frames in Sketchup 8 free version and put some of my paintings in them and saved them as components and obj files via Objexporter Sketchup plugin. But when I look at them in Meshlab and Kerkythea, the frames appear but not the paintings (face that's supposed to have painting texture is the wood texture of the frame). Not sure if I was supposed to save all as PNG or not. I suspect it's a backfaces issue but not sure how to proceed. I think I missed an important step in creating the obj files from Sketchup. What is a normal workflow to get good obj models with textures for use from Sketchup?

      I am currently trying to make a Model Library for Kerkythea.

      i7-4930k @3.4/3.7GHz, 32Gb RAM, NVidia GTX 980Ti 6Gb, Windows 7 Pro 64bit
      Structural Integrity is Not Just Physical...It's in the Design and Purpose

      1 Reply Last reply Reply Quote 0
      • Rich O BrienR Offline
        Rich O Brien Moderator
        last edited by

        The .mtl file that is saved with the .obj can be opened with a text editor. In there you'll find where the .obj hunts for the textures. If you export to .obj into a folder named 'Model_001' in there you should have 'Model_001.obj' and 'Model_001.mtl' plus any textures associated with that model.

        In the .mtl file you should have, for example, 'Wood.png' mentioned as a texture in this type of format...

        map_Kd C;\User\Documents\Model_001\Wood.png
        

        So for MeshLab to open that Textured .obj then you'll need the textures in that location.

        Download the free D'oh Book for SketchUp πŸ“–

        1 Reply Last reply Reply Quote 0
        • Mistro11M Offline
          Mistro11
          last edited by

          Thanks Rich! That info was very helpful. I looked at the .mtl file and the texture folder and identified the problem. The face with the painting was reversed and the wood texture was on the other side which was actually the front face. After reversing the face in SU and thoroughly making sure all the faces were materialized correctly, the model is showing correctly in both Meshlab and Kerkythea. I am still concerned about the existence of backfaces in the future when porting over to other applications like Blender. Is there a clean way to eliminate the back faces? I read somewhere that you end up with double faces. Wouldn't that make the model size bigger than it need to be, especially if it is a large complex model?

          As far as texturing in Sketchup goes, I find myself fighting with materials that I thought I purged out. I replaced the wood texture with a dark grey color. Even after using the Thrupaint plugin, the wood texture was still being reported to be in the model on the curved surfaces of the frame. I ended up deleting the wood texture from the selection window and it was replaced with the default texture. Not sure what that was about.

          i7-4930k @3.4/3.7GHz, 32Gb RAM, NVidia GTX 980Ti 6Gb, Windows 7 Pro 64bit
          Structural Integrity is Not Just Physical...It's in the Design and Purpose

          1 Reply Last reply Reply Quote 0
          • Rich O BrienR Offline
            Rich O Brien Moderator
            last edited by

            @unknownuser said:

            Is there a clean way to eliminate the back faces?

            You can't eliminate a backface only reverse it so it is orientated correctly. Careful modeling to begin is the best practice and use the View > Face Style > Monochrome while modeling to spot any backface issues. Also change the Backface color to something that really stands out like ORANGE as I've found since SU7 the default Backface color is too subtle.

            @unknownuser said:

            I read somewhere that you end up with double faces. Wouldn't that make the model size bigger than it need to be, especially if it is a large complex model?

            There are occasions whereby SU creates duplicate faces that overlap. At times it may even create numerous faces where one face should be. Again careful modeling limits this behaviour. Also Thomthom's CleanUp plugin can hunt down these.

            @unknownuser said:

            I replaced the wood texture with a dark grey color. Even after using the Thrupaint plugin, the wood texture was still being reported to be in the model on the curved surfaces of the frame. I ended up deleting the wood texture from the selection window and it was replaced with the default texture. Not sure what that was about.

            Was the material applied to a group/component? You are able to paint geometry and groups/components too. Also if you have any components in the 'In Model' component browser that have the material applied but not in the modeling work space then this would mean the material would also be in the materials browser too.

            Aidan did a good post on how SketchUp paint applied in different scenarios works...

            http://sketchupdate.blogspot.ie/2011/08/assigning-materials-to-groups-and.html

            Download the free D'oh Book for SketchUp πŸ“–

            1 Reply Last reply Reply Quote 0
            • Mistro11M Offline
              Mistro11
              last edited by

              About eliminating backfaces; I meant in another program after export from Sketchup, not in SU. But I am just speculating at this point. Gonna port the obj into Blender and see what happens.

              @unknownuser said:

              Was the material applied to a group/component?

              Yes I think I did color a group/component trying to save time at one point. I will now change the color of backfaces as you suggest. Great idea....never thought of that. Will be sharing pics of the work soon.

              Thanks again.

              i7-4930k @3.4/3.7GHz, 32Gb RAM, NVidia GTX 980Ti 6Gb, Windows 7 Pro 64bit
              Structural Integrity is Not Just Physical...It's in the Design and Purpose

              1 Reply Last reply Reply Quote 0
              • Rich O BrienR Offline
                Rich O Brien Moderator
                last edited by

                In Blender you can get it to display normals...

                Mistro11.png

                Hit 'N' to bring up the Properties tab and under Display you can tweak the normals display from vertices to faces to both.

                Download the free D'oh Book for SketchUp πŸ“–

                1 Reply Last reply Reply Quote 0
                • michaliszissiouM Offline
                  michaliszissiou
                  last edited by

                  In SU,
                  As suggested already
                  But: Add this -difficult to find these days- ruby.
                  Download it here:
                  http://forums.sketchucation.com/download/file.php?id=86061

                  This will remove inner faces (non manifolds).
                  Very important because:
                  In blender:
                  -Import the obj
                  -edit mode (TAB), [W] menu, remove doubles! This will weld all overlapping vertices automatically.
                  -Hit [ctrl+N], it's the shortcut for fixing normals. (it will be a mess if non manifolds/inner faces exist!)
                  SU UVs are still there and you may edit them in UV editor.

                  TIGs obj exporter is an excellent tool!
                  If you love blender (you should lol) and its new render engine (cycles), it's possible to model in SU only and just import.

                  Some important things to know about blender.
                  -You may wish to re scale SU imported objects. In this case after scale/rotation or other transformations, hit [ctrl+A], this brings up a menu, apply these data transformations. Now, bumps/displacements etc will work correctly.
                  (blender avoids to do this automatically for a good reason, it has to do with its particles/instancing system)
                  -you may face depth clipping in 3d view port. Under N panel / view, clip start-end, here your solution
                  -I suppose, you already edited the default preferences of blender, making it similar to SU.
                  -You already learned the shortcuts of transformations, yes?
                  [G] for move-grab, [G]+[x or y or z] for direction, [G]+[shift+z] for moving in xy plane, etc etc , yes? πŸ˜‰

                  You also learned how to use the excellent snapping methods of blender. If not, ask me. πŸ˜†

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement