This is a 2 part effect, each a skill in itself. Part 1 uses 2D pixel data from a photograph to synthesize 3D data as a bump map, making dark pixels into wood grain crevices that interact with your global lighting (image 3 below). Part 2 is an intro to Photoshop’s 3D environment, where instead of mimicking a 3rd dimension, we actually create it. In the final composition, the 3D geometry is both casting shadows and wearing the texture from part 1 like skin.
Part 1: Self Shadowing Textures
Open the image you want to convert to a 3D texture. Click: Edit/Define Pattern. Now that your pattern is saved in Photoshop’s resource library, double-click on the layer to open the layer styles window. Select “Bevel and Emboss”, “Contour”, “Texture” and “Pattern Overlay”. Click on “Texture” then select your new pattern. Click on Pattern overlay and select the same pattern. Now your texture has a 3d bump map which is applied to your layer and casts shadows on itself that you can re-adjust under “Bevel & Emboss” in the “Layer Styles” window.
Part 2: 3D Extrusion
To create 3D geometry depth and shadow, select your text layer, Command+J to duplicate it. On the bottom text layer, delete the layer styles (bevel & emboss/pattern overlay). Now, with the untextured layer selected, click on the 3D tab and select “Selected Layers” “3D Extrusion”. You can adjust the depth, positioning and lighting. In your 3D panel, tweak positioning and the look with the environment panel (lighting and shadow) and the Camera panel (perspective and framing).