I had to bake some texture maps in Redshift inside Houdini. Haven’t seen any clear tutorials on how to do that. So here is short guide.
Let say I created complex material mixing different texures, adjusting them with color corrections and gradients, noises. I’m happy how it looks in the Redshift renderer. And want to pass geometry to 3ds Max and setup materials with Corona.
General ideas is that you need to create custom AOVs to bake all those textures. Link to documentation about custom AOVs:
https://help.maxon.net/r3d/houdini/en-us/#html/Custom+AOVs.html
Here is how a test material network looks like:
Just for visual reference I’m adding black nulls to know what maps I want to bake. And connecting here those nulls to red nodes (StoreColorToAOV or StoreIntegerToAOV). Sadly you can’t use `opinput(“.”,0)` to get the name of connected node in MAT context like you can in SOP. So you’ll need to copy paste names from nulls.
Create separate Redshift render node. In RenderMaps tab set Renders Maps Baking Enable.
If during testing you want to switch fast between textures resolution (from 512x512px to 1024, 2048, 4096) add an integer slider (with range from 0 to 3) to the inteface of RenderMaps tab (I called it indra_res_mult) and in the Output resolution add:
512*pow(2, ch("indra_res_mult"))
If it is black and white texture like roughness or mask use data type scalar. And it will be saved as 8 bit greyscale image in this case. They need to be with gamma 1. But if you render them in Redshift in png it will save in gamma 2.2. So if you want gamma 1 you need to save in tif. And for channels like base color use png.
Things to remember:
- No tessellation on obj level. It took me more than 1 hour to figure out why my maps were looking strange and it was just this one checkbox.
- No overlapping uvs.
- Faces has to be coplanar. I personally didn’t have a problem with this. But in this video for C4D it is recommended to triangulate.
Tips:
- If you have assigned groups to geometry and want to use it inside redshift materials: you need to promote it to vertices on SOP level and switch on “Output as Integer Attribute”. You don’t need to create node for each group. Just use GRP_* in group name field. (I usually start names of all groups that I want to keep with GRP_ in the beginning). Then read it inside materaials with “RS Integer User Data” node. Just writing “GRP_group_name” or “group:GRP_group_name” will not work. That’s why we need convert group to integer attribute.
- To write those masks you need to use “RS Store Integer to AOV”. StoreColorToAOV will not work.