Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Does Unity Recorder Supports Shader Graphs Materials?

Discussion in 'Audio & Video' started by SaidHoca, Sep 6, 2022.

  1. SaidHoca

    SaidHoca

    Joined:
    Jan 7, 2019
    Posts:
    9
    Hello.

    I want to record video of my game. I used URP and Shader Graph. The Recorder records everything properly, but the materials I create with the Shader Graph disappear as soon as I start recording. I have used Recorder in more than 50 of my games so far without any problems. This is my first time encountering something like this. Anyone know the cause or solution?

    Unity Version : 2021.2.7
    Recorder Version : 3.0.3
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hello,

    Are these materials created by code or UI?
    Do the materials disappear if you just enter playmode ? If yes, you are probably facing some persistency issue: materials are created but saved to a file, thus on DomainReload they get lost.

    Hope this helps.
     
  3. SaidHoca

    SaidHoca

    Joined:
    Jan 7, 2019
    Posts:
    9
    Thank you vladala :)

    There is no problem in Play mode or when I install and play on the phone. Only when I start recording video with Recorder it suddenly disappears. Materials were created with the Shader Graph.
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    This might not be helpful, but lat week I had a two Timelines with 2 characters which used the same Shader Graph where one character appeared, the other did not. Both were visible in Play mode, but one character disappeared in Record mode. I never worked out why. I created new TImelines and copied the animation tracks across and it started working. Completely baffled me (I will admit that is not a rare occurrence!). (HDRP 13.something, 2022.1.1f1)
     
  5. SaidHoca

    SaidHoca

    Joined:
    Jan 7, 2019
    Posts:
    9
    I updated unity version but the problem still persists. :(
     
  6. SaidHoca

    SaidHoca

    Joined:
    Jan 7, 2019
    Posts:
    9
    is there any solution? :(
     
  7. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    It feels like a bug somewhere. Normally it works fine, but sometimes... Best chance of getting it fixed is if you can repeat in a small project and upload it via bug reporting. They have fixed a few bugs I have reported this way. But shader graphs do work with the recorder, just sometimes I had an issue. So I have seen it, but cannot repeat it reliably.
     
  8. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Just a crazy idea out there:
    The recorder disables Async Shader compilation since otherwise you'd get a blue material for all materials that are not compiled.
    Maybe this setting is not obeyed by ShaderGraph and instead of compiling it early returns with garbage materials ?
    Could you disable this by hand in the project settings and work like that for a while ? If the instability goes away, we found our culprit.
     
  9. SaidHoca

    SaidHoca

    Joined:
    Jan 7, 2019
    Posts:
    9
    I tried it didn't work. Now I decided to take the video recording with third party software. It's not a big deal, I still love Unity :)

    Thank you all for your valuable answers :)