Basically here I reduce the depth visible by the light to gain precision. I also transform a cubeMap (default for point shadows) to a 2d map by forcing a direction on the light. Finally I tweak the bias parameter to ensure it is adapted to our use case.
Sorry to re-open this tread but i still have the problem with my imported object, i have the shadow but the material is all black when i just have the pointlight. It’s work when adding a HemisphericLight but it’s ugly.
Because it uses a standardMaterial which is no subject to environment lighting whereas the PbrMaterial is subject to it. Finally the intensity falloff is faster for gltf falloff than standard so the light point does not affect it much
Also it is not that hard as you can simulate the standard falloff in pbr materials and /or also use pbr materials for cube or sphere. It is your choice to pick the material type you need depending on the use case and art direction you want.
and also i try to have the same orange from my StandardMaterial to the GTLF 3D object but when i change to the same rgb color from the orange cube to the gtlf with texteditor in “baseColorFactor” with same values is show a brown color instead ( i tried with different metallicFactor and roughnessFactor).
About the color it is because pbr and standard have different reaction to lights which is the main point of having two different type of equations. The pbr is meant to be closer from what nature does hence the need of an environment. The setup is therefore different and trying to map one and the other is not as simple as placing the difffuse color in the albedo one.
The diffuseColor used in StandardMaterial is also in a different color space (gamma) than the albedoColor of PBRMaterial (baseColorFactor in glTF) which is in linear color space.