Topic locked

Occlusion Management sample - broken in Unity 5

October 2, 2015 - 9:13am #1

Hi Alessandro

Just playing around with this and saw the release notes:

Occlusion Management sample

  • Flakes box appears opaque in Unity 5 Editor

 

It seems the transparent shader is broken in Unity 5 in the Editor and on the device I am using for testing - Sony Z4 tablet.  So in this case I cannot see the teapot when the target is  recognised.

Any ideas for a workaround or when there could be a fix?

 

cheers

Nalin

 

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 6:05am #9

I see, the screenshot shows that you had some BTA component where you should have OM ones; probably just some accidentally wrong package import steps or so.

Glad it is all sorted now.

 

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 5:45am #8

Hi Alessandro

I got to the bottom of this problem.

When the Occlusion sample was imported into my existing project, the SceneManager/AppManager became corrupted somehow - don't know exactly but I have captured a screenshot to highlight.

When I changed these components back to what they should be then everything worked ok.

Thanks for your help here :)

cheers

Nalin

AttachmentSize
Image icon VuforiaOcclusionSampleProblem.png628.83 KB

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 5:36am #7

If the sample works as standalone,   there might be some issue in your setup such as (just to mention a very basic one, but could be others), the Dataset of the teapot target has not been loaded or activated (hence the teapot does not show), ... 

 

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 5:14am #6

I ran it in a standalone new project on Unity5.2.0 and it works fine.

However when I ran it in an existing Unity5.2.0 with other vuforia samples, then I get the problem of no teapot?

How strange - I wonder if maybe one of the other Vuforia samples could be interfering with it? maybe a prefab thing?

 

Nalin

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 5:10am #5

Same (working fine) if I run on Mac...

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 5:06am #4

Hi Nalin,

the shader code in question is in RenderOcclusionLayer.shader, and this is the line you have to change:

#pragma surface surf Lambert alpha:fade

Here it seems to work fine, as I've tested on Windows Play Mode - Unity 5.2.1:

See attached screenshot ;-)

 

Are you on Mac OS ? 

A.

 

 

AttachmentSize
Image icon OM-505-PlayMode-Unity521-Windows.png488.83 KB

Occlusion Management sample - broken in Unity 5

October 5, 2015 - 4:41am #3

Thanks Alessandro

On Unity 5.2 this helps, but unfortunately the teapot is still not visible after I make the change:(  whereas in Unity 4.6 the teapot is visible.  I am testing in Play mode in both cases initially.

Do you have any idea why this might be?

 

cheers

Nalin

Occlusion Management sample - broken in Unity 5

October 4, 2015 - 12:04pm #2

Hi Nalin,

one of the shaders in the sample has a line of code saying:

#pragma surface Lambert  alpha

this works fine in Unity 4, but in Unity 5 you need to add ":fade" next to the "alpha" parameter,i.e.:

#pragma surface Lambert  alpha:fade

Topic locked