79257456

Date: 2024-12-06 09:26:40
Score: 0.5
Natty:
Report link

This is kind of non-trivial task, because from single photo you can't determine object silhouette from incoming light direction. Quite common approach is to take contour of object from camera perspective, flip it horizontally and apply some shear to match light direction. Little more advanced technique involves "extrude" the shadow in direction of object depth. Like if you have brush in shape of the sheared shadow and draw a line with it. Then give it some opacity and Gaussian blur to make it look like real shadow.

You can project 3D vectors up, front and side to 2D space of your image and then use the result vectors to transforms of your shadow, the result will be valid.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Thugmek