Feature: More Bake VC colorization methods#35
Open
lfod1997 wants to merge 5 commits into
Open
Conversation
Owner
|
@lfod1997, could you clarify the use cases for normalized 24-bit fixed-point format (RGB8)? I'm wondering if it's broadly useful enough to include. |
Owner
|
And one more thing - this modes isn't compatible with current checker material because it uses "Color" blend mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I'm using the addon to calculate TD and bake into VC, so I can use that data in the game engine. Currently the color is calculated with a fixed method that maps the calculated value to a hue (
utils.Value_To_Color), which I believe is perfect for visualization, but not quite suitable for real-time applications as decoding the mapped color involves RGB to HSV transformation.Contents
I'm making this PR so the VC calculation ("colorization") method can be chosen from a range of methods. This involves adding one property (
props.TD_Addon_Props.bake_vc_colorization) and minor logic tweaks. Original work (the value-to-hue method) is not changed in any way and has become the default.3 more colorization methods are also implemented:
Grayscale (Linear), calculated values are mapped to the colors' brightness:
Grayscale (Square Root), calculated values are first taken the square root of, then mapped to the colors' brightness:
Normalized 24-Bit Fixed-Point (RGB8), which bakes values directly into VC; offers higher precision than grayscale methods, at the cost of readability and slightly heavier decoding: