Could you re-post your question and provide a proper explanation of what you are doing? No offense, but this is exactly the kind of "mumbling at the screen" question that usually nobody can answer because we are not seeing what you are seeing.
Ok. No problem.
I created a 3D dice in AE using six textures. After I did a PRE-COMP of these layers, rotated the object, insert a light and put a background image to project the shadow of the dice. In the dice composition I enabled CASTSHADOW and did the same with the light, but the shadow does not appear. My question is if this is possible or not.
Shadows will only appear on 3D layers. There is no such thing as a shadow matte/ shadow catcher in AE. If you need shadows either make your BG layer a 3D layer as well or create a duplicate of your dice comp all in white/ greys with shadows, then apply it as a 2D comp on top using multiply blending mode.
When I create a pre-comp layers that I positioned in the three-dimensional space and then the collapse in asset pre-comp and convert to 3D layer in anothercomposition and include lights + background, I can make this pre-comp shows shade in the background or I can do this only with layers and not with pre-composed?
Create a 100 x 100 pixel solid, and a comp size solid. Make them both 3-D layers. Rotate the comp size solid 90° on the X axis. Position the comp size solid at the bottom of the small square solid. And a light and a camera. Position the light so it shines down and at an angle to the small square solid. If no shadow appears, select both solids and the light then press the a key twice. Use should see material properties and properties for the light.
Select cast shadows on the light, cast shadows on the small solid, and accepts shadows on the large solid.
There you go. The basics of how to cast a shadow.
Europe, Middle East and Africa