Search Unity

Assertion failed: Assertion failed on expression: 'IsMatrixValid(matrix)'

Discussion in 'AR/VR (XR) Discussion' started by mmsteve, Aug 7, 2017.

  1. mmsteve

    mmsteve

    Joined:
    Aug 7, 2017
    Posts:
    12
    Hi guys,

    I am having an issue in an app I am working on which I can view 360 degree stereo videos. I am currently using the Oculus Rift to build it and for that I am using the native Unity VR API's.

    Since I am rendering a different image in each eye, I must use the "Target Eye" serialized camera property to ensure that each eye renders correctly. Unfortunately, I am getting absolutely bombarded with the following error:
    Assertion failed: Assertion failed on expression: 'IsMatrixValid(matrix)'

    This error stops when I disable the Right Eye camera or just set the right eye camera's target eye to left.

    This issue can be
     
  2. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    Hi,
    I have not used unity VR API (I use googleVR).
    I can only think matrix maybe null or something.
    Post your code up in code tags, for folk to check.
     
  3. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
  4. mmsteve

    mmsteve

    Joined:
    Aug 7, 2017
    Posts:
    12
    @SiliconDroid No code is necessary to reproduce the problem. It's all scene manipulation. Simply:

    • Setup the project for VR via the player settings as normal
    • Add 2 cameras
    • Set one camera to left eye target, set the other to right eye target
    • Place both cameras at the origin
    • Add a unity sphere at the origin
    • Set the scale of the sphere to 100x100x100
    Now when you press play you should be spammed by the error. The error immediately stops when moving the camera outside of the sphere, disabling the right eye camera or setting the right eye camera's target to left.
     
    SuHlaingHnin likes this.
  5. mmsteve

    mmsteve

    Joined:
    Aug 7, 2017
    Posts:
    12
    Nobody has any ideas on this? Has anyone been able to replicate this issue? I am on version 2017.1.0f3
     
  6. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
  7. mmsteve

    mmsteve

    Joined:
    Aug 7, 2017
    Posts:
    12
    Do you have any source to say that using a shader is more performant? I am trying to do it the camera route as that is the advised cross hmd and platform native vr API methodology and I would like to attack the problem correctly.

    I am perfectly capable of writing a shader to solve the problem myself if that is the route I choose to go down, but nice job advertising your product and trying to shove it down my throat so I can bypass bugs that should be solved officially.

    I do appreciate the links however.
     
  8. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    'Do you have any source to say that using a shader is more performant?'
    Common sense. Here's a hint, it's faster for a GPU to render 1 mesh than 2.

    "I am perfectly capable of writing a shader to solve the problem myself if that is the route I choose to go down"
    You expect me to believe you can write a complex shader when you don't know why rendering 1 mesh is faster than rendering 2? OK

    "Nice job advertising your product and trying to shove it down my throat"
    Mate I don't care about your $15, you posted an error that I obviously have more experience with than you do, and I'm the only person who has responded with an actual solution. Admittedly I regret trying to help you as your an asshat, but hopefully someone else finds some use from this forum post.

    Have fun with your errors.
     
    Last edited: Aug 9, 2017