Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] java – place bitmaps from gallery on walls using sceneform

Posted on November 14, 2022

Solution 1 :

you can detect the walls by creating a custom arfragment and making it detect planes vertically then you can place anchors on the wall . Another option will be using markers on the wall

Problem :

hi i want to create some thing like this
picture that

but i do not know how to place anchors on a wall and place images on the wall using those anchors

 AR fragment
fragment = (ArFragment) 
getSupportFragmentManager().findFragmentById(R.id.sceneform_fragment);

CompletableFuture<ViewRenderable> imgView = ViewRenderable.builder()
        .setView(this, R.layout.textview)
        .build();

CompletableFuture.allOf(imgView).handle((notUsed, throwable) -> {
    // When you build a Renderable, Sceneform loads its resources in the background while
    // returning a CompletableFuture. Call handle(), thenAccept(), or check isDone()
    // before calling get().

    if (throwable != null) {

        Log.d("MainActivity", "onCreate: " + "Unable to load renderable");
        return null;
    }

    try {

        imageViewRenderable = imgView.get();

    } catch (InterruptedException | ExecutionException ex) {
        Log.d("MainActivity", "onCreate: Unable to load renderable");

    }

    return null;
});

try {
    mArSession = new Session(this);
} catch (UnavailableArcoreNotInstalledException e) {
    e.printStackTrace();
} catch (UnavailableApkTooOldException e) {
    e.printStackTrace();
} catch (UnavailableSdkTooOldException e) {
    e.printStackTrace();
} catch (UnavailableDeviceNotCompatibleException e) {
    e.printStackTrace();
}

mArConfig = new Config(mArSession);
mArConfig.setUpdateMode(Config.UpdateMode.LATEST_CAMERA_IMAGE);
mArConfig.setPlaneFindingMode(Config.PlaneFindingMode.VERTICAL);
mArSession.configure(mArConfig);

fragment.getArSceneView().setupSession(mArSession);

fragment.setOnTapArPlaneListener((HitResult hitresult, Plane plane, MotionEvent motionevent) -> {
            Anchor anchor = hitresult.createAnchor();
            AnchorNode anchorNode = new AnchorNode(anchor);

            anchorNode.setParent(fragment.getArSceneView().getScene());
            TransformableNode art = new TransformableNode(fragment.getTransformationSystem());
            art.setParent(anchorNode);
            art.setRenderable(imageViewRenderable);
            art.select();

            ImageView imageView = (ImageView)imageViewRenderable.getView();
            Picasso.get().load("http://www.cbk-enschede.nl/plaatjes/ens/jpg/GSA023.jpg").into(imageView);

        }
);

this is the code that i got from a question on stackoverflow this is the one i want my user to be able to add images from gallery to the wall

Comments

Comment posted by developers.google.com/ar/develop/c/augmented-images

Have you read:

Comment posted by Kashif Mehmood

i dont want to augument using an image did u saw the link i included?

Comment posted by ARCore – How to place/create objects on surfaces like walls without any Feature Points?

So more like:

Comment posted by Kashif Mehmood

yes more like that

READ  [ANSWERED] android - Flutter app stuck on splash screen on release
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress