prepare 3d stencil