|
| 18 May 2013 05:20 PM |
http://www.roblox.com/Smart-Vignette-place?id=53948038
Super cool dynamic vignette I cooked up in about an hour. It takes one hundred samples of the brightness of various places on your screen (number is editable from the script) and takes an average brightness, then moves the vignette to make the edges of the screen brighter or darker.
The reason this doesn't cause an insane amount of lag is because I partition the sampling based on framerate. If your framerate becomes slower than 0.5 frames per second, it begins to spread the sampling out between multiple frames. This results in high-quality samples at a relatively fast speed. Before partitioning, I could only run 2x2 samples and even that would cause me to slow down. This place runs 20x5 samples and you shouldn't see any frame drops.
The reason I'm running more x samples than y samples is because I do partition checks when the X samples run, but not when the Y samples run. This allows me to partition the partition checks so they don't defeat their own purpose by making the game slower.
The purpose of this is to make bright parts of your map more interesting and dark parts even darker. It incorporates dynamic lights and sun direction into its calculations.
Uncopylocked for your convenience. |
|
|
| Report Abuse |
|
|
|
| 18 May 2013 07:16 PM |
| Er, bump? Does anyone have any bugs? |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 May 2013 09:42 PM |
| Do you mean at the start? They start out dark and then get light as your camera adjusts to the sun's brightness. You have to walk into a cave or press against the dark side of a wall for a few seconds to make it dark again. |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 May 2013 11:18 PM |
Thanks, I really appreciate it.
New minor update is out that supports light sources as a brightness modifier, meaning that if you look at the sun your screen will adjust more quickly because the brightness of the sun will affect the interpreted brightness after averaging the samples. |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 10:40 AM |
| There's an update out that causes the samples to modify the sampled brightness based on the color of the brick that was sampled. This means that caves covered in light gray blocks won't be as dark as caves covered in dark gray blocks. |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 11:26 AM |
| New update that refines the way brightness is affected by color by taking ambient shading into account. You should see smoother transitions between shading at different color samples and dark things should appear more subtly. |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 12:01 PM |
| New update it out that changes the way dynamic lights are interpreted by using their color to help determine their actual brightness. Previous a light with 2 brightness and .5,.5,.5 color would light up the vignette. Now it doesn't to as much of an extent because the vignette realizes that the light isn't emitting much light. |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 02:21 PM |
| New update is out. Brightness is now affected by fog. |
|
|
| Report Abuse |
|
|
peyquinn
|
  |
| Joined: 23 Jul 2009 |
| Total Posts: 2486 |
|
| |
|
| |
|
|
| 19 May 2013 06:48 PM |
| New update is out. Improved the way fog is interpreted. It's now faster, outputs the proper screenspace color, and uses a method of brightness modification that causes darks to stand out more. |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 06:58 PM |
| New update is out. Greatly improved update speed by fixing a previously unknown bug in the partition calculator. I'm getting a 1000% increase in the speed. What are you guys getting? |
|
|
| Report Abuse |
|
|
|
| 19 May 2013 07:16 PM |
| New update is out. Another big performance boost. |
|
|
| Report Abuse |
|
|