sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Writing material thumbnails

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 89 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.
    • Y Offline
      ymalaika
      last edited by

      I'm using Material.write_thumbnail to create image files of materials but am running into a couple issues when materials have textures.

      First, it does not seem to take material colorization into account in the written thumbnail file.

      Second, it will fail if the texture thumbnail size is larger in pixelsize than the material texture. I can get around this one by checking the texture size first.

      Does anyone anyone happen to know a way around the first issue besides applying my own colorization?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Does TextureWriter do what you need?

        Hi

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

          Material.write_thumbnail is bugged in its design. If I remember it preserves the aspect ratio but exports the largest dimension no larger than 128px (or something, at least the cause why it fails most of the times is when one dimension is rounded to 0). I'm still searching for the detailed forum post and bug report on this.

          Don't use it, but use Jim's suggestion with a material applied to a group. It will retain the color shift and colorized properties.

          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