Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question render and record faster than realtime

Discussion in 'Audio & Video' started by cdg720, Mar 23, 2022.

  1. cdg720

    cdg720

    Joined:
    Mar 1, 2022
    Posts:
    4
    Hi,

    I am using Unity to create movies and I'd like to reduce rendering time. My movies are simple and a second scene be can rendered much quicker than a second.

    From what I gather, you could change TimeScale and framerate to effectively reduce the rendering time. But this is a hack and I feel like there must be a better/easier way to render as fast as my computer can do.

    I know this has been posted a few time before but I'd like to know if there is a new way to do this since Unity (the company) has been pushing Unity (engine) as a movie creation tool recently.

    previous related posts:
    https://forum.unity.com/threads/render-video-faster-than-realtime.1019008/ (Dec 2020)
    https://forum.unity.com/threads/can-i-render-and-record-a-cutscene-faster-than-realtime.975456/ (Sep 2020)
    https://forum.unity.com/threads/cap...d-framerate-regardless-of-render-time.455234/ (Feb 2017)
    https://answers.unity.com/questions/192169/allow-unity-to-render-as-fast-as-possible.html (Dec 2011)
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Hey,

    Are you using the recorder component ?
    If yes, all tou have to do is to turn off cap frame rate to get faster than real-time rendering.

    if not, you would need to set time.captureDeltaTime to the correct 1/fps to make unity update in frame increments, and turn off vsync.

    i do not think timescale plays into the equation.
     
    unitybru likes this.
  3. cdg720

    cdg720

    Joined:
    Mar 1, 2022
    Posts:
    4
    Thanks! I am using something else because I want to record in a build instead of a Unity editor. Disabling cap frame rate does the trick with the recorder. I will look into using time.captureDeltaTime and turning off vsync.
     
  4. cdg720

    cdg720

    Joined:
    Mar 1, 2022
    Posts:
    4
    For 30 FPS animation, I set Time.timeScale = 3.0f and Application.targetFrameRate = 90. This way I can render my animation three times as fast.