-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shape of light does not match vanilla #43
Comments
There's 2 reasons for the current dynamic lighting radius:
So I might implement a slider for the radius, but not sure when I'll do that. And for the fade-in/fade-out effect it would require more work and updates than I'm comfortable with so the chances of it ever made it into the mod is slim. |
I prefer not to have a slider because it becomes too easy to crank things up. But it makes sense for torches in your hand to be just as effective as torches that are placed. Right now they are noticeably less effective. Vanilla torches provide a light level of 14 blocks, meaning that the lighted region extends 14 blocks out in the cardinal directions. A total of 365 blocks are lit by a torch. To light the same number of blocks using a circular pattern, the necessary radius is sqrt(365/pi) blocks long, or 10.779 blocks. Here's a small chart generalizing this for light levels up to 25 (note that light levels of 15 are the maximum possible with vanilla objects): |
This is balanced. I'm not sure how the code works, but it seems like this change would not increase the load significantly. Perhaps I'm mistaken =] |
A dynamic light source lit up a maximum of 8 chunk sections with a radius of 7.75, if going higher than 7.75 it will go beyond those 8 chunk sections and will cause even more performance issues. The issue with chunk rebuilds is it recomputes the geometry of a chunk and re-send the whole chunk to the GPU. The more complex the chunk is the more slow it gets (#16). If I had another way of doing dynamic lighting with maybe a shader pipeline I would be more comfortable with this change. |
Ah, I gotcha. You've found the sweet spot and the tradeoff isn't worth it
to go bigger. I'm more prone to notice the difference than most people,
and it's a small discrepancy in the first place. You're probably in the
right here. Cheers ^_^
…On Fri, Jan 1, 2021 at 1:00 AM LambdAurora ***@***.***> wrote:
A dynamic light source lit up a maximum of 8 chunk sections with a radius
of 7.75, if going higher than 7.75 it will go beyond those 8 chunk sections
and will cause even more performance issues.
The issue with chunk rebuilds is it recomputes the geometry of a chunk and
re-send the whole chunk to the GPU. The more complex the chunk is the more
slow it gets (#16
<#16>).
If I had another way of doing dynamic lighting with maybe a shader
pipeline I would be more comfortable with this change.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASBDWM5SC57NXLLUU5ROI6LSXWFLHANCNFSM4VPNVA7A>
.
|
Though, latest Canvas builds have built-in hand-held lighting (but not more yet and the way it's done don't allow me to add proper compatibility yet) but might match better the vanilla pattern? At least there's not the radius issue with performances (and it has colored lighting which is sweet). |
I've been eyeing up that canvas renderer. Sodium causes flickering on iron bars with its compax vertex formats so I have them disabled. I'm not sure how much performance I'm getting at this point. But performance is my priority; smooth framerates trump texture quality any day. I had no idea about the built in hand-held lighting there. Thanks for the tip =D |
Is your feature request related to a problem? Please describe.
If I am standing on a torch then pick it up I can see the lit region around me shrink rather suddenly. This, it seems, is because Dynamic Lights creates light in a radius around you whereas vanilla light creates square patterns.
Describe the solution you'd like
Increase the radius of held lights so that the area of the lit circle is the same as the area of the lit square provided by the item when placed. The circular light pattern is a lot more nice to look at. The square pattern of vanilla light sources is fine since they don't move, but it would be weird when carrying a torch to see that the light extends further in cardinal directions.
Describe alternatives you've considered
Additional context
I use True Darkness, which makes the effect easy to see.
Screenshot 1: There is a torch on the ground and I am standing slightly in front of it. Notice the gold and iron bars.
Screenshot 2: I've remove the torch on the ground but continue to hold one in my hand. Only the iron bar in the center is still visible.
Screenshot 3: Just looking straight down so you can see that I was standing basically on top of the torch, but slightly ahead of it.
The text was updated successfully, but these errors were encountered: