0

I've recently made a box in real life that I 3D-scanned and created a multi target with in Vuforia.

Now I want a game object to be shown when I point my camera at the box (in this case a tea pot).

It works, but it only shows the parts of the tea pot that are sticking out of the box. When you are looking at the box, it's supposed to show the entire tea pot, not just that one part outside of the box.

I couldn't find any resources on this.

I can easily layer it on top of one of the sides Object showing on top of a side

But when I put the tea pot into the box, it shows up like this: Tea pot not showing properly inside the box

So how can I layer it properly or make the tea pot appear completely? I haven't found a single guide or tutorial, any useful resource on this in the first place. I'm not even in the clear what the right term is for the functionality I'm trying to create here.

Any help would be highly appreciated.

Hans Lung
  • 11
  • 3
  • afaik Vuforia places some kind of overlay box/background on the target by default .. I think it is related to the `RenderOcclusionLayer` shader it should have on – derHugo Sep 14 '22 at 06:45
  • @Everts this has nothing to do blackface rendering. The model just "disappears" inside the target cube .. but it is still rendered from the outside as we see it ... you just only see the tip of it sticking out of the cube – derHugo Sep 14 '22 at 06:47
  • @derHugo Yea, it's being rendered, but only the parts outside of the box are visible, instead of the entire object. The box is a multi target generated through Vuforia, and the tea pot (the model inside) is just a regular game object. – Hans Lung Sep 14 '22 at 06:53
  • exactly.. as said afaik Vuforia for all targets per default spawns an object with a `RenderOcclusionLayer` shader on it .. with does exactly that .. occlude everything behind ... I haven't used Vuforia for a while but I'm sure it can somehow be disabled – derHugo Sep 14 '22 at 06:54
  • See here https://developer.vuforia.com/forum/unity-extension-technical-discussion/multi-target-eg-showing-objects-if-they-were-inside-box you can change the material of the tracked box to anything else that is e.g. transparent... you probably could even just disable its renderer component so it doesn't display the box itself at all – derHugo Sep 14 '22 at 06:58
  • @derHugo I previously disabled the Mesh Renderer before, but this caused the apk to become unable to show the tea pot at all. It didn't pick up the box input anymore. – Hans Lung Sep 14 '22 at 07:15

0 Answers0