how to load multiple 2D texture on a single 3D Object in AR Core
Asked
Active
Viewed 293 times
2 Answers
0
It has nothing to do with arcore. Answer on your question is based on the 3d engine you are using. Arcore is not a 3d engine

Fixus
- 4,631
- 10
- 38
- 67
-
if (preferenceHelper.getStringValue("png") == Writing_Table_black) { WritingTable.createOnGlThread(/*context=*/this, Writing_Table_obj, Writing_Table_black); WritingTable.setMaterialProperties(0.0f, 3.5f, 1.0f, 6.0f); drawObj(WritingTable, viewmtx, projmtx, lightIntensity); } – Mani Kandan Apr 02 '18 at 06:24
-
actually I've update the draw value when clicked particular color from the list. Its working but after some times session was going to pause stage .. so got session expires issue..how to fix that problem? @Fixus – Mani Kandan Apr 02 '18 at 06:27
-
@ManiKandan I have no idea what are you talking about to be honest :) again your code has nothing to do with ARCore itself. You're asking this question in wrong place. Your problem is related with the 3D Engine you`re using (as I understand it is OpenGL) not ARCore itself. Those are two different tools – Fixus Apr 02 '18 at 07:20
0
private void drawObj(ObjectRenderer mVirtualObject2, float[] viewmtx, float[] projmtx, float lightIntensity) {
for (Anchor anchor : anchors) {
if (anchor.getTrackingState() != TrackingState.TRACKING) {
continue;
}
// Get the current pose of an Anchor in world space. The Anchor pose is updated
// during calls to session.update() as ARCore refines its estimate of the world.
anchor.getPose().toMatrix(mAnchorMatrix, 0);
// Update and draw the model and its shadow.
mVirtualObject2.updateModelMatrix(mAnchorMatrix, 1);
mVirtualObject2.draw(viewmtx, projmtx, lightIntensity);
}
}

Mani Kandan
- 19
- 3