freezy / VisualPinball.Engine

:video_game: Visual Pinball Engine for Unity
https://docs.visualpinball.org
GNU General Public License v3.0
398 stars 62 forks source link

Export meshes to FBX and other small changes. #387

Closed freezy closed 2 years ago

freezy commented 2 years ago

Thanks to @jsm174 for figuring out how to make the damn FBX package work on Linux. I had to cheat a bit for the unit tests too, because somehow the geometry was slightly changed.

The other small change was fixing the locked hierarchy window in one of the provided layouts.

codecov[bot] commented 2 years ago

Codecov Report

Merging #387 (9782235) into master (5d14442) will decrease coverage by 0.16%. The diff coverage is 75.00%.

:exclamation: Current head 9782235 differs from pull request most recent head 11a0140. Consider uploading reports for the commit 11a0140 to get more accurate results

@@            Coverage Diff             @@
##           master     #387      +/-   ##
==========================================
- Coverage   83.51%   83.34%   -0.17%     
==========================================
  Files         128      128              
  Lines        7043     7081      +38     
==========================================
+ Hits         5882     5902      +20     
- Misses       1161     1179      +18     
Impacted Files Coverage Δ
VisualPinball.Engine/Math/Vertex3DNoTex2.cs 75.32% <40.00%> (-2.46%) :arrow_down:
VisualPinball.Engine/VPT/Mesh.cs 72.60% <80.00%> (-2.21%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 31625eb...11a0140. Read the comment docs.

jsm174 commented 2 years ago

Thanks to @jsm174 for figuring out how to make the damn FBX package work on Linux. I had to cheat a bit for the unit tests too, because somehow the geometry was slightly changed.

Cool. Just for some notes incase we ever have to revisit this:

game-ci's test runner is currently built on Ubuntu 18.04. Out of the box, Ubuntu 18.04 has libstdc++.so.6.0.25 installed.

According to: https://docs.unity3d.com/Packages/com.autodesk.fbx@4.1/manual/index.html, libstdc++.so.6.0.28+ is required.

So as a work around, we need to temporarily use a custom game-ci unity test runner image base on Ubuntu 18 that has an upgraded libstdc++. When game-ci upgrades to Ubuntu 20, we can go back to official images.

To upgrade libstdc++, we made a custom Dockerfile:

FROM unityci/editor:2021.2.15f1-linux-il2cpp-0
RUN apt-get update && apt-get -y install software-properties-common && add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get -y install --only-upgrade libstdc++6
docker build . -t jsm174/unityci_editor:2021.2.15f1-linux-il2cpp-0`
docker push jsm174/unityci_editor:2021.2.15f1-linux-il2cpp-0

This article was also helping in tracking this down:

https://forum.unity.com/threads/fbx-exporter-4-0-1-does-not-work-with-unity-2021-1-11-on-linux.1131481/

freezy commented 2 years ago

@jsm174 this is ready to merge now, right?

jsm174 commented 2 years ago

@jsm174 this is ready to merge now, right?

yes. In a future PR we will be able to remove the line: customImage: 'unityci/editor:2021.2.16f1-linux-il2cpp-1'.

I believe game-ci/unity-test-runner needs to make a new release so it pulls its latest image.

freezy commented 2 years ago

Cool, can you watch this and update accordingly?

jsm174 commented 2 years ago

@freezy - unity-test-runner@main was just updated to pull v1 images. (https://github.com/game-ci/unity-test-runner/pull/179)

This is good to merge now.

freezy commented 2 years ago

Awesome, thanks!

But I wanted to fix colored material emission before merging. If I don't get to until tomorrow I'll merge nevertheless though.