Announcement

Collapse
No announcement yet.

[ARkit] Custom Material for Debug Draw Tracked Geometry

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [ARkit] Custom Material for Debug Draw Tracked Geometry

    Hi guys,I just want to know how cound I apply a custom material for the tracked plane.
    Any suggestion?

    Maybe like this?
    Attached Files
    Last edited by Chnama; 04-20-2018, 03:40 AM.

    #2
    I would also like to know this

    Comment


      #3
      I managed to do this by duplicating what the ARCore Hellow AR sample project does (It has a working example of this but seems to use some custom ARCore functions). It creates and resizes a procedural mesh component to match the tracked surface geometry on each tick. It was not easy to recreate this in blueprints only so it also works on ARKit , but managed to work it out eventually after a lot of trial and error
      Headgear - VR/AR solutions

      Mobile VR Game: We Come In Peace... Oculus GearVR | Google Play Daydream | Pico Goblin

      Comment


        #4
        Here is the my surface mesh blueprint that works for ARKit and ARCore added to the default Handheld AR template:

        https://www.filehosting.org/file/det...urfaceMesh.zip

        It's not 100% perfect but has faded edges like the google arcore material does it.

        I added a custom function updatePlanes to the main AR pawn blueprint which loads a proceedural mesh blueprint. It is dynamically resized on tick.
        It was good enough for my project and hopefully helps someone that also wanted to keep their project blueprints

        To put this in your own project:
        1. Migrate the asset: proceduralMesh_BP using the engine migrate function. It will copy the material and texture with it then
        2. Copy the updatePlanes function (located in BP_ARPawn) into your pawn and create all the required variables (just right mouse click on them and hit 'create variable')
        3. Call this function when required



        PS: Someone that understands procedural meshes more could vastly improve that mesh creation logic I have in there I guess to better fit the area
        Last edited by aussieburger; 10-12-2018, 10:11 AM.
        Headgear - VR/AR solutions

        Mobile VR Game: We Come In Peace... Oculus GearVR | Google Play Daydream | Pico Goblin

        Comment


          #5
          Originally posted by aussieburger View Post
          Here is the my surface mesh blueprint that works for ARKit and ARCore added to the default Handheld AR template:
          Thank you so much for sharing this.

          Comment


            #6
            Tremendous! What a fantastic custom function you've built! Most grateful for this dude!!

            Comment


              #7
              The ARCore CloudARPin sample also provides a ARPlaneRenderer Actor class that convert ARPlaneGeometry to procedural mesh. It works on both iOS with ARKit and Android with ARCore.

              You can check it out here: https://github.com/google-ar/arcore-...laneRenderer.h

              Comment


                #8
                Originally posted by Bo Pang View Post
                The ARCore CloudARPin sample also provides a ARPlaneRenderer Actor class that convert ARPlaneGeometry to procedural mesh. It works on both iOS with ARKit and Android with ARCore.

                You can check it out here: https://github.com/google-ar/arcore-...laneRenderer.h
                Hi Bo,
                Just did as you suggested, thanks for sharing. Looking forward to the new AR updates & samples coming up in 4.21, exiting time to be in AR!

                Comment


                  #9
                  Originally posted by aussieburger View Post
                  Here is the my surface mesh blueprint that works for ARKit and ARCore added to the default Handheld AR template:

                  https://www.filehosting.org/file/det...urfaceMesh.zip

                  It's not 100% perfect but has faded edges like the google arcore material does it.

                  I added a custom function updatePlanes to the main AR pawn blueprint which loads a proceedural mesh blueprint. It is dynamically resized on tick.
                  It was good enough for my project and hopefully helps someone that also wanted to keep their project blueprints

                  To put this in your own project:
                  1. Migrate the asset: proceduralMesh_BP using the engine migrate function. It will copy the material and texture with it then
                  2. Copy the updatePlanes function (located in BP_ARPawn) into your pawn and create all the required variables (just right mouse click on them and hit 'create variable')
                  3. Call this function when required



                  PS: Someone that understands procedural meshes more could vastly improve that mesh creation logic I have in there I guess to better fit the area
                  Thanks for your contribution!! really useful!

                  Comment


                    #10
                    Originally posted by aussieburger View Post
                    Here is the my surface mesh blueprint that works for ARKit and ARCore added to the default Handheld AR template:

                    https://www.filehosting.org/file/det...urfaceMesh.zip

                    It's not 100% perfect but has faded edges like the google arcore material does it.

                    I added a custom function updatePlanes to the main AR pawn blueprint which loads a proceedural mesh blueprint. It is dynamically resized on tick.
                    It was good enough for my project and hopefully helps someone that also wanted to keep their project blueprints

                    To put this in your own project:
                    1. Migrate the asset: proceduralMesh_BP using the engine migrate function. It will copy the material and texture with it then
                    2. Copy the updatePlanes function (located in BP_ARPawn) into your pawn and create all the required variables (just right mouse click on them and hit 'create variable')
                    3. Call this function when required



                    PS: Someone that understands procedural meshes more could vastly improve that mesh creation logic I have in there I guess to better fit the area
                    Please can you post a screenshot of your blueprint as the download link isn't working for me?

                    Comment


                      #11
                      A big great THANK YOU from my side for sharing this

                      .. i wondered why all planes where drawing as horizontal planes...verticals where generated as horizontal planes, too.
                      I added the actor rotation to your UpdatePlanes-Function and now they are oriented correct for all...everything of your blueprint works really nice...great work.

                      that´s only my little drop to your hard work...

                      see:
                      Click image for larger version  Name:	orientation.jpg Views:	1 Size:	228.0 KB ID:	1618167
                      Last edited by kirbytt; 05-11-2019, 09:06 PM.

                      Comment


                        #12
                        Hi, can someone share the zip, as I'm in no way able to download it from the linke above. The strange site always tells me that email-provider is not supported !?
                        Andy Probst
                        Head of R&D / VR - Meilenstein Digital GmbH

                        Comment

                        Working...
                        X