OSL Node
Many Objects One Material


main index


Introduction

For reasons of look-dev efficiency it is highly desirable to use one material to shade multiple objects. For example, a scene of a port facility with hundreds of shipping containers or a scene showing thousands of items of debis, say sheets of buckled steel.

In the case of shipping containers they are owned or leased by a relatively small number of companies, for example, EverGreen, China Shipping. It should be possible to randomly apply texture maps to the geometry of the shipping containers using a single material, say PxrSurface, rather than trying to apply one material per object.


What is Expected?

You are to render a scene containing at least 200 shipping containers all shaded by a single material with a custom OSL node that will randomly apply one of several texture maps. The maps might effect,
    the diffuse color,
    the diffuse gain,
    the specurity,
    presence and/or
the displacement of the objects.