Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OBJ File for ARCore Application Development

What is the significance of the andy.obj file in the ARCore Sample?

Let's say if we replace the andy.png with a new image, how can we generate .obj file for the new image?

like image 425
Kashi Avatar asked Aug 31 '17 15:08

Kashi


People also ask

What programming language does ARCore use?

ARCore works with Unity3D and Unreal Engine as well as native to Android devices using the Java programming language. Google's ARCore is a steady part of the corresponding operating system Android and is to be used on approx.

Does ARCore support object tracking?

Anchors and trackables The fact that poses can change means that ARCore may update the position of environmental objects like geometric planes and feature points over time. Planes and points are a special type of object called a trackable. Like the name suggests, these are objects that ARCore will track over time.


2 Answers

The OBJ file describes the geometry, the png file the texture to "stretch" over this 3D object. You have to use a 3D modelling program like Blender to create a new model.

This is how you export OBJ files in Blender: https://blender.stackexchange.com/questions/121/how-do-i-export-a-model-to-obj-format

enter image description here

like image 176
PhilLab Avatar answered Sep 25 '22 01:09

PhilLab


The sample code only can handle the simplest OBJ models that only have 1 texture file.

Fo those complicated OBJ models, they usually come with a MTL file that refers to several different texture files. To be able to handle that ,you need some extra work on the existing code. Please check the code I implement for this case if you are interested @https://github.com/JohnLXiang/arcore-sandbox . Specifially ,you can take a look at ObjectRenderer.createOnGlThread().

like image 21
JohnLXiang Avatar answered Sep 24 '22 01:09

JohnLXiang