Canvas Renderer

Canvas Renderer

202k Downloads

[Suggestion] Pipeline option profiles

spiralhalo opened this issue ยท 0 comments

commented

Is your feature request related to a problem? Please describe.
A few people have asked for the "most performant" options for Lumi Lights. It'd be nice to have options profiles based on performance (Low, Medium, High, "Custom", etc.)

Describe the solution you'd like
Profiles are defined by pipeline authors in json just like any other pipeline configuration.
Example of profile definition (based on Lumi Lights):

{
  // If profiles aren't defined or can't be parsed, the profiles button are not shown in pipeline options
  // and the profile will always be set to "Custom"
  profiles: [
    {
      profileToken: "profile_low",
      profileKey: "config.lumi_lights.profile.low",
      options: {
        // options name and value must match existing option and value type; log an exception otherwise
        ambient_occlusion: "vanilla",
        reflection_profile: "low",
        reflection_maximum_roughness_relative: 2,
        reflection_on_hand: false,
        cloud_reflection: false,
        cloud_rendering: "flat",
        water_caustics: false,
        volumetric_fog: false
    },
    {
      profileToken: "profile_medium",
      // ... etc
    }
  ],
  // If defaultProfile isn't defined or can't be parsed, the default profile will be "Custom"
  defaultProfile: "profile_medium"
}

UI/UX:

  • On top of the pipeline configuration there could be an enum selector for profiles.
  • When opening the configuration screen, the user's current configuration is saved in what will be called in this document as "UserConfig".
  • When a user change any options, it will modify the UserConfig.
  • When a profile is selected, all the configuration options that are affected by the selected profile are changed in the UI. However, it doesn't modify the UserConfig.
  • There would be a system profile called "Custom" which would reset all the configuration options to UserConfig.
  • There should also be a "reset to default" button which would reset the UserConfig to the default options, as well as setting the profile to the default profile.

Saving/Parsing:

  • When the user saves their options, the UserConfig will be written to the pipeline options file along with the profile they selected.
  • When the pipeline options file is parsed and/or when the options are applied:
    • If the profile is set to the "Custom" system profile then all UserConfig is read and applied as usual.
    • If the profile is set to something else, first read and apply the UserConfig, then apply modifications based on the selected profile definition (if the profile exists).

Describe alternatives you've considered
None.

Additional context
If approved I can try implementing this myself.