sceneform

localRotation is not rotating around the cube center

不羁的心 提交于 2020-07-23 06:45:34
问题 The bounty expires in 6 days . Answers to this question are eligible for a +50 reputation bounty. Prcela wants to draw more attention to this question. Sceneform 1.15 on Android Cube renderable that is set to node is not rotating around the node centar. val anchorNode = AnchorNode().apply { setParent(scene) worldPosition = Vector3(2f, 3f, 0f) } scene.addChild(anchorNode) dieNode = Node().apply { setParent(anchorNode) localRotation = Quaternion.eulerAngles(Vector3(10f,20f,60f)) name = "die"

localRotation is not rotating around the cube center

*爱你&永不变心* 提交于 2020-07-23 06:44:12
问题 The bounty expires in 6 days . Answers to this question are eligible for a +50 reputation bounty. Prcela wants to draw more attention to this question. Sceneform 1.15 on Android Cube renderable that is set to node is not rotating around the node centar. val anchorNode = AnchorNode().apply { setParent(scene) worldPosition = Vector3(2f, 3f, 0f) } scene.addChild(anchorNode) dieNode = Node().apply { setParent(anchorNode) localRotation = Quaternion.eulerAngles(Vector3(10f,20f,60f)) name = "die"

Google Sceneform – Is it deprecated? Any replacement?

不羁岁月 提交于 2020-07-17 10:28:26
问题 I use in my ARCore project Sceneform. It seems that this project is now mentioned as Archived by Google. More info we can find here or on this page. I don't understand if Google really abandoned this SDK, or if it is - or will be - directly integrated in ARCore SDK? Thanks for any information concerning the future of this SDK and a potential replacements. 回答1: About 3 last versions At the moment there are three last versions of Sceneform : Sceneform 1.17 (at the moment working with artifacts)

Changing Textures of Object in AR core in runtime

狂风中的少年 提交于 2020-06-25 05:37:27
问题 I am creating an app where I need to change textures(pattern) of my 3d object. I am using AR Core SDK and android. I have used the below code but it is not working. Texture.builder() .setSource(this,R.drawable.fabric3) .build() .thenAccept(t -> { BaseTransformableNode node = arFragment.getTransformationSystem().getSelectedNode(); if(node!=null){ node.getRenderable().getMaterial().setTexture("baseColorMap",t); } }); Documentation is also not helping me much. This is my SFA file { animations: [

Changing Textures of Object in AR core in runtime

南楼画角 提交于 2020-06-25 05:37:10
问题 I am creating an app where I need to change textures(pattern) of my 3d object. I am using AR Core SDK and android. I have used the below code but it is not working. Texture.builder() .setSource(this,R.drawable.fabric3) .build() .thenAccept(t -> { BaseTransformableNode node = arFragment.getTransformationSystem().getSelectedNode(); if(node!=null){ node.getRenderable().getMaterial().setTexture("baseColorMap",t); } }); Documentation is also not helping me much. This is my SFA file { animations: [

Error when importing Sceneform Asset for obj and gltf file

一曲冷凌霜 提交于 2020-05-29 11:58:08
问题 I get this error while importing Sceneform Asset: Gradle build failed with new import rules. Would you like to revert the changes? and the options are Revert and Keepbroken gradle changes. A error messege also pops up: Error: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.android.tools.idea.templates.recipe.RecipeExecutor.append(Ljava/io/File;Ljava/io/File;)V 回答1: I think it is a problem with Android studio 3.6, I reverted to 3.5.1 and the import worked fine. With 3.6 I got the

Sceneform generates sfb files without colors

徘徊边缘 提交于 2020-04-30 08:47:20
问题 I have problem with the objects generated from Google Sceneform Tools ​(Beta)​ v1.13.0 in Android Studio. I downloaded the object ( .obj file ) from poly and imported to Blender to change the dimensions. After that exported again as .obj file . When I use it to generate .sfb file in Android Studio with Sceneform tools, the .sfb object that is generated is only black. Left is object ( .obj and .mtl ) imported in Blender , and right is generated .sfb file in AndroidStudio. Thanks in advance.

How to monitor my current position in ARCore and Sceneform?

自古美人都是妖i 提交于 2020-03-26 03:17:09
问题 In application with ARCore and Sceneform I need somehow monitor my (device, really) movement in ARCore space? As result I want to draw a ray from selected point ( Anchor / AnchorNode ) through my current position, or to calculate distance from selected point to here, and update them during movement. I have ideas, how to calculate or draw, but how to get updates? 回答1: First setup an On Update listener fragment.getArSceneView().getScene().addOnUpdateListener(frameTime -> { fragment.onUpdate

ARCORE: remove a specific renderable by clicking on this renderable

纵饮孤独 提交于 2020-01-24 17:28:07
问题 I'm working on a project using Sceneform from ARCore. I develop it base on HelloSceneform example provided by ARCore. What I wanna do is adding a renderable object by a hit and then delete it when I click on the specific renderable on the screen. I've tried method AnchorNode.setOnTapListener as following, but it didn't work(no response): anchorNode.setOnTapListener(new Node.OnTapListener() { @Override public void onTap(HitTestResult hitTestResult, MotionEvent motionEvent) { if(anchorNode

Problematically rotate 3D model using Sceneform ecosystem

自古美人都是妖i 提交于 2020-01-14 07:41:31
问题 I'm using the Sceneform SDK in Android Project. I have sfb and the sfa objects in my project, and I want the initial rotation of my object to be rotated 90 degrees. How can I achieve it? I found the next code in these files and I changed the scale. But I didn't find a way for the rotation. model: { attributes: [ "Position", "TexCoord", "Orientation", ], collision: {}, file: "sampledata/models/redmixer.obj", name: "redmixer", scale: 0.010015, }, 回答1: I have used setLocalRotation to