• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Slender - Baking textures in Sketchup with Blender

Scheduled Pinned Locked Moved Developers' Forum
29 Posts 7 Posters 13.6k Views
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.
  • J Offline
    JQL
    last edited by 30 Apr 2017, 20:45

    And how will you make the material assignement?

    Material code names? Like Glass, Metal, Wood and the likes? Or you won't get into material properties?

    www.casca.pt
    Visit us on facebook!

    1 Reply Last reply Reply Quote 0
    • Q Offline
      qpik
      last edited by 30 Apr 2017, 21:41

      @jql said:

      And how will you make the material assignement?

      Material code names? Like Glass, Metal, Wood and the likes? Or you won't get into material properties?

      I don't know yet, maybe. Or a class for managing materials in SU and exported to COLLADA. Probably the first solution would be easier to extend with external material libraries.

      Specularity/bump etc. are worth supporting but reflections/refraction can't be really baked, so its no use going too much into detail.

      1 Reply Last reply Reply Quote 0
      • J Offline
        JQL
        last edited by 30 Apr 2017, 22:36

        Well, I think it'll be nice if you pull it off. I wish you good luck and I'm following the thread.

        www.casca.pt
        Visit us on facebook!

        1 Reply Last reply Reply Quote 0
        • G Offline
          gio
          last edited by 1 May 2017, 01:02

          @jql said:

          Well, I think it'll be nice if you pull it off. I wish you good luck and I'm following the thread.

          +1

          Ciao,
          Gio

          1 Reply Last reply Reply Quote 0
          • F Offline
            filibis
            last edited by 3 May 2017, 12:26

            Hi qpik, this will definetely be a useful plugin and worth developing i believe.

            Couple of things to note; i didn't know how to load a plugin via SU Console (assuming you meant Ruby Console?) and i found out i needed to type this with inverted commas: Load 'slender.rb'
            You may consider to add info considering newbies to plugin world like me πŸ™‚ even at this stage to be able to test.

            @qpik said:

            @jql said:

            So tell me one thing. Slender exports to blender does it all by itself and imports it back baked?

            Exactly.

            That just didn't work for me.
            I opened your file and run the plugin via Ruby console and received the 'true' result but there is no COLLADA (.dae) file in the folder (there are textures exported though). And seems nothing happened.
            Am i doing something wrong? If you could demonstrate with .gif or video, that would be great.

            1 Reply Last reply Reply Quote 0
            • Q Offline
              qpik
              last edited by 3 May 2017, 14:02

              Have you unpacked the whole 'slender' folder from the zip file?
              Do you have blender installed? Maybe the installation path is different than mine (C:\Program Files\Blender Foundation\Blender\blender.exe), check slender.bat in the 'slender' folder.
              In sketchup open Ruby Console and type

              load 'C;/../../slender/slender.rb'
              

              with the actual path.

              1 Reply Last reply Reply Quote 0
              • F Offline
                filibis
                last edited by 3 May 2017, 14:54

                @qpik said:

                Have you unpacked the whole 'slender' folder from the zip file?
                Do you have blender installed? Maybe the installation path is different than mine (C:\Program Files\Blender Foundation\Blender\blender.exe), check slender.bat in the 'slender' folder.
                In sketchup open Ruby Console and type

                load 'C;/../..slender/slender.rb'
                

                with the actual path.

                Yes, unpacked, have Blender (2.78c) on default location.
                But i found out that .dae and .log files are in my default plugin location (...\AppData\Roaming\SketchUp\SketchUp 2017\SketchUp\Plugins). So appearently my problem was copying 'slender.rb' file to that location in order to make the command (load 'slender.rb') work.

                Now i tried your new code line with my path and it did some CMD stuff and received 'true' result on Ruby Console. But seems there is no imported result in SU. I tried importing that 'overwritten' .dae file but they seem identical. What should i expect at this point? Is it going to import baked result to side of the original model (as you show in first post)?

                1 Reply Last reply Reply Quote 0
                • Q Offline
                  qpik
                  last edited by 3 May 2017, 15:27

                  @filibis said:

                  What should i expect at this point? Is it going to import baked result to side of the original model (as you show in first post)?

                  The result should be the same as after importing COLLADA, a model ready to be placed in SU, but with shadows baked.
                  If you add

                  pause
                  

                  at the end of slender.bat you should be able to see any blender errors.

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    filibis
                    last edited by 3 May 2017, 17:40

                    Well, i got home and i tried on my laptop, it worked like a charm!
                    I will see tomorrow what causes problem in the office computer (only difference is that's Windows 7 64-bit).


                    Then i created my own scene, it worked pretty well too.
                    Except when i tried to experiment with some interior scenes. See attachment for faulty result. It's completely dark inside (with some light artifacts).


                    Original Model vs Baked Result


                    baked_result_comparison_v2013.skp

                    1 Reply Last reply Reply Quote 0
                    • Q Offline
                      qpik
                      last edited by 3 May 2017, 18:42

                      Simple triangulation issue in slender.rb (you should see HOLES NOT SUPPORTED in Blender console).

                      triangulated_faces => true
                      

                      Fixed and reuploaded whole package. Result:

                      baked_result_comparison_v2013_qpik.jpg
                      baked_result_comparison_v2013_qpik.skp
                      After tweaking slender.blend scene (Environment Lighting Raytrace -> Approximate) which you can try with your own settings:
                      baked_result_comparison_v2013_qpik_1.jpg
                      baked_result_comparison_v2013_qpik_1.skp

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        filibis
                        last edited by 3 May 2017, 19:59

                        Hmm, i see now better.
                        So, can we say it's not that suitable for interior stuff? Or is it possible to add other light types in addition to sun into baking process?

                        1 Reply Last reply Reply Quote 0
                        • Q Offline
                          qpik
                          last edited by 3 May 2017, 20:19

                          @filibis said:

                          Hmm, i see now better.
                          So, can we say it's not that suitable for interior stuff? Or is it possible to add other light types in addition to sun into baking process?

                          It's all a matter of translating objects from SU to Blender, then everything is possible.

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            JQL
                            last edited by 3 May 2017, 20:28

                            qpik, you're using cycles or is this blender internal?

                            www.casca.pt
                            Visit us on facebook!

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              Rich O Brien Moderator
                              last edited by 3 May 2017, 21:16

                              @qp

                              fantastic idea. Can't get it going yet so subscribing so I can flag updates

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

                              1 Reply Last reply Reply Quote 0
                              • Q Offline
                                qpik
                                last edited by 3 May 2017, 21:47

                                @jql said:

                                qpik, you're using cycles or is this blender internal?

                                So far internal, why do you ask?

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  JQL
                                  last edited by 3 May 2017, 22:15

                                  Out of curiosity. I've seen great things coming from cycles and heard it's improving very fast.

                                  Who knows where this plugin will lead so, maybe cycles would be a good bet.

                                  www.casca.pt
                                  Visit us on facebook!

                                  1 Reply Last reply Reply Quote 0
                                  • F Offline
                                    filibis
                                    last edited by 4 May 2017, 18:19

                                    @filibis said:

                                    I will see tomorrow what causes problem in the office computer

                                    I tried again in the office today, i noticed this code was missing in slender.bat

                                    %~dp0\slender.blend
                                    

                                    (see attachment) I don't remember deleting it, maybe downloaded the .zip yesterday before you update or something idk 🀣
                                    So i downloaded .zip again today, it worked fine. πŸ‘


                                    slender_blend_missing.jpeg

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      Pixero
                                      last edited by 5 May 2017, 08:32

                                      A couple of question.

                                      How does the geometry look when imported back into SketchUp?
                                      Is it grouped the same?
                                      Are the components intact?
                                      Is the geometry triangulated or as it was originally in SU?

                                      1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        filibis
                                        last edited by 5 May 2017, 11:44

                                        @pixero said:

                                        How does the geometry look when imported back into SketchUp?
                                        Is it grouped the same?
                                        Are the components intact?
                                        Is the geometry triangulated or as it was originally in SU?

                                        Seems it imports one component that contains the whole geometry and everything inside exploded. Also triple clicking only select ones that shares the same material. See below for gif demonstrations.

                                        Triangulation and other export features are optional (see attachment). (But making "preserve_instancing => true" doesn't seem to be working)

                                        https://gifyu.com/images/slender_demonstration.gif

                                        https://gifyu.com/images/slender_demonstration_tripleclick.gif


                                        export_collada.JPG

                                        1 Reply Last reply Reply Quote 0
                                        • Q Offline
                                          qpik
                                          last edited by 5 May 2017, 13:00

                                          Unless I'm missing something there's no combination of COLLADA import/export settings in SU and Blender that would keep components. It's just how those exporters/importers work.

                                          Triangulation solves issue with holes in faces, which are not supported, as far as I learned, in Blender.

                                          The real question is whether keeping component structure is really necessary, I doubt it.

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

                                          Advertisement