How does a layering of different projected objects work

hey, I am starting with a project and I am asking myself how to solve a layering of diffrent objects. I wanted to projects one big Image and ontop of it some 3D objects. How can I say in which order my objects have to be renderd that they overlap in the right order?

Also I want to seperate the image recognition from the background to the objects on top of it. Is it possible to use two AR Session Origins?

This problem means by two separate images, or one image for both of them?
Even so, I think it’s only the position order on after the system recognize the image/some markers.
By this, we have to render the object over the image targer/marker.

Probably the sample from AR Foundation is using prefab to show 3D object onto the image.
This will not solve the problem, as because prefab showing is actually to show that image tracking is working.
By this, a custom script to place the object over the image after the system recognize the image.

We can use the ImageTracking example (AR tracked image manager | AR Foundation | 4.2.10).
After the system recognize, I personally use the function on:

foreach (var newImage in eventArgs.added)
{
    ....
}

Then get the position of the newImage (as it should be the image target position of the world coordinate system).

By this, either you have your own solution is fine.
I personally will create a dummy/empty GameObject on that position, using the position and rotation of tracked image.
Then, we can put any 3D object under this empty GameObject, as this one represent as the tracked image.

Under this empty GameObject, for example:

  • the big image will be on (0,0,0) position
  • the 3d object, e.g., cube, will be on (0,1,0) which means has 1 point plus in Y axis, which positioned above the big image

Hopefully can help.