DevelopmentSystem ArchitectureData Model[Ken] Design Version

[Ken] Design Version

Design Versions represent specific configurations or states of a Design Family. Each version contains 3D geometry (meshes) and material elements that make up the visual representation of the design.

๐Ÿ”„

Key Concept

While a Design Family represents the overall โ€œproductโ€, Design Versions represent specific implementations - like different iterations, updates, or configurations of that product.


What is a Design Version?

A Design Version is a specific configuration within a Design Family that includes:

  • 3D Geometry - Associated to actual 3D mesh assets
  • Material Elements - Associated to actual material assets
  • Version State - Active version is the one that is currently available for use
  • Debug mode - Version is in debug mode if it is not available for use in the catalog
  • Material default configuration - These version will be used as the default material configuration while spawning the item without any default material configuration in a room
  • Revision number - The revision number is the version number of the design version, it will increase when the meshes or materials are updated
  • Chunk System - The chunk ID and chunk size of the design version

At the moment, only one active version is allowed per Design Family.


Attributes & Metadata

Design Versions contain metadata that controls their availability, asset management, and default material configurations.

Core Identification

Basic identifiers for the Design Version:

AttributeTypeDescription
idString (18 chars)Primary key, Salesforce ID format
nameStringVersion name/identifier
design_family_idForeign KeyReference to parent Design Family

Example:

  • id: a40OQ000001Q78XYAS
  • name: "0.0"
  • design_family_id: a4fOQ000000g8yrYAA (MALAGA Design Family)

Version State

Controls the availability and usage of this version:

AttributeTypeDescription
activeBooleanWhether this version is currently active
debugBooleanDebug mode flag for development/testing

Active Version Behavior:

  • โœ… Only one active version allowed per Design Family at a time
  • โœ… Active version is used when placing items in rooms
  • โœ… Appears in catalog and search results

Debug Mode:

  • ๐Ÿ”ง debug: true โ†’ Version only visible in debug/development mode
  • ๐Ÿ”ง debug: false โ†’ Version available in production
๐Ÿ”„

Single Active Version

At any given time, only one Design Version can be marked as active per Design Family. This ensures consistent user experience and prevents confusion about which version to use.

Version State Scenarios:

Scenarioactivedebugdesign_family.released_on_productionAvailable To
ProductiontruefalsetrueAll users
TestingtruetruefalseDevelopers only

Chunk System

Asset packaging and delivery management:

AttributeTypeDescription
chunk_idString/IntegerIdentifies the asset chunk for loading
chunk_sizeIntegerSize of the chunk in bytes
revision_countIntegerNumber of revisions/updates

Purpose:

The chunk system optimizes asset delivery by:

  • Grouping related assets together
  • Enabling progressive loading
  • Supporting delta updates
  • Managing bandwidth efficiently

How It Works:

  1. Chunk ID: Groups assets into downloadable packages

    • Example: chunk_id: 1234 โ†’ All meshes and materials in chunk 1234
  2. Chunk Size: Tracks total asset size

    • Used for download progress indicators
    • Helps estimate bandwidth requirements
    • Example: chunk_size: 52428800 (50MB)
  3. Revision Count: Tracks version updates

    • Increments when meshes or materials are updated
    • Triggers by Salesforce
    • Example: revision_count: 5 (5th revision)
๐Ÿ“ฆ

Asset Caching

The chunk system works with local caching. When revision_count changes, the app knows to download updated assets instead of using cached versions.


Default Material Configuration

Flags indicating which default materials this version provides:

AttributeTypeDescription
default_fabricBooleanProvides default fabric material
default_paintBooleanProvides default paint color
default_leatherBooleanProvides default leather material
default_woodBooleanProvides default wood finish
default_metalBooleanProvides default metal finish
default_glassBooleanProvides default glass material

Purpose:

These flags determine which material configuration is used when spawning an item in a room without explicit material selection. When a Design Version doesnโ€™t have a specific default material flag set to true, the system looks up other Design Versions within the same Design Family that have that flag enabled and uses their materials as defaults.

Example: Sofa with Material Lookup

Consider a Design Family โ€œMODULAR SOFAโ€ with two versions:

Version A: Base Configuration

Design Version A (id: a40OQ000001Q78XYAS)
โ”œโ”€โ”€ default_fabric: false     โ† No default fabric configured
โ”œโ”€โ”€ default_wood: true         โ† Has default wood for legs
โ”œโ”€โ”€ default_leather: false
โ””โ”€โ”€ Design Version Elements:
    โ”œโ”€โ”€ Oak Natural (wood)
    โ””โ”€โ”€ Walnut Dark (wood)

Version B: Material Library

