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

    Keep material names in collada export

    Scheduled Pinned Locked Moved SketchUp Feature Requests
    sketchup
    9 Posts 4 Posters 11.5k Views 4 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.
    • GaieusG Offline
      Gaieus
      last edited by

      I would like to have an option in the collada (dae/kmz) export to keep/maintain the SU material names. Something like the attached below.

      https://lh5.googleusercontent.com/-lsKKQQ7MsoU/ToRnoqcG1sI/AAAAAAAAGmk/O3jfOn-5cyM/ColladaExport.png

      The reason is: compatibility with third party products. Currently SU, when exporting to collada, renames each material to Material1, Material2 etc. I know the original reason/intention was good: to improve export to GE where non-English characters screwed up materials.

      However this way collada is almost entirely useless in third party applications. When I need to "tweak" a material there, it is often futile to find which material is which by the name.

      Even worse, some applications (would) allow "reloading" the model after some changes were done and when these changes include using new materials, the result is rather unpredictable as SU exports the modified model with the material names often "swapped" when renaming (thus previously grass material now ending up on the roof and roof tiles on the walls etc.)

      An easy solution could be to allow the user to keep the original SU material names (on his/her responsibility if you want, maybe with a warning popup). In this case, Google’s aim at making collada a universal 3D exchange format could even come true - without this, everyone will (and does) discard his possibility.

      Gai...

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

        Not yet to speak of the thousand-texture-pieces for distorted texture coordinates (They make models unusable for rendering).
        As much as I appreciate SketchUp's support for the open Collada standard, but fixing these severe issues would turn SketchUp's sterling cutlery into gold.

        Why not make the generic filenames optional (and turn this option on for kmz export)?
        Why not just replace foreign characters while keeping the filename still readable?
        example: "my ŠketchUp.jpg"
        filename.gsub(/[^0-9a-zA-Z\-\_\.]+/,"_")
        becomes "my_ketchUp.jpg"
        instead of "texture1.jpg"

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

          This is approach is already used in OBJ-exporters - like the v8 one AND mine - to ensure that the file-name AND materials'/textures' names are not going to mess up - still keep the names compliant AND unique but recognizable - otherwise we get
          ` "my ŠketchUp.jpg".gsub(/[^0-9a-zA-Z-_.]+/,"_")

          "my_ketchUp.jpg"AND "my ŞketchUp.jpg".gsub(/[^0-9a-zA-Z-_.]+/,"_")
          "my_ketchUp.jpg"which is NOT what we need... It straightforward to keep a list of materials/textures and if one already exists then the next one becomes say >>> "my_ketchUp1.jpg"`
          This is NOT hard to do, so why it's not been done for DAE yet is a mystery... 😕

          TIG

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            @aerilius said:

            Not yet to speak of the thousand-texture-pieces for distorted texture coordinates (They make models unusable for rendering).

            It's not only the current, "official" collada exporter but can happen with other exporters as well. Only recently Tomasz has overcome this behaviour for the Thea exporter for instance. You can also prevent it if you (pre) triangulate your mesh prior to exporting (collada will triangulate anyway so you will not add extra polygons)

            Gai...

            1 Reply Last reply Reply Quote 0
            • GaieusG Offline
              Gaieus
              last edited by

              Aerilius: I see you are faster at fulfilling feature requests than the Googlers!
              😄

              http://forums.sketchucation.com/viewtopic.php?f=323&t=40397

              Gai...

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

                Gaieus: I had a similar method in my KML tools. So it was only a little change and wrapping into a plugin. I hope this will not be accepted as a "fullfilled" feature request 😉
                Actually it is not a solution, because it exports all materials a second time and then afterwards manipulates the exported collada text file.

                Another point to think about:
                material's screen name or original texture filename? (SketchUp remembers each texture image's original file path)

                1 Reply Last reply Reply Quote 0
                • GaieusG Offline
                  Gaieus
                  last edited by

                  I guess best would be the SU "screen name" as

                  • most users never meet the original image file name anyway* and this is also what you can modify easily in SU when it is needed. Now as for the technical details; you know how much I understand those... 😢

                  Gai...

                  1 Reply Last reply Reply Quote 0
                  • I Offline
                    Irteza
                    last edited by

                    Dear, I am a beginner and using Sketchup. The issue is that I just installed the plugin and started exporting the .dae file, but still texture names are renamed as _auto_1....... and so on. I am using Sketchup 2017 and Windows. So do i need to edit .rb plugin file or there is something wrong.

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

                      @Irteza

                      What Plugin are you referring to ?***
                      DAE export is a standard built-in format ??
                      You can set up how the exported file is made using the Options in the File>Export[3d] dialog...

                      This is a very old thread...
                      Please [re]explain what you are doing step-by-step...

                      ***I see you double posted !
                      Again that's an old thread...
                      Try running it with the Ruby Console open and report errors...

                      I suggest you consolidate your posted into the plugin's thread...

                      TIG

                      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