Open MrCsabaToth opened 5 years ago
Another example with a stop sign model, Studio crashes cold with the same Filament Precondition Panic (material expected 4 but received 1). Command line verbose compilation shows no error whatsoever:
$ ./build/sceneform_sdk/linux/converter -v -a -d --mat ./build/sceneform_sdk/default_materials/obj_material.sfm --outdir ./output/ ./sampledata/stopSign.obj
Info: Applied 1 material paths to 2 surfaces by duplicating the last path
Info: Generated SFA from ./sampledata/stopSign.obj
Info: Version: 0.540000.2
: - Geometry Center (m): <0.000, 2.483, -0.056>
: - Geometry Size (m) : <1.848, 4.925, 0.150>
: - Model 0/1: 70 Vertices
: - Attribute 0/3: Position (Vec3f)
: - Attribute 1/3: TexCoord (Vec2f)
: - Attribute 2/3: Orientation (Vec4f)
: - Material 0/2: 'lambert11SG' (32 Triangles)
: - Material 1/2: 'lambert12SG' (12 Triangles)
: - Texture 0/1: 'stopSignTxt' (./sampledata/stopSignTxt.jpg, 58095 bytes)
: - Usage type: 'Color'
: - Mag filter: 'Linear', Min Filter: 'NearestMipmapLinear'
: - Wrap S: 'Repeat', Wrap T: 'Repeat'
: - Material 0/2 (compiled index 0)
: - Parameter 0/5: 'baseColor' = "stopSignTxt"
: - Parameter 1/5: 'baseColorTint' = [1.000000, 1.000000, 1.000000, 1.000000]
: - Parameter 2/5: 'metallic' = 0.000000
: - Parameter 3/5: 'roughness' = 1.000000
: - Parameter 4/5: 'opacity' = null
: - Material 1/2 (compiled index 1)
: - Parameter 0/5: 'baseColor' = null
: - Parameter 1/5: 'baseColorTint' = [0.240000, 0.060000, 0.010000, 1.000000]
: - Parameter 2/5: 'metallic' = 0.000000
: - Parameter 3/5: 'roughness' = 1.000000
: - Parameter 4/5: 'opacity' = null
: - Compiled Material 0/2: 80237 bytes
: - sha1sum: 6ad1ac9da50771d8bace7364490226740b51b8a3
: - Compiled Material 1/2: 79344 bytes
: - sha1sum: 93fd6a25cdea76764d62bd3082bba9dd1afc75eb
: - Collision Shape:
: - Center: x=0.000000, y=2.462570, z=-0.000000
: - Size: x=1.847759, y=4.925140, z=0.150252
: --- totals ---
: - vertices: 2520 bytes
: - indices: 132 bytes
: - textures: 58095 bytes
: - materials : 159581 bytes
Info: Wrote SFA (json) to ./output/stopSign.sfa (1331 bytes)
Info: Wrote SFB to ./output/stopSign.sfb (225368 bytes)
Now the app runtime crashes again with exactly the same Filament Panic as with the caution sign (expected material 3 but got 1). See LogCat of that crash
The stop sign object The caution sign object
I think the Android Studio Crash might not be because of the conversion but when it tries to open the sfb
file and visualize it for me? When I completed some code labs the sfb file was never displayed graphically but just as binary sequence.
Screen recordings: Crashing Android Studio when trying to convert caution sign object AR Android app crash w caution sign crash and converting manually Crashing Android Studio when trying to convert stop sign object + manual conversion later AR Android app crash w caution sign crash and converting manually
It looks like this is a mismatch in the version of the converter you are running and Sceneform 1.12 The 1.12 Android Studio plugin is only compatible with SFB files converted with Sceneform SDK 1.12 because of Filament material version changes.
The same is also true of Sceneform SDK 1.12 (i.e. your SFB files won't work with Sceneform 1.12 on Android if you are running an old version of the converter)
If you want to stay on the previous version of the converter, you should install the corresponding Sceneform Tools Android Studio plugin from the version download page.
@tpsiaki I skimmed over the issues and I get that there can be binary format changes between sfb
file versions. Even before that I erased the sfb
s letting them regenerate, even so later I erased the sfa
s (along with removing the entries from the build.gradle
so the sfa
s would also regenerate (and they are somewhat different actually)! However after the regeneration happens I thought there shouldn't be any crashes. During my manual regeneration attempts I use the converter
executable which is populated by the plugin, so I guess the versions should match as well.
@tpsiaki The Android Studio crash I'm sure is when it'd try to open and show me the sfb
. I could easily get over that, but then the built Android app crashes as well, that's the real blocker problem. How can I clearly identify what kind of version mismatch I'm dealing with? All I can see is that both "before" and "after" sfa
s say version 0.54:2
.
I thought it gonna be easy to try to place some simple stop sign models onto an AR scene. I downloaded several stop sign models and a caution sign model from
poly
and all of them crashes Android Studio when I try to convert theobj
(+mtl
+png
) tosfa
+sfb
.I see that
Google
(orJetBrains
) receives a Crashlytics report about the crash, but I could gather somestderr
info when I started the Studio from command line (and then you see thestderr
):The
sfa
andsfb
files are created though.If I compile the file manually:
There's no error message at all.
After that when I try either the Studio compiled version of sfb or the command line compiled one I get the same runtime error along with an application crash:
I'm using Linux operating system
compileSdkVersion 28
minSdkVersion 24
targetSdkVersion 28
Android Studio
3.5
Google Sceneform Tools (Beta)
1.12.0
My application would be a simple concept but I'm kond of stuck because all models I tried so far does this. On the other hand the Sceneform Introduction codelab ran fine on my machine.
I'm giving more details below.