All Projects → jtomori → Batch_textures_convert

jtomori / Batch_textures_convert

Licence: mit
🔁 Batch texture conversion to various render-friendly mip-mapped formats

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Batch textures convert

Unicopy
Unicode command-line codepoint dumper
Stars: ✭ 16 (-76.12%)
Mutual labels:  conversion
Cryptii
Web app and framework offering modular conversion, encoding and encryption
Stars: ✭ 971 (+1349.25%)
Mutual labels:  conversion
Darknet2caffe
Convert Darknet model to Caffe's
Stars: ✭ 46 (-31.34%)
Mutual labels:  conversion
Convertpcltocore
17 Steps to Convert your PCL to .NET Standard
Stars: ✭ 10 (-85.07%)
Mutual labels:  conversion
Ssp
C++ CSV parser
Stars: ✭ 30 (-55.22%)
Mutual labels:  conversion
Openexr
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
Stars: ✭ 992 (+1380.6%)
Mutual labels:  vfx
Opentimelineio
Open Source API and interchange format for editorial timeline information.
Stars: ✭ 777 (+1059.7%)
Mutual labels:  vfx
Normalize country
Convert country names and codes to a standard.
Stars: ✭ 60 (-10.45%)
Mutual labels:  conversion
Units Converter
A simple utility library to measure and convert between units
Stars: ✭ 31 (-53.73%)
Mutual labels:  conversion
0xc
Easy base conversion in emacs
Stars: ✭ 42 (-37.31%)
Mutual labels:  conversion
Csprojtovs2017
Tooling for converting pre 2017 project to the new Visual Studio 2017 format.
Stars: ✭ 876 (+1207.46%)
Mutual labels:  conversion
Bib Rdf Pipeline
Scripts and configuration for converting MARC bibliographic records into RDF
Stars: ✭ 27 (-59.7%)
Mutual labels:  conversion
Unity Grabsquares Effect
Unity GrabSquares Effect
Stars: ✭ 39 (-41.79%)
Mutual labels:  vfx
Virtualproduction Vrchat
Multicam Virtual Reality Production Rig + Crane + Overlays for VRChat
Stars: ✭ 18 (-73.13%)
Mutual labels:  vfx
Ut4x Converter
Helps converting old Unreal Tournament maps to new Unreal Tournament 4 game.
Stars: ✭ 46 (-31.34%)
Mutual labels:  conversion
Simple Java Mail
Simple API, Complex Emails (JavaMail smtp wrapper)
Stars: ✭ 821 (+1125.37%)
Mutual labels:  conversion
Vchsm
C++ 11 algorithm implementation for voice conversion using harmonic plus stochastic models
Stars: ✭ 38 (-43.28%)
Mutual labels:  conversion
Delorean
Convert Task to Future, and Future to Task
Stars: ✭ 63 (-5.97%)
Mutual labels:  conversion
Pyaaf2
Read and write Advanced Authoring Format (AAF) files
Stars: ✭ 57 (-14.93%)
Mutual labels:  vfx
Grubo
Audio visual experience with Roland Groovebox MC-101 and the Unity game engine
Stars: ✭ 41 (-38.81%)
Mutual labels:  vfx

Batch Textures Conversion

Batch convert textures to various render-friendly mip-mapped formats


Intro

This tool helps with pre-processing of textures for offline renderers. It can be used from Houdini, Maya, Nuke or as a standalone application.

Renderers usually convert common texture formats (jpg, png, tga..) into more render friendly mip-mapped formats (rat, rs, tx..) which can be a time consuming process. Mainly if the renderer discards the converted texture afterwards and this process gets repeated many times.

It is therefore more efficient to pre-convert them once and let renderers use them.

It can be also used as a batch images converter, e.g. for converting raw photos with dcraw.


Houdini screenshot Ubuntu standalone screenshot Windows standalone screenshot Maya screenshot Nuke screenshot

Screenshots from Houdini, Ubuntu standalone, Windows standalone, Maya and Nuke

You can see video of this tool here.


Installation

  1. Download or clone this repository.

  2. Houdini

    • Add this repository folder into your HOUDINI_PATH environment variable.
    • For example add this line into your houdini.env file:
    HOUDINI_PATH = &;/path/to/this/repo/
    
    • Display Batch Convert shelf in Houdini

    Maya

    • Add ./scripts/python folder from this repository into your PYTHONPATH environment variable
    • For example add this line into your Maya.env file:
    PYTHONPATH=/path/to/this/repo/scripts/python
    

    Nuke

    • Add ./scripts/python folder from this repository into your PYTHONPATH environment variable
    • Add ./nuke folder from this repository into your NUKE_PATH environment variable
    • For example your batch environment file can look like this:
    set "PYTHONPATH=%PYTHONPATH%;/path/to/this/repo/scripts/python"
    set "NUKE_PATH=%NUKE_PATH%;/path/to/this/repo/nuke"
    

    Standalone

    • This tool requires PySide2
    • If missing, then install it for example with pip
      $ python -m pip install pyside2
      

Usage

  • Start the tool
    • Houdini
      • There are two ways of running the tool:
        1. Click on Batch Convert shelf tool
        2. Right-click on string parameter containing texture path
    • Maya
      • Run the following script from script editor or as a shelf tool
      import batch_convert
      gui = batch_convert.runGui()
      
    • Nuke
      • Display Batch Textures Convert pane tab by right-clicking on pane header: Windows/Custom/Batch Textures Convert
      • Houdini screenshot
    • Standalone
      • $ python batch_textures_converter.py
        • you can specify optional --path argument, which will set folder path (see $ python batch_textures_converter.py --help for help)
  • Select a root folder containing textures you want to convert, it will be scanned recursively
    • You can also select/copypaste multiple folders, they will be separated with " /// "
  • Select which input texture formats should be converted
    • For example you could convert only jpegs or pngs
  • Select output texture format
  • Set number of parallel processes to be run
    • Note that it does not scale linearly and at some point you will hit disk/network IO limit
  • Confirm

A few notes

  • This tool works on Linux and Windows. Feel free to test it under and contribute for OS X version. Right now the following output formats are supported:

    • .rat - Mantra (iconvert)
    • .tx - Arnold (maketx)
    • .tx - PRMan (maketx)
    • .rs - Redshift (redshiftTextureProcessor)
    • .tiff - Dcraw (dcraw)
    • .exr - OpenImageIO (oiiotool)

    However it is easy to extend / modify this tool so that it suits your needs. Note that those are only presets. Those tools can handle more formats and can be customized for different cases. Check man pages of the tools for more information.

  • To add new output format, simply implement a new class in scripts/python/batch_convert/converters.py, which inherits from GenericCommand() class. Class is very simple, so it should be straightforward to add your custom output formats.

  • This tool relies on external executables to perform conversion (e.g. iconvert for RAT, maketx for TX...). Make sure that you have them available in your system's PATH variable. If an executable is not found, then it will print a warning and will hide it from the output formats list in gui.

  • batch_convert.runGui() accepts optional argument: path, use it setting default folder path

  • If there are multiple textures with the same name, but different extensions, the tool will pick the one with the highest priority, as specified in ext_priority list in __init__.py

  • Check beggining of __init__.py for configuration


Contributing

Feel free to contribute to this project by creating pull requests or by buying me a beer :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].