RENDERING AN ITEM AND CASTING SHADOWS ON A OBJECT THAT IS NOT VISIBLE

Hi i really need some help i have a figure of a man and i want to export the hat he is wearing only and the shadows it creates on the figure. I dont want the man to be in the export as i want to add him in photoshop if you can help me i would greatly appreciate thanks
Comments
Iray? Select the figure, then in the Content Library pane go to Daz Studio Formats>[your content directory name]>Scripts>Utilities ands double-click the Create Advanced Iray Node Properties file, then in the parameters pane tuen on the Enable Iray Matte button. You may need to experiment a bit in the Editor tab of the Surfaces pane with all the figure's surfaces selected to avoid unwanted reflections etc. but that should essentially do the job