Overriding materials in Houdini not a simple task that you might think. There are many ways to do so such as Takes or shop_surfacepath method mention here (http://forums.odforce.net/topic/13385-global-material-override/)
Python Filtering technic described in the same post by King Tapir work pretty well and do not required that all of your material assigned on the object level. However, it might be difficult to figure out how to use it for the first time.
Made a .py file. In my case it called filter.py and contain following code.
||Called just prior to the
||The surface shader attached to the object.|
||When geometry has shaders defined on a per-primitive basis, this parameter will override these shaders and use only the object’s shader. This is useful when performing matte shading on objects.
Not supported for per-primitive material assignment (material SOP).
||Shop material that we going to override|
Tell mantra to use this file as a Python Filter
Also, don’t forget to force writing of all shaders into .idf by setting Declare All SHOPs.
Create a simple SHOP material in this case I’m doing very simple Ambient Occlusion shader.
If everything set correctly you should see the print output “Python Filter Finished” in your console.
This is my result
Useful links to explore: