I have an OBJ file for the 3D Object and I'm using Import Sceneform Asset to convert it to SFA but while doing so it is always giving me error stating Failed to find 'sampledata/models/plc.mtl' on disk
You can see red boxes.
In one them you can see gradle has created the background code for sceneform.asset but due to mtl missing it cannot go further.
Also, in the default google's arcore project the SFB file is in raw folder but it is creating in assets folder.
See the below image.
Can anyone please help me out with this. I'm a newbie to ARCore Development.
Please follow this, and if have any problem let me know
You need the .obj and .mtl. Create a folder in Android using the Sample Data Directory (to avoid this making part of your project)
Inside this folder add the .obj and .mtl
Go to Android Preferences > Plugins and search for "Google Sceneform Tools (Beta)"
Clicking with the right button on the .obj you can select "Import Sceneform Asset" This will create the .sfb and .sfa file, already ready to use.
And in your App Gradle you should find new lines like this:
sceneform.asset('sampledata/NAME_OF_FILE.obj',
'default',
'sampledata/NAME_OF_FILE.sfa',
'src/main/assets/NAME_OF_FILEl')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With