Git Product home page Git Product logo

volograms_unity_plugin's Introduction

Volograms Unity SDK

This is the Volograms SDK for Unity, in the form of a plugin. You can use this plugin to create an app that plays volograms.

Supported Platforms

  • macOS - Excluding M1 Macs.
  • iOS
  • Windows
  • Android - Work-in-progress, expect issues!

Support is planned for M1 macOS and GNU/Linux builds.

Getting Started

  • The easiest way to get started is to download a pre-built plugin from the Releases page.
  • If you would prefer to build the plugin from source, then you can clone this respository, and follow the Developer Guide.

Unity Settings

The libraries are exported into the VologramsToolkit folder. The VologramsToolkit folder can be imported directly into Unity.

After importing the plugin into Unity, ensure that the Unity settings for each plugin are correct. For example, we don't want to use the iOS plugin in a macOS build.

There is a utility script included in the Unity package that re-imports all the libraries into Unity with the correct settings. This can be invoked in Unity through the toolbar: Volograms > Utils > Reimport Plugins > All.

Developer Guide

Each platform supported has a separate project, and each project contains a README that documents how to build its respective plugin. When a plugin is built, it is copied to the UnityVol folder, which can be dragged and dropped into Unity.

Requirements

iOS and MacOS

To build the volplayer library for iOS and macOS, you must have the Xcode Command Line Tools installed. Xcode itself is NOT necessary.

Android

To build the volplayer library for Android, you must have the Android SDK Command Line Tools installed. Android Studio is NOT necessary.

Windows

The volplayer Windows build is a Visual Studio project, and so you must be able to build such a project, for example, through Visual Studio.

FFmpeg

The Volograms Unity SDK uses builds of FFmpeg created from the ffmpeg-kit repo. To start developing on the Volograms Unity SDK, clone the ffmpeg-kit repository and follow the instructions to build FFmpeg for the platforms you want.

Next, open your terminal and add an environment variable FFMPEG_KIT which should point to the root folder of your local ffmpeg-kit repository. For example:

export FFMPEG_KIT="/path/to/ffmpeg-kit"

Then, all you have to do is run the build_plugin.sh script in any of the platform folders.

Note there is currently no build_plugin.sh script for Windows.

Licence

Copyright 2022, Volograms.

  • Source code included in this plugin is provided under the terms of the MIT licence (see the LICENSE file for details).

Dependencies

  • This software uses FFmpeg licensed under the LGPLv2.1.
  • The source code distribution, build instructions, and further licence details can be found at ffmpeg-kit repo

volograms_unity_plugin's People

Contributors

capnramses avatar patrick-volograms avatar rafapages avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

volograms_unity_plugin's Issues

UPM Support

Please make this a UPM package! 3rd party code doesn't really belong in Assets any more. It just clutters up our repositories with and complicates deployment and installation.

Vol playing in Play mode

Cannot get Unity Volu plugin to work. Using one of the default volus from the app (the horse).
To Reproduce
Steps to reproduce the behavior:

  1. Open empty project
  2. import Volu plugin
  3. Attach VolPlayer script an empty gameobject
  4. Assign paths to vol files
  5. Press play
  6. See that Vol is not playing

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Screenshot 2022-03-15 104302

  • PC build mode in Unity
  • Windows 10
  • Unity Version 2021.1.24f

Additional context

  • Unity plugin created 21 days from this report
  • Vologram(s) used - Horse vol from the app
  • Vologram Mesh Resolution

[BUG] Frame Drop Spikes on IOS

Describe the bug
When playing a volu on IOS device there are lag spikes caused by the Update function in VolPlayer.

To Reproduce
Steps to reproduce the behavior:

  1. Using Unity 2021.1.24 and URP Build onto IOS device using sample vol
  2. Open profiler and let Vol play
  3. See that VolPlayer.Update is causing huge frame drops

Expected behavior
Expect that Vol playback to be smooth.

Attach Debug Logs

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Unity version 2021.1.24

Smartphone (please complete the following information):

  • Device: Iphone 13 Pro Max

Additional context
Add any other context about the problem here. Some suggestions

  • Toolkit version 0.1.2
  • Default vol was used from within toolkit
  • Vologram Mesh Resolution 2048 (Will try lower resolution next)

[Platforms] Oculus Quest 1 headset

From reporter:
"We have tested the latest version of the unity package of your Volograms player (0.11.1).

We have the problem of displaying the Volograms player on the Oculus Quest (1 or 2) :

Under the Unity project we can test the Volograms player on the development PC (in the Unity application, in the interface proposed by the development tool): as soon as we install the apk on the Oculus Quest (1 or 2), the volograms player is not displayed anymore."

