UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

graphics

[PointLight] Non-Uniform Scaling Breaks 2.5D Visuals

Under Audit

lightingtrail effectsar development

Unity 2022.3.x - Unity 6.1.x

Published Fri, Mar 20

It is not possible to individually scale the dimensions of a 3D Point Light using Transform properties or Light.range, as these apply uniformly. This limitation affects specific rendering needs like achieving non-uniform light appearance for skewed camera perspectives.

Issue

 The issue centers on the inability to individually scale the dimensions of a 3D point light. Modifying the Transform's scale values does not influence the point light's emission shape, and increasing the Light.range uniformly expands the light in all dimensions. This limitation presents challenges for specific rendering requirements, such as achieving a stretched or compressed light appearance to complement a skewed camera perspective in a 2.5D game environment. For example, when vertical images are adjusted to appear flat using an orthographic Camera angle and stretching, the standard point light emission appears disproportionately wide along specific axes, which can disrupt the visual illusion. The inability to non-uniformly scale a point light prevents accurate visual alignment with such custom perspectives.

Experimental Fixes
  • Implement a custom shader for the light source to define a non-uniform light falloff or shape.
  • Combine multiple Spot Lights or Area Lights to simulate a custom-shaped light emission that cannot be achieved with a single point light.
  • Utilize light cookies (a texture mask applied to lights) to alter the projected shape of the light, potentially mimicking a stretched effect.

Editor's Note:

The above fixes have not been verified by our audit team yet. They are provided exclusively for your own technical research. We recommend creating a backup of your project before proceeding with any attempts. Utilize at your own discretion!

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.