Participating media, e.g., fog and smoke, play an important role in computer animation and games. They influence the atmosphere of scenes by inducing some special lighting effects, such as the distant blur, glows, and god rays. To design the lighting effects in a scene with fog or smoke, users usually need to tune many parameters to achieve their goal. In this paper, we propose a method that aims to transfer the desired lighting and homogeneous foggy effects in target images, including glow, god rays, and fog attributes, to a 3D scene by solving an inverse problem. The experimental results show that our approach is effective, intuitive, and user-friendly.