Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

Add `colorX` as a Supported `valueType` for AnimJ #1058

Open stiefeljackal opened 9 months ago

stiefeljackal commented 9 months ago

Is your feature request related to a problem? Please describe.

Currently, AnimJ supports color as a valueType; however, color is forced to use only the sRGBAlpha color profile. colorX is the solution to have different color profiles. Unfortunately, colorX is an unsupported valueType for AnimJ at the time of writing.

Describe the solution you'd like

I would like for colorX to be a supported valueType for AnimJ as this will allow someone to utilize Linear and sRGB color profiles (and possibly other color profiles in the future when colorX is updated).

Describe alternatives you've considered

You can use ProtoFlux to change the color profile, but that would require the following:

  1. Have the animator drive a color field.
  2. Take the driven field to plug into the ProtoFlux node.
  3. Drive the actual colorX field with the output of the ProtoFlux node.

This is more involved if you need to drive many colorX fields.

Additional Context

colorX is currently a JSON parsable field, so it just needs to be added as one of the elementTypes in AnimX. Here is an example of how it looks via modded:

https://github.com/Yellow-Dog-Man/Resonite-Issues/assets/20023996/97855d7f-069d-46c5-b160-53267862f1df

Frooxius commented 9 months ago

I'm not sure if this approach would be best, because for any long sequence of colors, we typically separate the color profile out.

It's not too efficient to specify individual color profile for every data point (e.g. keyframe) - usually you'll have the entire sequence in the same one.

We could add something for that, where you specify a sequence of colors and then specify the color profile just once.

Geenz commented 9 months ago

Add a specifier for color profile for a series of colors would make the most amount of sense here, especially given how having additional color profile information scales pretty poorly.

Frooxius commented 9 months ago

It's also what everything else that has a sequence/array of color does too.

stiefeljackal commented 9 months ago

I agree that you only want to have a single color profile because it is tedious to specify the profile for each frame; keeping the track to a single color profile is the way to go since you do not want to mix profiles. The demo video was just demonstrating that colorX can be used, so apologies if that caused any confusion.

For the extra information needed for the track (colorProfile for this case), perhaps the introduction of a metadata property can be used to specify additional information for the track such as the colorProfile field. This metadata property can be useful for other future types as well.

On Wed, Jan 3, 2024 at 4:00 PM, Tomas Mariancik @.***(mailto:On Wed, Jan 3, 2024 at 4:00 PM, Tomas Mariancik < wrote:

It's also what everything else that has a sequence/array of color does too.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Geenz commented 9 months ago

What we'd likely do is just introduce a proper "colorProfile" field here - as that's a supported type in the engine on its own. If it needs additional complexity than that - then color spaces are evolving far faster than we can keep up with (which doesn't happen very often on that end with new profiles becoming common once every few years or so).

stiefeljackal commented 9 months ago

I assume you are thinking of placing colorProfile under data for the track correct?

image
Frooxius commented 9 months ago

It's one of possible solutions, but we'll have to see what works best here when we look into this deeper.

stiefeljackal commented 9 months ago

All right. Thank you for looking into this!