How galn14/ardavis works
Purpose and runtime
ARdavis is a Unity 2021.3+ augmented-reality data-visualization project. It combines image-target AR (Vuforia), the Immersive Analytics Toolkit (IATK), and optional map/location capabilities from the bundled Mapbox Unity SDK. Runtime targets include Android (ARCore, Vuforia assets, native file picker) and XR providers including Oculus/OpenXR.
Application entry scenes and navigation
Primary application-facing scenes appear to be the root Unity scenes: Assets/Intro.unity, Assets/MainMenu.unity, Assets/NextMenu.unity, and Assets/datavisual.unity. Scene-specific MonoBehaviours likely control navigation and introductory UI: Assets/MainMenuScript.cs, Assets/NextMenuScript.cs, and Assets/intro.cs. Build inclusion/order is defined externally in ProjectSettings/EditorBuildSettings.asset; verify this before changing the launch flow.
AR tracking and visualization placement
Vuforia is the AR boundary: its serialized configuration is in Assets/Resources/VuforiaConfiguration.asset, while the target database is packaged under Assets/StreamingAssets/Vuforia/davis.dat and Assets/StreamingAssets/Vuforia/davis.xml. The scene/prefab-level target anchor is Assets/ImageTarget.prefab; custom AR behavior is concentrated in Assets/ARScript.cs. This layer should own the conversion from recognized image-target pose into Unity transforms hosting the visualization, rather than coupling IATK internals to Vuforia lifecycle events.
IATK data model and visualization pipeline
IATK is vendored under Assets/IATK and provides the project’s core analytics pipeline:
• Data ingestion/model: CSV assets and source abstractions flow through Assets/IATK/Scripts/Model/CSVDataSource.cs, Assets/IATK/Scripts/Model/DataSource.cs, and Assets/IATK/Scripts/Model/DataSourceManager.cs.
• Visualization configuration/control: Assets/IATK/Scripts/Controller/Visualisation.cs, Assets/IATK/Scripts/Controller/AbstractVisualisation.cs, and Assets/IATK/Scripts/Controller/ViewBuilder.cs map dimensions/configuration into renderable views.
• Concrete visual forms: scatterplots, parallel coordinates, and matrices are implemented in Assets/IATK/Scripts/Controller/Visualisations/ScatterplotVisualisation.cs, Assets/IATK/Scripts/Controller/Visualisations/ParallelCoordinatesVisualisation.cs, and Assets/IATK/Scripts/Controller/Visualisations/ScatterplotMatrixVisualisation.cs.
The reusable scene container is Assets/VisualisationContainer.prefab; sample datasets reside in Assets/IATK/Datasets/.
Interaction, linking, and GPU rendering
IATK supports interactive filtering and coordinated views through Assets/IATK/Scripts/Controller/BrushingAndLinking.cs and Assets/IATK/Scripts/Controller/LinkingVisualisations.cs. Rendering is split between Unity mesh/view objects (Assets/IATK/Scripts/View/View.cs) and GPU assets, including Assets/IATK/Scripts/GPUCommunication/MyComputeShader.compute and Assets/IATK/Shaders/LinkedVisualisation.shader. This is a performance-sensitive boundary: selection/brush state must remain consistent between C# controllers, generated view data, and shader/compute buffers.
Mapbox and platform services
The repository includes a full Mapbox Unity SDK, though its use by the AR scenes is not evident from the tree. Its map orchestration starts at Assets/Mapbox/Unity/Map/AbstractMap.cs and Assets/Mapbox/Unity/Map/MapVisualizer.cs; remote Mapbox resource access/caching is represented by Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs and Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs. Location providers are under Assets/Mapbox/Unity/Location/LocationProviderFactory.cs. Credentials/configuration are likely loaded from Assets/Resources/Mapbox/MapboxConfiguration.txt. Native integrations include Android Mapbox dependencies, Assets/Plugins/NativeFilePicker/NativeFilePicker.cs, and XR loader settings in Assets/XR/XRGeneralSettings.asset.
Main entry points: ARScript.cs AR behavior · Visualisation.cs Visualization controller · Intro.unity App scenes · View.cs Unity view
Components 23
Application flow
- Build scene order · Defines launch and included scenes.
ProjectSettings/EditorBuildSettings.asset - App scenes · Intro, menus, and data-visualization scenes.
Assets/Intro.unity - Menu navigation
Assets/MainMenuScript.cs
AR placement
- AR behavior · Converts recognized target poses into visualization placement.
Assets/ARScript.cs - Image target anchor
Assets/ImageTarget.prefab - Vuforia configuration
Assets/Resources/VuforiaConfiguration.asset - Davis target database
Assets/StreamingAssets/Vuforia/davis.dat
IATK visualization
- Visualization container · Reusable host placed under the AR anchor.
Assets/VisualisationContainer.prefab - Sample datasets
Assets/IATK/Datasets/auto-mpg.csv - Data source model · CSV ingestion and source lifecycle.
Assets/IATK/Scripts/Model/DataSourceManager.cs - Visualization controller · Maps data dimensions and settings into views.
Assets/IATK/Scripts/Controller/Visualisation.cs - View builder
Assets/IATK/Scripts/Controller/ViewBuilder.cs - Visualization forms · Scatterplot, parallel coordinates, and scatterplot matrix.
Assets/IATK/Scripts/Controller/Visualisations/ScatterplotVisualisation.cs - Brushing and linking · Coordinates filtering and selection across views.
Assets/IATK/Scripts/Controller/BrushingAndLinking.cs - Unity view · Owns generated Unity mesh and view objects.
Assets/IATK/Scripts/View/View.cs - GPU selection buffers · Maintains compute-side visualization and selection data.
Assets/IATK/Scripts/GPUCommunication/MyComputeShader.compute - Linked visualization shader
Assets/IATK/Shaders/LinkedVisualisation.shader
Optional map services
- Map runtime · Bundled SDK capability; scene use is not evident.
Assets/Mapbox/Unity/Map/AbstractMap.cs - Map resource cache · Remote resource access backed by SQLite caching.
Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs - Location providers
Assets/Mapbox/Unity/Location/LocationProviderFactory.cs - Mapbox credentials
Assets/Resources/Mapbox/MapboxConfiguration.txt
Other components
- Native file picker
Assets/Plugins/NativeFilePicker/NativeFilePicker.cs - XR loader settings · Selects Oculus/OpenXR runtime loaders.
Assets/XR/XRGeneralSettings.asset
Connections 21
- Build scene order → App scenes: loads
- App scenes → Menu navigation: hosts
- App scenes → AR behavior: hosts
- Vuforia configuration → AR behavior: configures tracking
- Davis target database → Vuforia configuration: supplies targets
- Image target anchor → AR behavior: anchors
- AR behavior → Visualization container: places
- Sample datasets → Data source model: ingests
- Data source model → Visualization controller: provides data
- Visualization container → Visualization controller: hosts
- Visualization controller → View builder: configures
- View builder → Visualization forms: builds
- Visualization forms → Unity view: renders as
- Brushing and linking → Visualization controller: filters
- Brushing and linking → GPU selection buffers: updates selection
- Unity view → GPU selection buffers: uploads buffers
- GPU selection buffers → Linked visualization shader: feeds
- Linked visualization shader → Unity view: renders
- Mapbox credentials → Map runtime: configures
- Location providers → Map runtime: positions
- Map runtime → Map resource cache: fetches and caches