

Also you can increase the grid density a bit, just make sure lights in the pool dont get out of hand. Make sure the lights are not too close together and cover will the area around the hero. Play with "MaxPosition", "Extend X" and Y parameters to extend the grid. Play with the offset from the hero and move the grid around him (before start moving preferably). That way you can see the exact placement of lights and the ray casting grid.
Boxshot ultimate forum update#
In order to do that, enable the debug option in the script ( Debug on parameter), preferably set the update rate ( Update_every parameter) to 0 to update every frame (so rays do not flicker in debug) and go in play mode, then use the editor or enable gizmo view in play view to see the debug rays and lights. The direction pointer is a helper that shows where your directional light shows, so can also be disabled.Ībout the setup, the first step would be to check your scale in bounce light radius and the lights grid. I will start with the prefab unknowns, these are just the test setting (the spheres etc) that you can erase and replace with your own.

Note that in this demo i have enabled the special light follow mode, which even further minimizes light creation and use for mobile case.Ĭlick to expand.Thanks for buying the pack I have uploaded a demo where i decreased the light color grading speed (just one parameter) to 1/8 and i get the smooth coloring.
Boxshot ultimate forum code#
I have the code for that ready really, since i use a grid for sun (directional) light, i just need to rotate that grid since for sun light i created it parallel to the ground and some scaling considerations, i just did not include it in this release so it comes out sooner and get it perfect than half done, but is an easy to do addition soon. Also i plan to add a grid for spot lights too later, this will even further smooth out results. If i increase the resolution color can change in an even smoother way. I can of course add more bounces too later with some optimization methods, so i could come even closer to true GI, with good performance.Īs for the room demo, this is the mobile case where i only use 2 lights for the max performance. And i only do one bounce, so i dont cast from the bounced lights around to emulate other bounces, GI does more bounces.
Boxshot ultimate forum pro#
Plus it is never 100% guaranteed that GI wont need tweaking to get right, both for real time and baked processes.Īnother thing to consider is that uses spot lights (i hope to add area lights later, hacking Unity light system, i will need Unity Pro for that though), so the spot light close to a surface may create a visible circle than the spread light GI would give. And imo is much better than waiting for a questionable baking for hours, at least personally i prefer to tweak something to work in a dynamic way than rely on pre-processed staff.

That is the reason i provide many ready setups and prefabs so this procedure is far easier. The debug mode that shows the lights registered and raycasts greatly helps to get this result faster. This method does have the requirement to be adjusted in parameters to get the ammount of lights right to have a smooth result per case. Sun light uses a grid that is configurable by parameters.įor the point light i do an extra raycast from the light source towards registered lights and if the hit is near one of them will update them with the new color (if any). If you want you could send me a prefab that I could try in some of my scenes to compare the performance between standard lights and your dynamic lights.Ĭlick to expand.For the directional and spot lights, the directionality allows a check for color change near the ray cast hits. I would suggest that you try using your light in the shader forge example scene for example so you can see its performance impact on a more complex scene You should try it on a bump mapped shader or something where the additional lights will have a larger impact on performance and unity will be forced to use point lights at all times rather than switching their importance for performance on mobile. It looks like the phone is lowering it's clock speed to save battery rather than run higher than 60fps so I'm not sure what it's performance hit is but it is certainly suitable for mobile.ĭid you set all the lights as important though or did you leave it up to unity to decide ? Also you might want to try it with more complex shaders I've got a feeling the reason it is so fast is that those shaders are simple difuse ones so the lights don't have a large performance impact. Hi it must be pretty efficient because it's running at 60 fps on my nexus 5 phone at 1080p.
