Vertex Color Bake workflow (Python script & HDA tool)

The final output of the script with the shader nodes created.

The final output of the script with the shader nodes created.

Random ID bake output.

Random ID bake output.

Ambient Occlusion bake output.

Ambient Occlusion bake output.

The Pyhton script running on Blender. It creates 2 Vertex Color groups and mix them using an Emission shader node creating a new Vertex Color bake.

HDA tool in Houdini that mimics the Python script but allows more control over the bake and adds more functionality.

Node tree of the HDA tool.

Node tree of the HDA tool.

Final look inside Unreal Engine

Final look inside Unreal Engine

The problem to solve with this task was to add randomness to several modular buildings that would be procedurally placed in an open world. Lead Technical Artist created a shader that would use Vertex Color information and World Position offset to drive several parameters so this info needed to be baked to the assets. After the workflow was tried and tested I first created a Python script to automate the process (the were more than 40 buildings to process), but afterwards i found that Houdini and its procedural nature would be a better fit for our needs.
Working in Houdini allowed more control over the process and the possibility to improve the workflow adding more flexiblity.
The final outcome was an HDA tool that could be drived by a PDG to batch process any kind of asset regardless the number.