Generate thumbnail with pysbs.batchtools.thumbnail ¶
A helper function is available to render thumbnail from a .sbs or a .sbsar easily thumbnail.generate()
To get more details on the different options check the definition thumbnail module
By default thumbnail.generate uses an internal graph that uses PBRRender node. Only two parameters are mandatory, an input file .sbs or .sbsar and an output path:
Kind of generated thumbnail:
Example, generate thumbnail for each graph and each presets:
Setup a graph correctly to be render as thumbnail ¶
The process can not guess what each outputs does, that’s why Usages must used. thumbnail.generate will used the output’s Usages to find out which output should be connected to the corresponding input.
It’s also possible to precise a PhysicalSize to gained quality. PhysicalSize can be set in graph attribute or with a output value node.
Example of correct outputs, each graph’s outputs has a correct Usage to defined the output type:
Two different ways to setup a PhysicalSize:
Generating and embedding thumbnail directly from a substance or substance archive ¶
A great improvement of PySBS is the possibility to edit a .sbsar file and the first functionality is to add a thumbnail to a substance archive file. Whatever it’s a substance or an archive, generating and embedding a thumbnail is super simple:
To get more details check the substance definition here:
and check the substance archive definition here: