Hi, are there already ideas/samples on how to integrate ARjs or MindARjs? Playing around with it, but I can’t show the camera image within the browser. It’s “overlayed” by the Unity camera
by user 474974683163394049
Hi, are there already ideas/samples on how to integrate ARjs or MindARjs? Playing around with it, but I can’t show the camera image within the browser. It’s “overlayed” by the Unity camera
by user 474974683163394049
Changed the channel name: Integration ARjs or MindARjs
by user 474974683163394049
Hey there are no samples right now. We’ve experimented with both briefly but didnt get back to testing either again (altough it is planned).
Can you share some more about the issue you currently face? Which library are you currently trying to get working?
If I recall correctly when we looked into it the issue was that both AR.js and MindAR.js assume full control over the camera, so things behave strangely when there’s another camera assuming control.
Hi, I’m playing around with both atm. As @herbst🌵 already mentioned, a second camera doesn’t work out of the box. My experiments were just to add a second camera within the
to start tracking and then “transfer” the tracked coordinates to a gameObject. I further tried to get the camera image into the NeedleCanvas, but without being able to access the “Unity Camera” this isn’t possible I guess. Pretty sure my approach is completely wrong, but playing around is part of the journeyby user 474974683163394049
You can access the Needle cam from the outside if that helps.
If you have a reference to the <needle-engine>
component you can access it via needle_engine_component.getContext().then(ctx => ctx.mainCamera);
for example
assuming needle_engine_component
is a variable name. Alternatively document.querySelector("needle-engine").getContext().then(...
Ah, thank you for the hint I’ll try to get it working and will post here if I achieve smth.
by user 474974683163394049
Just a short update here: Managed to get AR.js MarkerTracking up and running Just needed some lines of Three.js. Tracking works, but there is no Webcam image background
I’ll share to code asap here on Discord.
by user 474974683163394049
Awesome, happy to help integrate and make this work properly
Great to hear youre making progress
I think I’m on the brink of solving the background camera thing, but one thing makes me wonder. Even though my WebGLRenderer has alpha = true and the clear color is set to 0 it still overlaps my webcam rendering…
by user 474974683163394049
by user 474974683163394049
I’d say, when I can make the SolidColor ClearFlags transparent, everything should work out with ARjs
by user 474974683163394049
Have you tried setting the backgroundColor of the camera component (!!) To solid and alpha 0?
You can do that in unity for testing
The camera component does usually set those values
yes, i tried that. Results in the black background that you see in the screenshot posted earlier.
by user 474974683163394049
With alpha 0 in unity?