VolPostBuild throws dependency error for Android project

Importing the unitypackage in an Android project throws an error with the UnityEditor.iOS.Xcode import.

Just added an #if UNITY_IOS to the whole class as a workaround.

  • Unity version: 2020.3.21f1 Win
  • Toolkit version: 0.1.1

The Vologram material is not created correctly on Android if empty

The Unlit/Texture shader is not correctly applied at runtime to the Vologram material when no material is assigned in the MeshRenderer.

It works well in the Unity Editor, but shows a lit (maybe standard) material when building the app to an Android device.

If I create myself an Unlit/Texture material and apply it to the MeshRenderer the Vologram shows the correct appearance.

Smartphone (please complete the following information):

  • Device: Oppo Find X2 Pro
  • OS: ColorOS v11 (Android 11)

Additional context
Add any other context about the problem here. Some suggestions

  • Toolkit version: 0.1.1
  • Levi_hd / Rafa_hd

Unity v0.1.2 IOS Build getting pink material on model [BUG]

Describe the bug
Building on IPhone 13 max the mp4 texture never shows just the model animating with a pink material.

To Reproduce
Steps to reproduce the behavior:

  1. Using Unity version 2021.1.24 with URP version 11 and AR Foundation
  2. Add Volplayer component to a gameobject and reference assets from streaming assets folder.
  3. Build onto device (Iphone 13 pro max)
  4. See that app either crashes or periodically drops frames almost to a halt and the volu model plays animation with pink material.

Expected behavior
For smooth playback of mp4 texture

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Monterey 21.0.1
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: Iphone 13 pro max

Additional context
Add any other context about the problem here. Some suggestions

  • v0.1.2
  • default volu in the package

[BUG] >2GB Volograms not Loading

Describe the bug
From Discord:

Hey guys, Im trying to enable the placement of a vologram within my scene based off of the AR Foundation tracked Image Manager. If the image is detected then the vologram should be placed etc... so basically image based detection. I seem to be having an issue though, Im not sure if saving a vologram object as a prefab to be placed is supported, but when the trigger is detected the vologram dosnt seem to appear? An object is definitely being placed within the scene as the vologram audio is playing etc, but its as if the mesh of the vologram just dosn't appear

To Reproduce
Steps to reproduce the behavior:

  1. Create a prefab containing the VolPlayer component
  2. Write a script that adds the prefab to the scene
  3. Build the scene and run on an Android device
  4. The vologram is placed but it is not visible

Expected behavior
Following the steps above, the vologram should be visible

Update Usage Documentation

  • Description *
  • step by step guide with screenshots.
  • how to start the demo scene.
  • how to load a custom vologram.
  • link to tutorial video when that's available

Loop not working if "Play On Start" is unchecked

When the VolPlayer is configured but the Play On Start is not checked, and we trigger the Play method elsewhere, the Vologram plays but don't loop even if Is Looping is checked or the player.isLooping property is set to true through code.

To Reproduce
Steps to reproduce the behavior:

  1. Create a VolPlayer and configure it as usual.
  2. Unmark the Play On Start check, with the Is Looping check marked.
  3. Call the volPlayer.Play() method.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here. Some suggestions

  • Unity Version: 2020.3.21f1
  • Toolkit Version: 0.1.1
  • Rafa_hd / Levi_hd

reduce bandwidth in vertex data upload to gpu

i need a hand here - this is the bit i referred to in the PR description. i assumed i could just not upload indices/uvs if it wasnt a keyframe but it seems to need that. perhaps there's a clear() somewhere that is resetting things.
i wanted to reduce mesh upload bandwidth - not a big deal but should be possible to get a tiny performance improvement.

Originally posted by @capnramses in #11 (comment)

[BUG] More than one vologram creates issue with playback

Describe the bug
When more than one Vologram is added to a unity project the texturing goes janky

To Reproduce
Steps to reproduce the behavior:

  1. Add a vologram to unity
  2. duplicate it
  3. press play
  4. See error

Expected behavior
Should appear like a single vologram

Screenshots
video below

Desktop (please complete the following information):

  • Unity 2020330f1 on Windows 10

Smartphone (please complete the following information):
NA

Additional context
Add any other context about the problem here. Some suggestions

  • Toolkit version- tested with latest version 16/5/22
  • Vologram(s) used , personal one
  • Vologram Mesh Resolution (not sure)
  • Texture Size (not sure)

-Note this was tested with a duplicate vologram, not sure what happens with different ones

synth.240p.mp4

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.