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

[Released] RetroDeluxe CRT, a highly creative CRT effect.

Discussion in 'Assets and Asset Store' started by djdolber, Apr 21, 2016.

  1. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Greetings, a fellow Unity dev here. I've been in love with Unity since I started using it around 2010-ish. Been working with it pretty much daily since then, so feels like I'm seriously late to the party regarding releasing something on the Asset Store.

    I've always been a sucker for retro, growing up with the consoles from 8 bit and beyond. I miss that look of old televisions that can do magic with pixel art graphics. It gives a certain vibe that I wanted to include in my own games. To make a long story short, I decided to make an advanced such effect myself and hopefully a few others can benefit from it as well, win-win.

    So, the effect is now on the asset store. This is not just a static effect but a very customizable and scriptable effect, feels a bit like having photoshop in Unity. It's got 20+ effects that you can rearrange in the chain, put them pre or post the CRT pattern. It's also got a very cool scripting feature, basically you can hook up any number of the tweakable parameters to a single slider and decide how they will change when you move it. You can then control that slider though your scripts to make the "television" basically react to your gameplay. I have a ton of ideas for how to expand the scripting features, including full on preset-morphing. I've taken more than a few hints from how software synths operate since I've worked with music quite a lot over the years, and it gave some interesting results. Any and all feedback is very welcome.



    Link: u3d.as/o7N
    Support Website (work in progress):
    http://operationsmash.com/

    "Imitate familiar looks or explore new territory with this highly creative effect. The custom editor makes it both fun and fast to edit your look. Browse through a range of built in presets to give you starter points and inspiration. Combine and rearrange any combination of the 20+ included custom effects to compose your look. Use the versatile scripting feature Multi-Fader to animate your effect to make it come alive and sync up with the gameplay. By the way, you can tweak the effect and save the settings while running the game, just hit the Save button. Create a unique looking television effect for your gameworld to set the tone/vibe. This is also the perfect effect to enhance any kind of lo-fi project, be it familiar 8/16 bit styles or completely new ones."
     
    Last edited: May 25, 2016
  2. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Added a new sample gif of the scripting feature: Hook up any number of parameters to a slider, then you can control that from script.
     
  3. steddyman

    steddyman

    Joined:
    Apr 10, 2009
    Posts:
    253
    It looks great, but how does it run on iOS and Android devices?
     
  4. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Thanks, I don't know, It's not been tested on any mobile platforms yet, I don't have easy access to testing it myself at the moment.
     
  5. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    I noticed that there's a potential bug users might experience, I will submit an update fix for this asap, but there's an easy hot-fix for it.

    If your inspector looks something like this:
    Screen Shot 2016-05-21 at 09.30.43.png
    Locate your folder CRTPresets and navigate to the file default.asset, make sure the presetName parameter is named "default" (see the green highlight below)
    Screen Shot 2016-05-20 at 11.23.21.png
     
  6. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    when i build and run, the CRT doesn't work and i get this error in the log:
    Missing shader in Main Camera (RetroDeluxeCRT.CRTImageEffect)
     
  7. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Sorry for the inconvenience, I did a little testing, try this: Move the Shaders folder over to the Resources folder within the RetroDeluxeCRT structure and it should hopefully fix itself.
     
  8. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    If you get a build error on row 69 in CRTImageEffect.cs
    Code (CSharp):
    1. CRTPreset newPreset = AssetDatabase.LoadAssetAtPath<CRTPreset> (path);
    replace it with:
    Code (CSharp):
    1. CRTPreset newPreset = (CRTPreset)Resources.Load (path); //AssetDatabase.LoadAssetAtPath<CRTPreset> (path);
    This will change slightly how you write your paths to presets if you use the Scripting_LoadPresetFromPath function, example path:
    Code (CSharp):
    1. crtEffect.Scripting_LoadPresetFromPath ("CRTPresets/PixelArt1");
    2.  
     
  9. TheOz

    TheOz

    Joined:
    May 21, 2011
    Posts:
    34
    moonshotscreenshot.png I




    have a question, I am using it on a game that has a screen with a scroll view. It does not seem to affect the panel the scrollview is in. Is there a way to fix this so it affects everything in the canvas?

    see attached
     
  10. TheOz

    TheOz

    Joined:
    May 21, 2011
    Posts:
    34
    Hi,
    I have my same moonshot project building on android and the crt effects are not showing at all.
    The build completes fine but does not show the crt effect.

    Any thoughts?
     
  11. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Due to a miss from me in 1.0, try this: Move the Shaders folder over to the Resources folder within the RetroDeluxeCRT structure and it should hopefully fix itself. Do note that it has not been tested with mobile platforms, as it says in the store page as well.

    Regarding the UI Canvas, see this link on render modes: http://docs.unity3d.com/Manual/UICanvas.html
    You need to view the UI through a camera to get the effect applied so try going to your Canvas and change it to Screen Space - Camera.
     
    Last edited: Jun 17, 2016
  12. TheOz

    TheOz

    Joined:
    May 21, 2011
    Posts:
    34
  13. NerdRageStudios

    NerdRageStudios

    Joined:
    Nov 1, 2013
    Posts:
    167
    Hi, does anyone have any really bad performance issues with this plugin? This is with the standard default setup on the plugin.

    I tried using it on my very simple 2D game and it almost halves the FPS I am seeing in game. Without it on a Surface Pro 4 I see around 90 - 95 FPS stable. Enable this plugin and I get 48 ish FPS.

    @djdolber can you advise anything here?
     
  14. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Hey, I'm not super familiar with the GPU performance on Surface Pro compared to iOS and Android devices. As I stated in the store page, the effect has not yet been tested on mobile. My hunch tells me that the effect is best suited for desktop projects where you have the performance to spare but if you want to optimize it for low settings I would try to use as few of the effects as possible, specifically try this for an economy setting:
    -Avoid using trails if possible
    -Avoid using 'Post CRT' Distortion if possible (use 'Pre CRT' instead)
    -Use as few custom effects as possible

    This is due to that you want to reduce the number of drawcalls on mobile/low performance gpu's. To combat this I could combine a few of the custom effects into special versions, like some flickering, snowcrash, vingette etc, this should hopefully reduce number of drawcalls at the cost of reduced freedom. If you have any specific combination in mind, send me the preset or a screenshot of the settings and I can take a look and see if I can combine those into a new custom effect.
     
  15. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    By the way, I am currently working on a little stability/bugfix update, I could add a few new custom effects while I'm at it, if you people have any feature requests just post them here :)
     
  16. NerdRageStudios

    NerdRageStudios

    Joined:
    Nov 1, 2013
    Posts:
    167
    Im not talking about mobile here, The surface pro 4 is a full windows 10 PC, its an i7 with intel iris graphics and 8gb Ram.

    This also happens on my desktop PC which runs a top of the line i7 extreme, 16gb ram and a GTX980
     
  17. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Wow ok, well in that case it should not have such a huge impact, is this when having the full editor open with the inspector, scene view etc or is this when building to an exe? If you have the stats window up when you enable/disable the effect, do you see an instant change in fps/cpu ms/render ms or does it happen gradually? I've been running the effect mainly on my MacBookAir 11" and I've seen minimal impact on performance here. I ran the effect a few times again now with the stats window open, my FPS seems to be going steady at ~90 for about 30 seconds and then it goes down to 40 something for a while, and then back up to 90. At first it looked like exactly what you said, but I can't see any instant change in performance when toggling the effect on/off, and the dip down to ~40 happens also with the effect off on my machine strangely enough, it looks to be unrelated to the actual effect here. It might be some kind of memory issue that builds up over time. I don't have a windows machine available, if you could run the profiler and take a look if you see anything fishy that would be great to give me something to go on. Taking a brief look in the profiler here, it looks like it's the "Overhead" thingie in the list that goes up to > 10 ms sometimes and then back down again, I'll look further into it.
     
  18. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Hello, I just tried something that worked on my end, this is a weird one and I dunno if it works on windows, but close all your internet browsers that might have flashplayer running and restart unity, see if the problem is still there after. Flashplayer can interfere quite a bit with unity, I have regular problems with using my wacom inside Unity because of it too. After doing this fix I have a steady framerate around 88-92 fps, no more Overhead spikes in the profiler.
     
  19. Muragami

    Muragami

    Joined:
    Jul 22, 2012
    Posts:
    1
    Alright, so I have this working fine in the editor. When I went to build and run my project outside the editor I had to change line 69 as mentioned in the above post. However, no effect shows up at all, and some thread must have crashed because after I close the project my unity ide console just shows: Sending message failed 1000+ times and never stops. This is 5.5 I'm working with, fwiw.
     
  20. djdolber

    djdolber

    Joined:
    Jul 22, 2012
    Posts:
    20
    Hey, sorry for not responding sooner, I just noticed that no email notification had gone out, so I unwatched and re-watched the thread hoping that email notifications will start working again. (Working on the issue via email atm)