Export Custom Channel Selection

Features ›› Functionality & Tools ›› Channels ››
Parent Previous Next

Export Custom Channel Selection by Jorel Latraille , extended by Jens Kafitz




               







Export Custom Channel Selection is a new Export Mode available in MARI that allows you to batch export a custom list

of channels from multiple different objects.


It has all options to completely replace all other channel export modes with the addition of some

others that have not been previously available.





Extension Pack 3 Exporter Updates



Export Modes


Will export all Patches from the marked channels. Works across multiple objects if you choose to.


If Only Modified Textures Checkbox is active, only patches that have been modified since the last

export will be exported (requires at least one export with option turned on)


Will export only selected Patches from the marked Channels. Works across multiple objects if you choose to.


Export Selected Patches will ignore the Only Modified Textures Checkbox and force export the Selected Patches



Options


The Export Path. This will default to the path defined as default for Exporting Textures.

You can modify standard paths with the Set Project Paths tools.


The Path Field supports creation of non-existing subfolders.

If you enter a subfolder that does not exist the tool will create it for you (after a user confirmation).


The Path Field supports multiple Variables that you can put into Folder Names. The tool will create the folders

for you automatically.



$ENTITY

Any variable named $ENTITY will be replaced with the Object Name


$CHANNEL

Any variable named $CHANNEL will be replaced with the Channel Name


$LAYER

Any variable named $LAYER will be replaced with the currently exported Layer Name

Please note when exporting Flattened, $LAYER Variables are replaced with 'flattened'.


$UDIM

Any variable named $UDIM will be replaced with the the current UV Index/Patch Number (1001,1002 etc.)


$FRAME

If you have keyframes defined on a layer and are exporting a framerange, $FRAME will be replaced with

the number of the closest keyframe.



The Template for the File Name(s) that will be created.


If the tool was launched via Channel/Export this will default to the template defined for Layer Export,

if launched via Channel/Export Flattened this will default to the template defined for flattened Exports.


You can set default Templates via the Set Project Path Tools.


Folder creation is supported here as well so entering a string such as


mydiffuse/$CHANNEL.$UDIM.ext


would place your files in a subfolder mydiffuse/


The Template Field supports multiple Variables that you can put into Folder Names and the File Name.

The tool will create the necessary folders for you automatically.



$ENTITY

Any variable named $ENTITY will be replaced with the Object Name


$CHANNEL

Any variable named $CHANNEL will be replaced with the Channel Name


$LAYER

Any variable named $LAYER will be replaced with the currently exported Layer Name

Please note when exporting Flattened, $LAYER Variables are replaced with 'flattened'.


$UDIM

Any variable named $UDIM will be replaced with the the current UV Index/Patch Number (1001,1002 etc.)


$FRAME

If you have keyframes defined on a layer and are exporting a framerange, $FRAME will be replaced with

the number of the closest keyframe.




This will reset your File Template to what was set on project creation.


By default the Channel List will only display channels from the currently selected object.

Activating the 'List all Objects' Option will show all Channels project-wide in the list.


Same option as is available in the Export Menus, it will export all Channels (flattened or unflattened) for all Objects


A new option that will check if a Channel has been modified since last export.

Please note that this only works if the channels have been exported via this dialog at least once.

New Metadata is added to the Channel on first export that changes based on Channel changes.

(new paint,new layers etc.)



Only Modified Textures Export


For this option to work properly, the selected channels need to have been exported at least once

via the Export Custom Channel Selection Dialog with the Modified Textures Export turned on.




If a Post Process has been defined, it will be run after each Channel export.


Will flatten your Layerstacks for export. If turned off you will export one file per udim per layer.


If the tool was launched via Channel/Export this will be off by default,

if launched via Channel/Export Flattened this will be on by default.


Will run a Patch Bleed process during export of your channels. Please note disabling this

does not necessarily remove all Patch Bleed since Mari does apply Patch Bleed many times

while working with a channel / layerstack


If enabled any UDIM that has not been edited and only has a constant color applied, Mari will export as a 8x8 pixel

Map. If turned off UDIMs will be exported at full resolution regardless of content.


Will strip out any Transparency from exported Channels.


This will allow you to export channels at different resolutions than they exist in your Mari project.

The original channel will not change. Available options are



This option will default to Full Resolution whenever you launch the tool to avoid mistakes.






Export Resolutions with Modified Texture Mode turned on


The 'Export Modified Textures' only monitors your full sized channel.

It will not register changes done via the Export Resolution Options.


For Example:

- You have exported a Channel at Full Resolution with 'Modified Textures' turned on.

- Without making a change to the Channel you try to export it again, this time with

  half resolution.


In this case the export will assume that nothing has changed and not export any textures.

For the export to work in that case you would need to untick the 'Modified Textures' checbox.



Post Processing


Post Processing allows you to specify commands or scripts that should be executed after a channel is exported.

This can be used for example to:



Any command that can be run via a dos prompt or shell can be executed and a variety of variables

can be passed to the command from the Custom Channel Exporter Tool.


Activating Post Processing


Post Processes are setup using the Post Process Dialog accessible via a button at the bottom left

