Hi there, experienced XR developer here but a newbie on 8thwall… I am a bit confused on the “image target + SLAM” subject (talking about A-Frame). I understand that I can basically do easy image targeting with the xrextras-named-image-target component, but this has obviously a hide-children-on-image-lost behaviour. I see that your approach in the library is to basically create a custom component spawning 3D stuff on image show, and never hide on image lost, and this “just works”. I see also that you can turn SLAM on and off with xrweb=“disableWorldTracking: true/false” in the Scene (or something like that…).
So, I am asking how do your world tracking, or call it SLAM tracking, works… is it “always on”? I was expecting to have to turn it on explicitly somewhere… do you have any reference to technical documentation about this subject?
I must basically do an image target + SLAM of a roman vase plus clickable hotspots, and I am trying to understand how to organize the code. The hotspot demo is world tracked and made all in the body.html file (very easy), so I was thinking it would have been a breeze to add an initial image tracking to set an absolute initial position via xrextras-named-image-target, but it seems to me this is not feasible because this turns everything to an image-tracked-only experience turning the SLAM off (or, at least rendering it unuseful because the model hides on image-lost event), and I will have to move all the 3D spawning stuff in a custom component to keep both the image tracking and the SLAM working like you do in your examples…
I’d be happy to help clarify your question. SLAM, also known as world effects, isn’t always active. We specifically recommend turning this off for image target-based experiences to optimize processing capabilities. If you are using an image target to place AR content and position/scale it, there is no need to run a SLAM engine in the background.
As stated in our documentation:
Image targets can work in tandem with our World Tracking (SLAM), enabling experiences that combine image targets and markerless tracking.
You may track up to 5 image targets simultaneously with World Tracking enabled or up to 10 when it is disabled.
Now, regarding the sample project you referenced:
This project places a 3D model in SLAM when the xrimagefound event is triggered. However, there are other ways to interact with SLAM and image targets, as shown in these example projects:
This project allows you to spawn physics objects that initially position from the image target and fall onto the detected horizontal surface: Image Target to SLAM | 8th Wall | 8th Wall
If you want to use image target only, you can certainly write a custom image target component and just remove the reference to where 3D models are hidden on xrimagelost event.
Hi there, I have a similar problem with my project and want to use several image targets simultaneously with World Tracking. I looked at the proposed projects, but faced an issue with the image targets. The model is spawn independent of the image target named. So if I have
and point my device to another image target (e.g. “image-target2”), the model still spawns. I think this is because the EventHandler is added to the whole scene in components.js, i.e.:
Hiya @ELLSI_Lab - I’m wrapping up on an 8th Wall image tracking project, it contains code to handle more than 5 image targets using SLAM ( or more than 10 when not ) where each image target spawns a different 3D model .
Its definitely possible to solve your issue, you will just need to do some custom coding.