Community

Topic: Xamarin component

AR LOGO

Boris
Tuesday, November 21, 2017

Hi Team,
how do we build a personal monkey.json file and also the image use to build the AR head?

regards

user profile image
Support Team  (expert)
Monday, November 27, 2017

Hi,
the monkey is the default blender model, imported in MeshLab and exported as json.
Best,

Boris
Friday, December 1, 2017

Hi,
for instance I want to display but a car instead of the head how do I proceed to get the .png of my 3D image and the corresponding .json file

user profile image
Support Team  (expert)
Monday, December 4, 2017

The renderer in the tutorials is a simplified one used for testing and for easy display of content.
It can render objects with a single mesh and a single materia plus a single UV backed texture.

So once you have your 3D model of a car (made of a single mesh and a single UV backed texture) you need to import that model in MeshLab (http://www.meshlab.net/) and export it in JSON format. You can then put the json mesh and the png texture in the app asset and load it using the Mesh.java class:
ih the ARRenderer class you need to add a new member variable for your car object

private Mesh carMesh = null;
and for example in the onSurfaceCreated create and load the new mesh
carMesh = new Mesh();

carMesh.InitMesh(context.getAssets(),"media/car.json", "media/car.png");
assuming you exported your car model as car.json and car.png texture.
Then you can draw it in the onDrawFrame function of the same class as per the tutorial.

Best,
Support Team.

Boris
Tuesday, December 12, 2017

Thanks,
How do I proceed to get the .png file that have a view of all the part of my 3D model?

user profile image
Support Team  (expert)
Tuesday, December 12, 2017

Hi,
the texture is created through a process usually referred to baking, a fairly common process used in the CG and video game development communities to create efficient low size 3D models of objects with as many detail as possible baked on a texture. It largely depends on the computer graphic and 3D modeling software you're using, Blender for example has a very good and fairly easy baking tool (https://docs.blender.org/manual/en/dev/render/blender_render/bake.html).

Best,
Support Team

Praveen Kumar
Monday, January 29, 2018

Hi,

I have created the texture png file, but I could not save the created file, it is created through using blender tool.

user profile image
Support Team  (expert)
Tuesday, January 30, 2018

Hi,
You mean saving the baked texture in blender?
If you switch the main view to "UV/Image Editor" an "Image" menu should appear with a "Save Image" function. Or you can just press F3 with your image showing in "UV/Image Editor" mode.

Sign in to add a comment