Factor Fields: A Unified Framework for Neural Fields and Beyond