Open JustinTimeCuber opened 12 months ago
We can add a GUI in a future PR.
How easily is this extended to other material properties?
Should be pretty easy I think
On Thu, Oct 26, 2023, 03:42 Peregrine05 @.***> wrote:
How easily is this extended to other material properties?
— Reply to this email directly, view it on GitHub https://github.com/chunky-dev/chunky/pull/1627#issuecomment-1780580067, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCOLJDBRT5RZWULGM6FK7TYBIH4RAVCNFSM6AAAAAA4WYOKU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGU4DAMBWG4 . You are receiving this because you authored the thread.Message ID: @.***>
Rebased against latest master
. Mapping for copper bulbs would be great. :bulb:
@JustinTimeCuber Given that #1621 is merged now, is this one ready for merge?
I think so, as long as there isn't another new light source I haven't heard about
NOTE: this PR depends on/includes the changes from #1621, so it is currently marked as a draft. One useful feature Chunky is currently missing is the ability to differentiate between the parts of blocks that should emit light and the parts that shouldn't. Here is an example with furnaces:
As can be seen, the entirety of the blocks are emitting light despite the fact that physically, only the "flame" portions should be providing light.
Ideally this could be done with PBR maps, but besides the fact that we don't have those yet, that basically requires either us to provide them for every emitter (potentially a lot of work) or users to provide them (not really an ideal solution in my opinion). This PR provides 3 methods for determining how much light should be emitted from each pixel as a function of pixel color rather than an emittance map texture. One of these is
For certain other emitters like magma blocks, sea lanterns, and redstone lamps, the darker pixels should emit less light, but not none. In this case, a simpler method (
There is also one more method included called (![image](https://github.com/chunky-dev/chunky/assets/46458276/b02ab8ba-cba1-4858-a41b-18078f0088bc)
REFERENCE_COLORS
, which allows for specific color range(s) to be specified which should emit light while all other colors will not do so. In this mode, the strength of the emitted light is also dependent on the HSV Value of the pixel color raised to some exponent (default: 1.5). This mode is well-suited to furnaces, as well as some other blocks like lanterns, torches, glow berries, and end rods. There is currently no GUI for adjusting the reference colors, but they can be specified in JSON format and defaults are included for the aforementioned emitters.BRIGHTEST_CHANNEL
) is used, which simply takes the HSV value raised to the same exponent and uses that as the relative emittance of that pixel:INDEPENDENT_CHANNELS
) which raises each individual RGB component to the provided exponent. This isn't the default because it tends to increase the saturation of emitted light at higher powers making it a bit less realistic, but it is still included as an option for more artistic freedom.The current version of this PR doesn't include a GUI option for setting
REFERENCE_COLORS
which can only be customized by editing the scene JSON, but everything else is customizable through the GUI. I'll look into adding a GUI option (let me know if this is needed before merging) based on the layered fog GUI in #1618.