标签: sceneform

Google Sceneform – 是否已弃用?有什么替代品吗?

我在我的 ARCore 项目 Sceneform 中使用。似乎这个项目现在被称为Google Archived。我们可以在此处或此页面上找到更多信息。

我不明白谷歌是否真的放弃了这个 SDK,或者它是否 - 或将 - 直接集成到 ARCore SDK 中?

感谢您提供有关此 SDK 未来和潜在替代品的任何信息。

android augmented-reality arcore sceneform

31
推荐指数
3
解决办法
8870
查看次数

如何在Sceneform中实现环境HDR照明估算?

我正在尝试使用新的Google API API环境HDR进行照明估算。我正在按照开发人员指南中的说明进行操作,但是我不知道如何实现特定于应用程序的代码。

我已经像这样配置会话:

config.setLightEstimationMode(Config.LightEstimationMode.ENVIRONMENTAL_HDR);
session.configure(config);
Run Code Online (Sandbox Code Playgroud)

并将此代码放入我的更新调用中

private void onSceneUpdate(FrameTime frameTime) {

    if (fragment instanceof ArFragment && loadedRenderable) {

        if ( frame == null )
            return;
            LightEstimate lightEstimate = frame.getLightEstimate();
            // note - currently only out param.
            float[] intensity = lightEstimate.getEnvironmentalHdrMainLightIntensity(); 
            float[] direction = lightEstimate.getEnvironmentalHdrMainLightDirection();
            //app.setDirectionalLightValues(intensity, direction);

            float[] harmonics = lightEstimate.getEnvironmentalHdrAmbientSphericalHarmonics();
            //app.setAmbientSphericalHarmonicsLightValues(harmonics); // app-specific code.

            // Get HDR environmental lighting as a cubemap in linear color space.
            Image[] lightmaps = lightEstimate.acquireEnvironmentalHdrCubeMap();

            for (int i = 0; i < …
Run Code Online (Sandbox Code Playgroud)

java augmented-reality arcore sceneform

9
推荐指数
0
解决办法
194
查看次数

用于ARCode应用程序开发的OBJ文件

在ARCore示例中,andy.obj文件的意义是什么?假设我们用新图像替换andy.png,我们如何为新图像生成OBJ文件.

augmented-reality arcore sceneform

8
推荐指数
1
解决办法
2763
查看次数

使用Sceneform生态系统有问题地旋转3D模型

我正在Android Project中使用Sceneform SDK

我的项目中有sfbsfa对象,并且我希望对象的初始旋转被旋转90度。我该如何实现?

我在这些文件中找到了下一个代码,并更改了比例。

但是我没有找到轮换的方法。

model: {
  attributes: [
     "Position",
     "TexCoord",
     "Orientation",
  ],
  collision: {},
  file: "sampledata/models/redmixer.obj",
  name: "redmixer",
  scale: 0.010015,
},
Run Code Online (Sandbox Code Playgroud)

android model augmented-reality arcore sceneform

8
推荐指数
1
解决办法
2238
查看次数

在垂直平面上添加对象始终在AR核心中旋转

在此输入图像描述我在sceneform AR Fragment中的垂直平面上添加了一个图像.但它总是被轮换.代码在水平面上工作正常.我在垂直平面上放置图像的代码如下.

arFragment.setOnTapArPlaneListener { hitResult: HitResult, 
                                         plane: Plane, 
                                   motionEvent: MotionEvent ->

    if(!isOnceTapedOnSurface) {
        val anchor = hitResult.createAnchor()
        val anchorNode = AnchorNode(anchor)
        anchorNode.setParent(arFragment.arSceneView.scene)

        andy = TransformableNode(arFragment.transformationSystem)

        if(plane.type == Plane.Type.VERTICAL) {
            val anchorUp = anchorNode.up
            andy.setLookDirection(Vector3.up(), anchorUp)
        }

        andy.setParent(anchorNode)
        andy.renderable = andyRenderable
        andy.select()

        // arFragment.arSceneView.planeRenderer.isVisible = false
        isOnceTapedOnSurface = true
    }
}
Run Code Online (Sandbox Code Playgroud)

android kotlin arcore sceneform

7
推荐指数
1
解决办法
391
查看次数

Gradle 构建错误:“未找到 ID 为‘c​​om.google.ar.sceneform.plugin’的插件。”

我正在关注此 Sceneform SDK 教程 ( https://www.raywenderlich.com/5485-arcore-sceneform-sdk-getting-started ),并且在构建 Gradle 时遇到了一些问题。这是我的应用 build.gradle 文件:

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'


android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.kotlinfirstapp"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'


    implementation 'com.google.ar.ar:core:1.10.0'
    implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.10.0'
    implementation 'com.google.ar.sceneform:core:1.10.0'
}

apply plugin: 'com.google.ar.sceneform.plugin'

sceneform.asset('sampledata/models/andy.obj', …
Run Code Online (Sandbox Code Playgroud)

android gradle sceneform

7
推荐指数
1
解决办法
2639
查看次数

向 Sceneform 节点添加照明没有效果

我正在关注关于在 SceneView 中将光添加到节点的谷歌开发人员指南:

https://developers.google.com/sceneform/develop/build-scene

Light spotLightYellow =
    Light.builder(this, Light.Type.FOCUSED_SPOTLIGHT)
        .setColor(new Color(android.graphics.Color.YELLOW))
        .setShadowCastingEnabled(true)
        .build();
Run Code Online (Sandbox Code Playgroud)

但是它似乎对我的渲染模型没有任何作用。

还有什么我想念的吗?

 ModelRenderable.builder()
                .setSource(
                        this,
                        Uri.parse(card)
                )
                .build()
                .thenAccept(
                        modelRenderable -> {

                            node.setParent(scene);
                            node.setLocalPosition(vector3);
                            node.setLocalScale(new Vector3(1.4f, 1.4f, 1.4f));
                            node.setName("Test");

                            Light light =
                                   Light.builder(Light.Type.FOCUSED_SPOTLIGHT)
                                   .setColor(new Color(android.graphics.Color.YELLOW))
                                   .setShadowCastingEnabled(true)
                                   .build();

                            node.setLight(light);

                            node.setRenderable(modelRenderable);


                        })
                .exceptionally(
                        throwable -> {
                            Toast toast =
                                    Toast.makeText(this, "Unable to load Fox renderable" + throwable, Toast.LENGTH_LONG);
                            toast.setGravity(Gravity.CENTER, 0, 0);
                            toast.show();
                            return null;
                        });
Run Code Online (Sandbox Code Playgroud)

android sceneview arcore sceneform

7
推荐指数
1
解决办法
309
查看次数

统一与 Sceneform 功能/用例中的 ARCore?

我的理解是有几种环境支持 ARCore,Unity 和 Sceneform SDK 是其中一些选项。

我想知道除了一个在 Java 中,另一个在 C# 中之外,它们之间有什么不同?除了语言偏好之外,为什么有人会选择一种而不是另一种?

谢谢

unity-game-engine augmented-reality android-augmented-reality arcore sceneform

6
推荐指数
1
解决办法
2748
查看次数

如何在 Sceneform Android SDK 中将相机类型更改为正交?

我想在 SceneView 中展示模型时使用正交相机(没有 AR)。在 API 中找不到这样做的方法。我是否遗漏了什么或缺少该功能?

android augmented-reality kotlin arcore sceneform

6
推荐指数
1
解决办法
609
查看次数

导入 Sceneform 资产不会生成 .sfa 和 .sfb 文件

当我尝试导入场景形式资产并在弹出的窗口上按完成时,没有任何反应。没有生成 .sfa、.sfb 文件。在 build.gradle 文件中也没有生成任何内容。我不得不提一下,我导入了之前在同一个项目中的场景资产,一切正常,但现在(一段时间后)当我再次尝试时它不起作用。

import assets android-studio arcore sceneform

6
推荐指数
2
解决办法
3767
查看次数