Design Version B (id: a40OQ000001Q78XYZB)
โ”œโ”€โ”€ default_fabric: true       โ† Provides default fabrics
โ”œโ”€โ”€ default_wood: false
โ”œโ”€โ”€ default_leather: false
โ””โ”€โ”€ Design Version Elements:
    โ”œโ”€โ”€ Beige Linen (fabric)
    โ”œโ”€โ”€ Gray Velvet (fabric)
    โ””โ”€โ”€ Navy Cotton (fabric)

Material Application Flow:

When spawning the sofa from Version A:

  1. Legs: Version A has default_wood: true

    • โœ… Uses materials from Version Aโ€™s elements
    • Applies โ€œOak Naturalโ€ to the legs
  2. Seat Cushions: Version A has default_fabric: false

    • ๐Ÿ” System looks up Design Versions with default_fabric: true
    • โœ… Finds Version B
    • Fetches materials from Version Bโ€™s elements
    • Applies โ€œBeige Linenโ€ (first fabric) to the seat cushions

Configuration Scenarios:

Single Version with All Defaults:

Design Version: Complete Configuration
โ”œโ”€โ”€ default_fabric: true
โ”œโ”€โ”€ default_wood: true
โ”œโ”€โ”€ default_leather: false
โ””โ”€โ”€ default_metal: false

Result: All materials come from this version

Split Configuration (Material Lookup):

Design Version 1: Geometry Variant
โ”œโ”€โ”€ default_fabric: false      โ†’ Looks up Version 2
โ”œโ”€โ”€ default_wood: true          โ†’ Uses own materials
โ””โ”€โ”€ default_metal: false

Design Version 2: Material Library
โ”œโ”€โ”€ default_fabric: true        โ†’ Provides fabrics for Version 1
โ”œโ”€โ”€ default_wood: false
โ””โ”€โ”€ default_leather: true       โ†’ Provides leather options

Result: Version 1 uses Version 2's fabrics, own wood materials
๐Ÿ”

Material Lookup Mechanism

When a Design Version is missing a default material configuration (default_*: false), the system automatically searches for another Design Version within the same Design Family where that flag is true. This enables:

  • Shared material libraries across multiple geometry variants
  • Centralized material management
  • Consistent default materials across versions

Relationships

Links to associated assets:

RelationshipTypeDescription
Design FamilyParentThe Design Family this version belongs to
Design Version MeshesChildrenAssociated 3D mesh assets
Design Version ElementsChildrenAssociated material/texture assets

Data Structure:

Design Version (a4010000000k3QLAAY)
โ”œโ”€โ”€ Design Family (a4f100000000EvJAAU)
โ”‚   โ””โ”€โ”€ name: "DANISH SOFA"
โ”‚
โ”œโ”€โ”€ Design Version Meshes []
โ”‚   โ”œโ”€โ”€ Mesh 1: 3 SEATER 180
โ”‚   โ”œโ”€โ”€ Mesh 2: 2 Seater 160
โ”‚   โ””โ”€โ”€ ...
โ”‚
โ””โ”€โ”€ Design Version Elements []
    โ”œโ”€โ”€ Element 1: Black Cherry
    โ”œโ”€โ”€ Element 2: Red Oak
    โ”œโ”€โ”€ Element 3: White Oak Light
    โ””โ”€โ”€ Element 4: Walnut

System Metadata

Audit trail and system information:

AttributeTypeDescription
created_atTimestampVersion creation date and time
updated_atTimestampLast modification date and time

Uses:

  • Track version lifecycle
  • Cache invalidation triggers
  • Sync with asset pipeline
  • Audit logging

Version Lifecycle

Understanding how versions evolve over time:

Creating a New Version

  1. Initial Creation

    • active: false, debug: true
    • Assets uploaded to chunk
    • revision_count: 1
  2. Testing Phase

    • active: true, debug: true
    • Available to developers for testing
    • Material defaults configured
  3. Production Release

    • Previous active version set to active: false
    • New version set to active: true, debug: false
    • Design Familyโ€™s released_on_production flag is set to true, if it is not set, the design family will not be shown in the catalog
    • Now available to all users

Updating a Version

When meshes or materials are updated:

  1. Revision Increment

    • revision_count increases (e.g., 5 โ†’ 6)
    • updated_at timestamp updates
    • Revision count file is updated by trigger manually or trigger at 0h UTC automatically
  2. Chunk Update

    • New assets uploaded to same chunk_id
    • chunk_size may change if assets grow/shrink
  3. Cache Invalidation

    • Apps detect revision_count change
    • Re-download updated assets
    • Clear cached versions
โš ๏ธ

Breaking Changes

Major updates that change material slots or mesh structure should create a new Design Version rather than updating revision_count.

Important: When a new Design Version is activated (set as active), the previous Design Version is deactivated. The old version:

  • โŒ Will no longer appear in the catalog
  • โŒ Cannot be used in new rooms
  • โŒ Will be removed from existing rooms that used it

This ensures all rooms use the latest version but may cause compatibility issues. Test thoroughly before activating a new version.

Core Resources

Application Usage

Technical Details