of the Export Custom Channel Selection Dialog


Post Processing is only applied to exported Channels if the 'Execute Post Process Commands' Checkbox

in the Export Custom Channel Selection Dialog has been checked:



Post processing is run on a per channel basis meaning that all files of a channel will be exported first before

the specified post process will be triggered.


Setup Post Processing


Post Processes are setup using the Post Process Dialog accessible via a button at the bottom left

of the Export Custom Channel Selection Dialog:




You can setup up to 3 different processes to be launched after an export.



Each process has the same UI fields


Process On/Off


Activates or deactivates a process. Please note in order to run post processes the Execute Post Processing Commands

checkbox in the Main Export Custom Channel Selection Dialog needs to be ticked as well.


Executable Field


The executable field should contain the path + filename of a program to execute such as



Arguments Field


The Arguments field should contain any arguments or flags you want to pass to the application in the

Executable field.


You can use several placeholder variables to pass information about the exported files to a program.

Variables are case-sensitive:




If the String $FILENAME is used in the Argument field it will be replaced with the full filename of each exported Texture.

The Filename includes the File extension

The Variable is available in perFile Mode only.


Diffuse.1001.tif

Diffuse.1002.tif

.

.



If the String $FILENAME_NOEXT is used in the Argument field it will be replaced with the full filename of each exported Texture.

The Filename will not include the File Extension

The Variable is available in perFile Mode only.


Diffuse.1001

Diffuse.1002

.

.



If the String $FULLPATH is used in the Argument field it will be replaced with the full path and filename of each exported Texture

The Filename includes the File Extension.

The Variable is available in perFile Mode only.


c:\temp\export\Diffuse\Diffuse.1001.tif

c:\temp\export\Diffuse\Diffuse.1002.tif

.

.



If the String $FULLPATH_NOEXT is used in the Argument field it will be replaced with the full path and filename of each exported Texture

The Filename will not include the File Extension.

The Variable is available in perFile Mode only.


c:\temp\export\Diffuse\Diffuse.1001

c:\temp\export\Diffuse\Diffuse.1002

.

.



If the String $DIRECTORY is used in the Argument field it will be replaced with the full path of each exported Texture


c:\temp\export\Diffuse\

c:\temp\export\Diffuse\

.

.



If the String $DIRECTORY_NOSLASH is used in the Argument field it will be replaced with the full path of each exported Texture,

without a trailing slash


c:\temp\export\Diffuse

c:\temp\export\Diffuse

.

.



Per Channel / Per File


The 'Per Channel' and 'Per File' Settings determine how many times the process is run:



Per File will execute the post process once per exported File.

If for example you are exporting a channel with 6 UDIMS the post process will be triggered 6 times.



Per Channel will execute the post process once per exported Channel

If for example you are exporting  one channel the post process will be triggered only once (per channel) regardless of how

many UDIMS are exported.




Max Parallel running post processes:


The Max Processes Setting allows you to specify how many simultaneous Post Processes the tool is allowed to run.

This setting is useful to prevent your system from being overloaded with running post processes (think mipmapping 100 UDIMs at the same time ..)

Post Processes for each channel will be queued if the maximum count of processes is already running and the next one

will only launch once a free slot becomes available.


This setting will default to 2x your CPU count.


Examples


Converting Files to Mental Ray MAP format



Executable: c:\Program Files\Autodesk\Maya2013\mentalray\bin\imf_copy.exe

Arguments: $FULLPATH $FULLPATH_NOEXT.map


In this example the Post Process is used to automatically create .map files from the exported Textures:



Converting Files to different Naming Convention



Executable: perl (alias defined for c:\program files\perl\perl.exe)

Arguments: d:\textures\Maprename\maprename -s $DIRECTORY mari zb


In this example the Post Process is used to automatically convert exported textures to a different naming convention using the

maprenamer perl script


convention (mari zb) and the $DIRECTORY Variable which will be automatically replaced with the directory path to your exported channel files.



Chaining Processes



Executable (1): C:\Program Files\Autodesk\Maya2013\mentalray\bin\imf_copy.exe

Arguments (1): $FULLPATH $DIRECTORY_NOSLASH\zbrush\$FILENAME_NOEXT.map


Executable (2): perl (alias defined for c:\program files\perl\perl.exe)

Arguments (2): d:\textures\Maprename\maprename -s $DIRECTORY_NOSLASH\zbrush\ mari zb


In this example the Post Process is used to automatically convert exported textures to .map format in a different folder,

then convert the map files to a different naming convention using the maprenamer perl script


The target .map file is named dynamically by using the $FILENAME_NOEXT Variable which gets replaced with the original Filename without Fileextension.

The target .map files ares generated in a subfolder 'zbrush' of the original folder the Textures were exported to.

The original folder location is substituted for the $DIRECTORY_NOSLASH variable which returns the path to your exported textures without

a trailing backslash.


convention (mari zb) and the $DIRECTORY_NOSLASH Variable which returns the path to your exported textures without

a trailing backslash. The subfolder for the .map files is manually amended using \zbrush\.





Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor