Giter VIP home page Giter VIP logo

animatablevolumecomponent's People

Contributors

cji3bp62000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

animatablevolumecomponent's Issues

Class Animating

Claim

this is optional feature that may not be implement, because currently there's no class other than TextureCurve / AnimationCurve that is built-in Unity VolumeParameter, both URP and HDRP.
(technically ,TextureCurve and AnimationCurve can't be animated)

if you want to animate class, just use struct.

Detail

Unity can't animate class (even though it can serialize it 😒 ), but unity can animate struct!
see β†’ Animating serialized class properties with animation clip?

So, if there's a class VolumeParameter (VolumeParameter<SomeClass>), we can maybe generate a struct for it, and link between them.

example:

    /// <summary>
    /// User class, not animatable
    /// </summary>
    [Serializable]
    public class MyClass
    {
        public int intField;
        public float floatField;
        public bool boolField;
    }

// -> generates...

    /// <summary>
    /// generated struct; this is animatable!
    /// </summary>
    [Serializable]
    public struct MyStruct
    {
        public int intField;
        public float floatField;
        public bool boolField;
    }

Remove VolumeParameter<Class> Support

  • Remove VolumeParameter<Class> Support
    • Like AnimationCurveParameter
  • Remove VolumeParameter<Array> Support
    • Like VolumeParameter<DiffusionProfileSettings[]> in HDRP

Mapping Code generation Adjust

problem and solution:

  • currently, when generating code, it took 1 compilation to compile new AnimationComponents and 1 compilation to update AnimatableVolumeComponentMapping.g.cs (because we search new components by reflection)
    • to avoid this, after generating code for new AnimationComponent, use their expected class name to generate the map (before the script compilation of new components).

another solution:

  • Also, it seems like the package does not need any mapping any more, since I deleted the runtime "add corresponding component" method
  • so we can just delete the mapping, and when pressing "Add Corresponding Component" button, just search on the fly by reflection
  • let me think about it

Read from Profile button - Animation keying bug?

When [Read from Profile] is on, current system is constantly writing back to animatable.
When animation window is in recording state, and user drags the playback head, the system will overwrite keyed value by current value.
(this is base on imagination)

example:

  1. key 0 at 0(s), 1.5 at 1(s)
  2. drag from 1(s) to 0.5(s)
  3. β†’all frame between 0.5(s) and 1(s) keys 1 (unless user jumps)

reason:

when dragging, animation will set current value to new value, but Read-from-Profile reads profile value (which is old value!) and overwrites values in animation.

solution:

  • even though reading from profile, write back to profile when animation previewing (OnDidApplyAnimationProperties)
    • "write" only, don't read?
  • check EditorUtility.IsDirty(profile) before reading from profile

Japanase Support

Japanese Support

  • At least for long sentences
  • e.g. description of Animatable Component Wizard

HDRP code-gen errors

The AnimatableVolumeComponent seems to work in HDRP, but code-gen generates classes with errors.

Errors:

  • nested enums/classes in classes
    • reason: type name will be "ParentClass+ChildEnum", which is not valid
    • solution: replace + -> . in type name
  • internal classes
    • reason: deprecated, or used by other VolumeComponent only (internal use)
    • solution: exclude code generation for internal classes
  • class with HideInInspector, Obsolete attributes
    • reason: deprecated
    • solution: exclude code generation of classes that has above attributes
  • internal types of VolumeParameter<>
    • reason: deprecated parameters
    • solution: exclude code generation of internal types
  • private parameters
    • reason: ??? / parameters that should only be set in quality settings (not sure)
    • solution: exclude code generation of private parameters / set by public properties (if any)

fix me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.