Scene assembly &
CFX Automation
A tool automating the character related workflow : import, merge, cloth sim, hair sim, xgen cache, groom RIB.
| Introduction
When working on dozens of shots, one of the longest and most annoying part is to setup the scene to begin lighting. In our case, we have to :
- Merge the lookdevs with the animations
- Simulate the hair curves with houdini
- Drive xgen with animated curves
- Drive xgen with simulated curves
- Generate xgen caches
- Generate some groom RIBs
- And then, import all these into the scene
Not to mention that most of these processes have to be done once for each character !
This was obviously a major issue, threatening both, efficiency and creativity.
In order to reduce greatly the "setup time" I created a tool to automate each task independently to keep a flexible approach.
| Project Development
I've decided to split the tool in tabs, one per character.
​
Each tab is splited in two part; the top one is used to show the current availability of the different assets needed for the processes.
​
The bottom one is for the buttons corresponding to each operation and their associated progress bar.
The import and merge of the animation on the lookdev was the easiest part. One thing I added was the automatic detection of character lookdevs in the current scene to only proceed to merge the animation on them instead of importing another lookdev on top of the current one.
For the character named Kurt we needed to simulate his hairs movement; I've automated the guide simulation in houdini with the Houdini python API.
We then needed to apply the simulated guides to the xgen and write an Xgen Cache with it.
While xgen seems to have an api for itself, the online documentation is sparse and wasn't really of any help. For my needs here I've choosed to stick with the classic maya.cmds way of things, managing the interactive xgen nodes with maya node commands. Still there were some slight issues like using some xgen functionalities that required more research and the use of Mel commands, not well documented aswell (who would have guessed).
I automated it using the Maya python API.
1.
2.
3.
4.
1.
2. & 3.
And eventually we needed to import the aforementioned Xgen cache which is done using xgen Mel "xgmSplineCache" import command.
4.
For the character named Freddy, we needed more automations :
​
Part of his groom have to be deformed following the shot animation in houdini and written as a RIB file sequence.
The weight of those RIBs was a bit heavy, around 200mo / frame so I made it possible to choose a groom quality.
Based on the distance in the shot the user can choose to generate a lighter RIB. More details about it here : ###WIP LINK### [[Groom animation Maya vs Houdini]]
As usual I've used the Houdini python API (hou).
We then needed to import the generated RIB which is done using RenderMan python API (rfm2).​
Our last character is in fact a crowd of characters : the Scouts.
Even though all the import/cache processes have already been covered, this tab still have an interesting little feature. At the top of the tab I added a slider to choose which scout the user want to import.
In the crowd, each scout variation have an assigned number so when the user want to import Scout 06 he just need to use the slider and hit the Import Merge button to get the correct Scout variation in his scene !
You can notice the Simulate / Import cloth buttons; I had automated them too but during the early stages of production we have decided to do it manually to have better control on the sim and and be able to correct any clipping after the sim on the alembics.