Scripts used to handle .sbs files to generate textures on various formats, including preview files and zipped packages. Used to deliver different packages to several destinations
Go to file
2024-05-23 11:34:11 +02:00
example Deleting Presets files, now useless 2024-05-22 17:28:34 +02:00
.gitattributes Enabling Git LFS for big files - adding png and .blend files 2021-12-15 22:18:27 +01:00
.gitignore Adding untracking source folder 2021-12-21 12:44:36 +01:00
global-config.mk Some cleaning 2024-05-23 11:34:11 +02:00
LICENSE Add LICENSE - GNU A-GPL 2021-12-15 22:21:23 +01:00
Makefile Using xmlstarlet instead of SAT tools to retrieve information from sbs files 2024-05-22 17:24:10 +02:00
Makefile_export Adding a subfolder based upon Textureset name for export destination - Close #13 2022-02-14 23:03:20 +01:00
Makefile_previews Adding recipe variable construction for preview building - Now the previews are made according to the content of the folder named in the json file for each texture set - No more need of master blender file 2021-12-22 00:16:54 +01:00
Makefile_subformats Adding first batch of Makefiles 2021-12-15 21:55:20 +01:00
README.md Using xmlstarlet instead of SAT tools to retrieve information from sbs files 2024-05-22 17:24:10 +02:00

Factory to handle Substance files to distribute content

This repository use Git LFS.

Structure of sbs files

Your preset should be written without any space in their label.

For now, the script export only the first graph of each file.

Organisation of a factory

Configuration of the Makefile

The file global-config.mk contains configuration informations about paths to sources, executables and to the building destinations. It details all the variables which can be set. Be aware that it shouldnt be modified, as it can receive new variables in the future needed for the script to work and concerns only example files included with the script. Moreover it is handled by git for new versions and any changes you make would be erased by new pull of the script. To specify dedicated values to any variable, you should copy its line definition to a new file in the same folder, called local-config.mk. Like this, you will keep your local configuration files in the future with new versions of the script. You will have to do it at least to take in charge your personal data and not the example content given.

Simply write either the absolute or the relative path from your Makefile script situation for any information needed.

Sbsar files generation part

You need to define a sbs source folder where the script will check for new content in the SBS_DIR variables content.

You must write down also the place where the script will write the generated sbsar.

Executables used

These are the adress of the substance automation toolkit binaries. Note you can use former variables defined sooner in the file, like it is done in the --includes section of MAKESBSAR.

Texturesets files

This files will be used only internally by the script to check the texturesets it handles.

Texture names possible

This variable is needed to recognize the files created as bitmaps from the substance source, it must include all the identifiers used in all the graphs, separated by a pipe and no space. It is used as regexp rule in the script.

Png files folders

Theses are the places where the script will generate the final png files. It will be the main repository used as reference to fill hereafter all the targets needed in any package needed.

You have to define also a blender file directory where you will store the files used to generate previews of texturesets. They will be handled by the material_list.json file indicated in the following section. They will have to be organized a special way to function, see later.

The BLENDEREXEC variable is the path to the binary used to generate the preview. It must be compatible with the version used to save the renders files.

Logo file

Indicate any logo you would need as watermark in any of the content.

Destination preview folder

Where you will save the renders of the previews of each textureset generated by Blender.

Material list

The path to the json file used to manage all the metadata linked to texturesets and proper management of the content generated by the script. It must comply to a specific organisation and content to work properly.

Configuration of the json file

You have to fill this file to tell the system where it should export the result (the png textures and the blender file used for the preview render)

  • name is the mundane texture name
  • description is the description of the texture
  • type is the subfolder name in BLENDFILES_FOLDER in the local-config.mk file the blender files used to generate the previews are stored
  • format is the format of the texture, square or rectangular, it must be either "10,10" for normal 1024x1024 files, "9,10" for 512x1024 and "10,9" for 1024x512
  • destination_1024 is the folders names list where to copy the generated textures files in 1024x1024, it can be left with an empty field if non-relevant.
  • destination_512 is the folders names list where to copy the generated textures files in 512x512, it can be left with an empty field if non-relevant.
  • destination_256 is the folders names list where to copy the generated textures files in 256x256, it can be left with an empty field if non-relevant.