Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Gif Creator - Create gifs directly inside Unity!

Discussion in 'Assets and Asset Store' started by PygmyMonkey, Jul 27, 2015.

  1. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Gif Creator
    Create gifs directly inside Unity!
    Gif Creator allows you to record a gif from one camera, or the entire screen, directly inside Unity.

    Features
    - Preview gif before saving it,
    - Select only the frames you want,
    - Define your parameters (frames per seconds, duration, record width...),
    - Record the entire screen, or a specific smaller part,
    - Record for x seconds, or always record the last x seconds,
    - Save gifs to folder, or upload to imgur.com!
    - Works on the Unity Editor for Windows and Mac,
    - Clean and easy to use Editor Window.


    Links
    - Available on the Asset Store,
    - Website with full documentation, examples and FAQ.

    [​IMG]
     
    Last edited: Jul 29, 2015
  2. SirStompsalot

    SirStompsalot

    Joined:
    Sep 28, 2013
    Posts:
    65
    I. Want. This.

    Looks so good! Curious though, will I be able to both save to my computer and upload to Imgur? Cause, yaknow, that'd be rad.
     
  3. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey!

    Thanks a lot! I can't wait for it to be approved :)
    And yes of course, you can both save and upload to imgur!
    As you can see in the screenshots and the video, there is a save and an upload button ;)
     
  4. SirStompsalot

    SirStompsalot

    Joined:
    Sep 28, 2013
    Posts:
    65
    Ah, my mistake I didn't watch the video - had incorrectly assumed that you'd destroy the image once saved/uploaded, but clearly you can do both actions.
    Looks great!
     
    PygmyMonkey likes this.
  5. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hello everyone.
    Just a message to let you know that Unity has approved Gif Creator.
    It's available now on the AssetStore!

    http://u3d.as/icC

    Have a great day :)
     
  6. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    154
    I love this and it works super easy! Are there any plans on enabling recording without the need to have Play-mode enabled?
     
  7. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Thanks :)
    Will add this to the list of features and see if I can manage to do it!
     
  8. Wild-Factor

    Wild-Factor

    Joined:
    Oct 11, 2010
    Posts:
    592
    can this work also in stand alone ? (so player can record animated gif)
     
  9. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey there!
    Right now it's not possible to do that, because it's an Editor tool, but in a future update I'll add support for this, so yes :)
     
  10. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    An update is available on the Asset Store.

    Version 1.0.5
    - FIX
    Inverted image on Unity Editor Windows
    - FIX Weird preview texture on Unity Editor Windows
    - NEW Added duration info in the preview section
    - NEW Added a toggle to open the exported gif folder after saving is done
     
  11. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Looks like a great tool, as always!
     
    PygmyMonkey likes this.
  12. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Ahah thanks a lot! :)
    PS: Nice new avatar!
     
  13. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    734
    Haha thanks. I personally dont like it, will update soon hopefully. Keep up the good work on your plugins!
     
    PygmyMonkey likes this.
  14. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    An update is available on the Asset Store.

    Version 1.0.6
    - NEW:
    Added a 'Record Upside Down' toggle, when using the 'Record single camera' mode (if you still have issues with upside down recording).
     
    garrido86 likes this.
  15. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    An really minor update is available on the Asset Store.

    Version 1.0.7
    - FIX:
    Every script is now in the PygmyMonkey.GifCreator namespace.
     
  16. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    507
    Does this work on iOS Android
     
  17. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey there!

    It's an editor only tool for now, so no runtime.
    It should be "working" at runtime though but I have to provide an API for that and make some tests etc... which is not planned for now. Sorry.
     
  18. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    507
    Was wondering since you mentioned on the reddit post that it's supported on iOS/Android

    For mobile, it may make sense to just wrap an existing performant plugin
     
  19. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey there!

    On reddit I said :
    "In a future update, I plan to make it possible to record gifs at runtime, so players could record a part of their game and share it. It should work on all platforms (Android, iOS, Mac, Windows...),"
    So it's not there yet ;)

    Also Gif Creator is based on Moments that already support recording gifs on iOS/Android.
    The only reason it's not in Gif Creator yet, is because I want to really test it and make sure it's working great with a good API before "enabling" it. But I don't have a lot of time right now :/
     
  20. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Does it support full quality gifs ? (Without artifacts or color changes etc)
     
  21. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Yes it should.
    In the export section, before saving your gif, simply set "Compression Quality" to the lowest value (1).
    And make sure the record width in the "Parameters" section is set to your GameView width.
     
  22. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    Hey Pygmy Monkey.

    I just bought your asset, and this is what I get when I try to run it:

    I'm running the Unity 5.4 beta, so likely that is the problem. Do you have access to the 5.4 beta?

    Any ideas??

    [​IMG]
     
  23. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
  24. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey Jeff!
    Sorry I couldn't reply sooner :/

    Well, I'm using reflection to get the size of the GameView window, so I guess it's broken in Unity 5.4!
    And no I don't have access to the beta, so I'm really sorry but that will have to wait for it to be out :(
     
  25. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    502
    Heyho, got a question:.
    is there somewhere a filesize preview before saving? cause you know, at twitter you can only upload up to 5mb and it would be nice if you see how big the gif will be at quality X before saving. it seams that you can see it in the parameter section but not before export?
     
  26. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hello ;)
    In the parameter section, it's the estimated memory size (RAM) that will be used to record, not the final disk size.
    This is something I don't really know how to get :/
    I don't know if there's a way to estimate/determinate the final file size of a gif. Sorry!
     
  27. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    502
    totally fine. was just curious :) looks great by the way
     
    PygmyMonkey likes this.
  28. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Thanks a lot ;)
     
  29. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    Ok, thanks for letting me know. Will check back after 5.4 is released.
     
    PygmyMonkey likes this.
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    455
    Hi!
    Please could you answer for support ?
    I've sent an issue about my unity account last week. :(

    ps : unity 5.4 beta is available here
     
  31. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    I'm also still waiting for Unity 5.4 support... Any eta?

    -Jeff
     
  32. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Email answered, sorry for the delay!

    Hey Jeff! I'm having a 2 weeks vacation right now, so right after that, I'll take a look to 5.4 ;)
    Sorry for the delay!
     
  33. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    No prob. Thanks for the heads up.
     
  34. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Hi,

    I have recorded a 7 sec gif at 1280x720 and set output to 640x450 and compression quality to 100. It is in pre-processing and i dont see a bar moving for 15 minutes (and is still in 00%), is this normal for these settings ? Also how long in general can it take for a medium range PC ?

    EDIT: Also i exited play mode and seems it stopped. Should i remain in play mode until the system finishes ? I got a warning "Attempting to flush memory during the pre-processing step" when i exited play mode.

    EDIT2: Seems when i set resolution lower in source (exactly at output one) and compression to 30% works ok, so probably i went overboard with settings :). Great system, thanks for the easy way to grab gifs !!! :)

    Thanks
     
    Last edited: Apr 25, 2016
  35. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Left a review, super cool tool :)
     
  36. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hello!

    Sorry I took so much time to answer, I was in vacation...
    The only thing I can see for you problem, is that as you said, you should NOT leave play mode until you have fully finished your gif and exported it. So retry with the first settings you said and it should work ;)

    PS: Thanks a lot for the review!
     
  37. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Thanks, it worked great with little teaking and the system is really super helpful :) and easy to use

    Great job
     
    PygmyMonkey likes this.
  38. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    I've just fixed the issues with 5.4 and sent the version to Unity. Now we just need to wait for it to be approved ;)
     
  39. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    Excellent. Thanks!
     
    PygmyMonkey likes this.
  40. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    460
    I got the update, but there is one small problem.

    The namespaces in GUIUtils.cs and PMUtils.cs interfere with those from your other asset: ColorPalette

    Once I Updated Gif Creator, Color Pallet throws errors becuase the namespace in these classes gets updated from:

    PygmyMonkey.ColorPalette.Utils

    to

    PygmyMonkey.GifCreator.Utils

    I think it should just be

    PygmyMonkey.Utils

    -Jeff
     
  41. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey Jeff! Thanks for this!
    The only issue there is, is that both PMUtils.cs.meta and GUIUtils.cs.meta from the 2 packages have the same GUID.
    I'm fixing that and resubmit! Sorry.

    PS: I've updated ColorPalette and it's live on the Asset Store to update! (the version is still 1.1.7)
     
    Last edited: May 9, 2016
  42. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Hi,

    One request, it would be great if for later versions there is an option to remaster a gif to lower resolution. So we can have a master HD gif and smaller ones as needed for forums etc

    The easiest way would be to enable a dynamic resolution upon save (for example a downscale option) so we can save multiple times, with 1:1 and other ratios before Reset the gif.

    Thanks again for the great tool, it is extremely stable too
     
  43. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey there!

    Thanks a lot for the kind words :)
    Hum... I think what you want to do is already possible with the current version.

    Just record your gif at the max resolution you need (let's take a record width of 500 for example), then look at the last section called "Export", here you can define the output width, you'll first set it to 500, press Save, then set it to 250 and hit save again etc...

    This should do it!
     
  44. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Great, i have missed this option, super cool :)
     
    PygmyMonkey likes this.
  45. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    502
    nice tool!
    sadly there are some things i dont like:
    - if you stop the game, your recorded gif is lost. happend to me several times
    - export takes really long -280 frames around half a minute? is there an way to optimize that?
    - is there a keyboard shortcut for recording and stop recording?
     
  46. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    - Record lost if game stopped
    Well yes, this is everything but ideal... but it's because Unity serialize everything when entering play/stop mode... But I guess I could save the entire state of the gif etc... It's just not done yet :(

    - Export time
    Yes I know, it's the gif library that I'm using that is like that, I'm not sure you can really reduce the time it takes...
    The only way you can do that, is by increasing the "Compression Quality" slider (bigger values means lowest compression), and it will speed the export time, but reduce quality.

    - Keyboard shortcut
    No there is not, and I should add it, but I don't really have time nowadays to do that :/
    I'll add it to the feature list anyway :)
     
    Der_Kevin likes this.
  47. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    45
    Hi, Gif creator seems like a great idea and the implementation is also great - though there are some things to make smoother. For example the Canvas screen space (Overlay vs Camera), which is required for fast gif rendering.

    I have many canvases and can't be bothered to set them manually temporally from Overlay to Screen rendermode. So I created a small script which does it in editor. It works simply by enabling the script and disabling return canvases to normal rendermode. Maybe Gif creator could at something like this to make the workflow smoother?

    My simple helper code:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class GifCreatorHelper : MonoBehaviour {
    5.     public Canvas[] Canvases;
    6.     public Camera overlayCamera;
    7.  
    8.     public RenderMode renderModeNormal = RenderMode.ScreenSpaceOverlay;
    9.     public RenderMode renderModeOverridden = RenderMode.ScreenSpaceCamera;
    10.     public float planeDistance = 0.01f;
    11.  
    12.  
    13.     // We can activate this by simply enabling/disabling the script in editor runtime.
    14.     void OnEnable(){
    15.         Canvases = FindObjectsOfType(typeof(Canvas)) as Canvas[];
    16.         overlayCamera = Camera.main;
    17.  
    18.         if(Canvases != null && Canvases.Length > 0){
    19.             foreach(Canvas canvas in Canvases){
    20.                 canvas.renderMode = renderModeOverridden;
    21.                 canvas.worldCamera = overlayCamera;
    22.                 canvas.planeDistance = planeDistance;
    23.             }
    24.         }
    25.     }
    26.  
    27.  
    28.     void OnDisable(){
    29.         // Return old value (for now just assume all are "Screen space - Overlay",
    30.         // then empty the array for clarification.
    31.         if(Canvases != null && Canvases.Length > 0){
    32.             foreach(Canvas canvas in Canvases){
    33.                 canvas.renderMode = renderModeNormal;
    34.                 // canvas.worldCamera = overlayCamera;
    35.                 // canvas.sortingOrder = overlaySortingOrder;
    36.             }
    37.         }
    38.  
    39.         Canvases = null;
    40.     }
    41. }
    PS: The camera in gif creator settings could be automatically set with Camera.main, or?
    PPS: It seemed that generating a gif works in playmode, but if game is paused it stops. Or something.
     
  48. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    Hey :)

    Thanks a lot for sharing that!
    But I can't really use that in Gif Creator, as this is a really custom behaviour, like, right here, you just set them back to ScreenSpaceOverlay on Disable, and maybe they weren't, and maybe this and that etc...
    So the best way (I think), is to use your own custom script, exactly like you did, so you can fit exactly to your needs.

    And yes, Gif Creator in the editor works only when the game is playing, if you stop it, you'll lose everything :)
     
  49. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    45
    True dat. I still think the script could be made safely useable in any project by for example caching all the canvas-values in an array and restoring the values OnDisable or OnWhatEverIsCalledWhenAGifRecordingEnds(). Then again, maybe there are some use cases that could still cause problems.
     
  50. PygmyMonkey

    PygmyMonkey

    Joined:
    Jan 13, 2014
    Posts:
    233
    You're also more than right :)
    But you're the very first to ask for something like that... So maybe if other people ask for it? We'll see :p
     
    ilmario likes this.