Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phiz adaptor #40

Merged
merged 4 commits into from
Jan 9, 2024
Merged

Phiz adaptor #40

merged 4 commits into from
Jan 9, 2024

Conversation

grillo-delmal
Copy link
Contributor

Yesterday searching for things about mocap I found this project https://www.phizmocap.dev/. Since it implements exporting tracking values and blendshapes through OSC, I implemented it in facetrack-d and session for testing purposes.

My first impression is that it's easier to use than OSF, but I still have my concerns considering that it runs on a webpage on the browser (and I still haven't had the chance to study that part).

To test this, you also need the PR branch from facetrack-d

Resubmitted since Inochi2D/facetrack-d#16 was merged

@grillo-delmal
Copy link
Contributor Author

Forgot that session still depends on the sable version of facetrack-d xD

@LunaTheFoxgirl
Copy link
Member

Since the PhizAdaptor is hidden behind a version tag, session should test for said version tag too, to prevent invalid compilation when Phiz is not enabled.

@grillo-delmal
Copy link
Contributor Author

makes sense, I'll look into it

@grillo-delmal
Copy link
Contributor Author

Ok, looked into it, and everything is working as expected in this commit, but it seems I need to clarify some things (I wrote this half a year ago, so I didn't remember how it was implemented 😅 )

Regarding the included version tag, I forgot to mention that https://www.phizmocap.dev/ provides multiple protocol implementations, between them, the OSC one that I mentioned in the PR and a websocket based one.

I implemented the OSC one as PhizOSCAdaptor in facetrack-d, that one is not behind a version tag since it doesn't require any extra dependencies to work. I also implemented the websocket protocol from that page as the PhizAdaptor, but that one requires vibe-d to run, so I hid it behind a version tag (the same way the JML and the websocket adaptor are implemented).

The version flag is activated if you compile the facetrack-d library with the web-adaptors config. You can trigger this through the session build process compiling it with the --override-config=facetrack-d/web-adaptors flag.

I ended up implementing both of them because the websocket one is a bit more convenient to use. This is because the OSC one requires an external app that you need to run in your PC for it to work.

Regarding my research about it, I used the webapp for around a couple of month and works fine for tracking, but I stopped using it since Puppetstring has become a way better alternative.

If you want to test if the web-adaptors for new PRs, you can apply the folowing patch to the github workflow file

diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml
index 04b80f1..89822e6 100644
--- a/.github/workflows/pr-test.yml
+++ b/.github/workflows/pr-test.yml
@@ -38,6 +38,10 @@ jobs:
         # Build metadata (like version information and icons)
         dub build --config=meta
 
+        # Build the project with facetrack-d/web-adaptors enabled, with its main file included, without unittests
+        dub build --compiler=ldc2 --build=release --config=linux-full --override-config=facetrack-d/web-adaptors
+        mv out out-web-adaptors
+
         # Build the project, with its main file included, without unittests
         dub build --compiler=ldc2 --build=release --config=linux-full
 
@@ -46,4 +50,11 @@ jobs:
       uses: actions/upload-artifact@v3
       with:
         name: inochi-session
-        path: out/
\ No newline at end of file
+        path: out/
+
+    - name: "Upload Web Adaptors Artifacts"  
+      if: success()
+      uses: actions/upload-artifact@v3
+      with:
+        name: inochi-session-web-adaptors
+        path: out-web-adaptors/

@grillo-delmal grillo-delmal changed the base branch from main to v0_8 January 9, 2024 20:04
@LunaTheFoxgirl LunaTheFoxgirl merged commit f2bac84 into Inochi2D:v0_8 Jan 9, 2024
@grillo-delmal grillo-delmal deleted the phiz-adaptor branch January 9, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants