[ New Plugin ] Texture To Shader Conversion Command

RuudLRuudL Posts: 199
edited April 2023 in Carrara Discussion

This plugin converts all the textures of a folder into shader browserfiles. It will create one browserfile for each texture. The texture will be put in the color-channel of a multi-channel shader and saved in the browser under the Shaders tab in the sub-folder 'Converted Textures' of 'My Shaders'.

The plugin is a scene command and it can be found in the 'Edit->RuudL' menu.

Only imagefiles are supported. All other files, including sub-folders, will be ignored.
More information is available in the ReadMe file that's included in the download file.

It's been developed, build and tested on both macOS 10.12 and Windows 11 (x64 only)

You can obtain the plugin from my SourcForge page: https://sourceforge.net/projects/carrara-plug-ins-adventures/files/

The source code is also available for download.
It's Free Software under the GNU GPL v3 license.


Thank-you to Bunyip02 for the inspiration for creating this plug-in.

 

PreviewScreenSnapz006.png
690 x 163 - 88K
PreviewScreenSnapz005.png
784 x 196 - 63K
Post edited by RuudL on

Comments

  • SileneUKSileneUK Posts: 1,975

    RuudL Ooooh.... what a lovely thing to do for us Carrarians!  You are a star!

    heartkissyes Silene

  • Steve KSteve K Posts: 3,246

    I agree with Silene, this looks great.  Many thanks.  In my animations, I find the Shaders tab is a great resource.

  • StezzaStezza Posts: 8,133

    thanks @RuudL

    works as described... would be helpful if you could select an output folder rather than a default one as some users don't use the OS drive for content..

    great idea though and doesn't take me awfully long to rename the folder and move it to another drive .. thanks for your efforts yes

  • Bunyip02Bunyip02 Posts: 8,712

    Thanks again RuudL, great time saver !!!

    Stezza - Copy then paste, followed by delete are your friends !!!

  • DiomedeDiomede Posts: 15,188

    Thank you, @RuudL. Much appreciated.  I am traveling but can't wait to get a chance to try it out.yes

  • RuudLRuudL Posts: 199
    edited April 2023

    You are all most welcome!  I hope you find it useful.

    @Stezza A user defined output folder was part of my original design. But during development I find easier to first use default values to get the plugin working. To prove the concept. I will look into your request.

    Let me known if any of you have more suggestions for improvement.

    BTW there might be a problem if the basename (the name without the extension) of 2 or more textures are the same (e.g. abc.jpg and abc.png)  In the current plugin version both will get the same browser filename, thus the first one will be overwritten by second one. I'm thinking about adding the extension to basename of the browser file. Thus abc.png becomes abc-png.cbr Question: Is that acceptable for your usage?

     

    Post edited by RuudL on
  • HeadwaxHeadwax Posts: 10,013

    RuudL said:

    You are all most welcome!  I hope you find it useful.

    @Stezza A user defined output folder was part of my original design. But during development I find easier to first use default values to get the plugin working. To prove the concept. I will look into your request.

    Let me known if any of you have more suggestions for improvement.

    BTW there might be a problem if the basename (the name without the extension) of 2 or more textures are the same (e.g. abc.jpg and abc.png)  In the current plugin version both will get the same browser filename, thus the first one will be overwritten by second one. I'm thinking about adding the extension to basename of the browser file. Thus abc.png becomes abc-png.cbr Question: Is that acceptable for your usage?

     

     

    wonderful!! thanks so much, looks really terrific :) and handy!

     

  • RuudLRuudL Posts: 199
    edited April 2023

    I've just uploaded a new version of the TextureToShader plugin and its sourcecode.

    What's new:
    1) on invocation a window is displayed. On it an Input Folder and an optional Output Folder can be selected.
    2) the original imagefile extension is now included in the shader filename (eg abc.png -> abc-png.cbr).

     

    Have Fun!

    PreviewScreenSnapz0050.png
    691 x 412 - 76K
    Post edited by RuudL on
  • Bunyip02Bunyip02 Posts: 8,712

    Thanks !!!

  • HeadwaxHeadwax Posts: 10,013

    RuudL said:

    I've just uploaded a new version of the TextureToShader plugin and its sourcecode.

    What's new:
    1) on invocation a window is displayed. On it an Input Folder and an optional Output Folder can be selected.
    2) the original imagefile extension is now included in the shader filename (eg abc.png -> abc-png.cbr).

     

    Have Fun!

    thanks once MORE!

  • RuudLRuudL Posts: 199

    My pleasure.

Sign In or Register to comment.