here is a new version of the Baking Graph Lua script to speed up the baking process with Octane Render v3.
I have updated the script to work with v3 beta 2 and above:
Previous version for v3 between alpha 1 and beta 1:
This time, the idea is to select only a render target node already set up previously, and then run the script. The result should be a new node graph with a copy of the selected Render Target and all the nodes connected to it and all the necessary additional nodes to automate the baking process.
For every material pins of any mesh node connected to the selected Render Target node, the script generate an object layer node and a new Render Target with a specific baking camera node with proper attributes.
In this way the original scene is not touched and we can modify the render settings in one go because all the new Render Target nodes shares the same nodes (except for the camera pin that has a specific baking camera node for each Baking group).
There are some limitations:
- If the script is executed with a version of Octane Render v3 prior than Alpha 4, a dialog will appear informing that all the displacement nodes will be disconnected because they are not supported by the first v3 versions.
- if the .obj node doesn't have a proper .mtl file or doesn't have any material group information, the script generate a Render Target node for every object of the mesh node, not per material.
- The Alembic mesh nodes are a bit more tricky to manage, and for now, the script generate always a Render Target node for every object of the Alembic mesh node, not per material.
- The mesh nodes cannot be grouped in a different node graph and must be ungrouped before running the script, an error message should inform you about this issue if necessary.
Every objects in any mesh node must have a proper unwrapped UV without overlapping for a correct baking result.
If the script is opened in the Script Editor window, almost on top, it is possible to change some default values for the baking cameras, then, if the script is saved, it can be execute directly from the script menu with the desired default values.
After the script has been executed, a dialog window should inform you about the baking render target created:
or if an alembic or obj node without material group information was found:
then double click the new node graph just below the render target previously selected:
At the center of the node graph should be visible an annotation node that stores all the materials names with the proper baking ID, a generic copy of the render target just above and a group that stores all the baking render targets:
By selecting the generic copy, is possible to fine tune all the settings, like resolution, render passes, kernel settings and so on. Since they are shared with all the other baking render targets, when finished, just select the default Batch rendering script to render all the textures in one go.
Note that the baking camera setting in the generic copy are not automatically transferred to the other baking render targets, the script must to be executed again with different default settings.
I have tried the script in different scenarios and it seems to work correctly in all of them, but probably I have not found all the possibility
Please, let me know of any issue or comment and critics, your feedback is greatly appreciated, thanks