petrbroz / svf-utils

Utilities for working with the SVF file format used by Autodesk Platform Services.
https://petrbroz.github.io/svf-utils/
MIT License
123 stars 53 forks source link

Create a glTF with animation. Set visibility of nodes based on AEC phase #49

Closed wallabyway closed 1 year ago

wallabyway commented 2 years ago

Take phase information from the meta-data of an SVF (from .RVT or NWD) and create a glTF with animation.

Essentially set the visibility based on phase, in a time-sequence.

Similar to this demo in Forge-Viewer, except have a fixed time-step, rather than something interactive: http://forge-bim-phasing.azurewebsites.net/

petrbroz commented 2 years ago

Thanks Michael. IMHO this sounds a bit too industry specific for it to be considered a generic feature of the SVF-to-glTF converter. Could this feature request perhaps be generalized a bit more?

petrbroz commented 2 years ago

Also, from my experience, there's not a unified way of representing the phasing states in SVF, is there? Last time I was working on a phasing demo (https://forge-phasing-poc.herokuapp.com), the input dataset I got was basically just a DWG file with a custom property available on different elements representing the "task ID", and an Excel spreadsheet that mapped the tasks to different start and end times.

wallabyway commented 2 years ago

Right, there's so many possibilities.

The essence of seeing Phase animation, is always locked to a time axis, so why not make it an animation?

glTF has animation support of node transforms at keyframes, so it should be easy to bake a glTF animation where objects fall from the sky, into place (let's say), in a time-sequence, based on it's phase information.

Let the glTF viewer's, whether they are Unity glTFLoader, Unreal glTF loader, Babylon.js, handle the scrubbing UI, or jump to keyframe X. The main purpose is to be able to generate the content.

To keep it simple, I would target Navisworks files, since it has the Phase feature, and makes a large pool of content where we know where the Phase tags connect to the DBIDs, in a consistent way already. Jan's demo uses this: http://forge-bim-phasing.azurewebsites.net/

Then, I think external data from Excel, MS Project schedule files or P6, could be integrated by others, once we prove out Navisworks Phase content.

wallabyway commented 2 years ago

Here are two examples, that are related: A video of the effect: https://www.youtube.com/watch?v=tQkDRXo7tLM

and a glTF from a Sketchfab creator: https://sketchfab.com/3d-models/real-time-animations-on-the-browser-3afc31794b63402f830ae75146a5a798

and this animation: https://sketchfab.com/3d-models/animated-3d-building-exploded-view-86584a95f8da403a96afe391e3846583

petrbroz commented 2 years ago

Thanks, I definitely agree that we should leverage the glTF animation support. The part I consider problematic is - as you said yourself - there are just so many different ways to animate the output, for example:

So instead of hard-coding any of these assumptions into the converter, I would suggest that we just create a new sample subclass of GltfWriter, showing how you can add different types of animations (fly-ins, visibility toggles, or color changes?) based on different inputs (e.g., using the Navisworks phasing data, or an external JSON file) to the glTF output yourself.

wallabyway commented 1 year ago

Agreed. Closing.