Hello everyone. I am a member of the team developing games for mobile platforms (or at least trying to do it…). While working on lighting, I invented next wheel and named it Dynamic Light Probes. It may be used for the lighting of movable objects. Works with all platforms and licenses, in all rendering paths. Does not break dynamic batching. Just leave all lights in the scene, the system will do the rest. You can change light’s parameters (position, range, intensity and color) in runtime.
Stress test on Nexus 5. 1156 animated lights (and dynamically batched barrels).
This system allows you to do dynamic lighting without increasing the number of drawcalls. And without a big performance hit. It bakes all light’s data into a sort of “light volume”, which is available to any object in any time. It can be a static geometry with precalculated beast-lightmaps, which can be illuminated by dynamic light sources further , or it can be dynamic objects.
Advantages:
Editable and movable “light sources”. Theoretically unlimited amount
Dynamic objects, static objects.
Dynamic batching.
Different types of “light sources”.
“Working Area” around the camera or other world point. You can control balance between quality and perfomance.
Should work with all versions of Unity (tested on PC and Android). In all modes of rendering.
No blending or alpha test (mobile friendly)
Disadvantages:
Problems with the height difference (although changing lighting supported in some way). Requires sophisticated algorithm. Working on it.
Lights not respect obstacles. Requires sophisticated algorithm.
With a small number of light sources, the benefits are not obvious (special shaders for objects used, not “free” for GPU).
Large areas require big amounts of data (Can be adapted by changing light density / quality).
I’m wondering what you think about this. Will it be useful for you and how much you think it’s worth?
This is clever, (even though not many people can find a use for it)
But it would be cool to use those lights on a ufo :p. Which I think I will use it for eventually. And I think 10$ seems like a fair price
Do you mean there are no people who want to use tons of lighting sources at one scene (lanterns, flashlights, fireplaces, alternating with the time of day, etc.)? I think its not true. But with “real” lighting you drown in the sea of drawcalls (actually you have to tell it “Goodbye” on mobile platforms, if you are targeting on the wide range of devices).
Maybe you can say more about what this does and how it can be used? And what its limitations are? I’m interested in dynamic lighting and solutions that will work for higher level mobile.
Here is another example. At that screenshot you can see the scene with free assets from Asset Store. It is illuminated by 17 light sources. As you can see, all barrels batched in 1 drawcall, as they have the same material (men does not batch because of skinmesh). You can move lights and change their parameters, the number of dc and performance is not affected.
p.s. #1 message updated.
Well, as I wrote earlier, I’m interested in mobile gamedev and complex per-pixel lighting is not very good choise for it. Especially considering that in DLP getting a light direction is not so easy. Nevertheless, it is possible, by use of a few tricks. Although for the tangent-space normalmaps, you’ll need gles3 support, but for world-space it’s much easier, and gles2 is enough. As you can see, this trick also allows to light objects almost correctly, based on vertex normals.
Image
Also, a free version would be great. Means I could spruce up one of my mobile projects for free. all I really need though is a good (and Unity-free compatible for $0) light probe system.