Search Unity

Cinematic Image Effects (Pre Release) package

Discussion in 'Image Effects' started by willgoldstone, Dec 8, 2015.

  1. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  2. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
  3. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Ah, I think I was on another branch. Will check this out. Thanks!
     
  4. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    I can confirm this new one does not have the black issues.

    What can be done about ghosting?
    dwadafadaw.jpg
     
    Last edited: Jan 29, 2016
  5. ArthurT

    ArthurT

    Joined:
    Oct 26, 2014
    Posts:
    75
    Definitely would be a nice addition. Amplify Motion and SMAA would be a perfect combination if it weren't for the artefacts of Temporar AA ghosting. Having a more integrated and native solution would make it an ideal result.
     
  6. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Hey guys ... sorry for the newb question but I'm having a bit of trouble with Tonemapping effects. I'm using scripting to add a TonemappingColorGrading script on my main camera. However, when I then try to enable the "ColorGrading" boolean or modify the variables for Shadows, Midtones and Highlights via scripting ... I get a compiler error saying I can't modify those values directly and that I should store them in a temporary variable. Any idea what I'm doing wrong? All I want to do is add it to my main camera, enable Color Grading and modify the colours and I'd rather not do this manually for every level in my existing game.
     
  7. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    How about making your camera a prefab that is reused in all the levels?
     
  8. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I could do that but I'd rather not right now. I'd have to go ahead and make changes to every existing level and I'd rather not. I figure there must be a way to do this via scripting.
     
  9. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Are you by any chance modifying and assigning r, g and b values of the color directly instead of creating a temporary Color variable and assigning it as a whole?
     
    Martin_H likes this.
  10. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    I think I am ... strangely enough, I did try setting a temporary value. However, I can't even change the overall boolean that decides whether ColorGrading is on or not. Here's my code, can you tell me what I'm doing wrong?


    Code (CSharp):
    1. TonemappingColorGradingtoneMapEffect=mainCam.gameObject.AddComponent<TonemappingColorGrading>();
    2.  
    3. toneMapEffect.colorGrading.enabled=true;
    4.  
    Even the above gives an error message that I should be storing the value in a temporary variable rather than modifying colorGrading.enabled directly. If that's what I need to do, can you explain how to do so?
     
  11. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    I don't have this installed yet, but I just skimmed through the source in the repository and it looks like colorGrading is a struct, so you can't just set enabled to true. You need to create a temporary variable of type ColorGradingSettings, or whatever the type of .colorGrading is, set all it's properties like colors, enabled, etc. and then assign that temp variable to toneMapEffect.colorGrading.
     
    Martin_H and Rajmahal like this.
  12. Rajmahal

    Rajmahal

    Joined:
    Apr 20, 2011
    Posts:
    2,101
    Thanks so much ... that's what I was missing. Appreciate the help!
     
    Devil_Inside likes this.
  13. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    Hi guys ! We have an issue on the latest Depth of field (taken from the repo) with latest version of Unity, maybe you have encountered this issue as well.
    It seems that transparent stuff will be blurred depending on their background, if the background should be blurred, particles for example will be too. Do you know how to fix that?

    Here's an example on our freshly game jam prototype:

    blurry transparent.png

    As you can see, particles are blurry while the statue is not, even if particles are at the same distance from the camera.

    Thanks !
     
    Last edited: Feb 1, 2016
    DxStd_IgnatPribylov likes this.
  14. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Transparent shaders don't write to the depth buffer and this kind of DOF effect uses the depth buffer to decide how the blur is applied. There is no way to fix this on the side of the DOF. I believe there is also no feasible way to solve it with the transparent shaders either.

    For a menu screen, just fake it by blurring the background separately and blending it together somehow.
     
  15. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    thanks for this quick answer Martin_H, I don't know if the legacy DoF is having the same issue as the new one.
    We will probably find a way around by faking it or changing the layout of the scene.

    Thanks again !
     
    Martin_H likes this.
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi,

    One concern I have is with the colour grading. Basically, it only supports one LUT, unless of course it allows changing the properties without a performance loss, but as I understand it, dragging those sliders and widgets around is actually generating textures on the fly?

    If it is generating textures, this component needs to be able to save the luts and we will need dual lut support so that moodboxes can be done. If not, then I guess I could blit one lut over another at runtime. But would like to know what plans you guys have first before jumping the gun, thanks!
     
    Martin_H likes this.
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    isn't that how it works with the current LUT CC from standard image effect?
     
  18. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    So the way it works right now is that when Color Grading is enabled it will generate and cache an internal LUT (256x16 pixels when working in normal precision or 1024x32 in high). This LUT will be updated only if a parameter changes (through scripting or editor manipulations) and no more than once per frame. If nothing changes, it will use the cached LUT. Because all of this happens on the GPU (except for the first frame where the neutral LUT is generated) it's very, very fast. Even on my iPhone 5. So you should be able to tween or animate color grading parameters without too much impact (if any) on performances.

    Unfortunately I'm probably not at the liberty to talk about our internal roadmap for image effects. Maybe Tim will be able to tell you more :)
     
    hippocoder, Devil_Inside and Martin_H like this.
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    WOW OK then that is all we need to do - mess with the sliders / wheels at runtime! That is sexy. It'd be kind of nice to snapshot settings in the editor then lerp to them. I'm up for coding this but any advice what the best approach would be? @Chman and @Tim C

    Thanks guys!
     
  20. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Someone coded something like that for scion. Maybe he could extend that tool? I'd imagine it'd be useful for him too to extend the userbase of the asset to people beyond those owning scion. Actually it seems he's already going in that direction with a second asset. You might want to have a look at these:
    http://forum.unity3d.com/threads/new-extension-for-scion.376990/
    http://forum.unity3d.com/threads/wip-zone-testers-needed.380426/
     
    JohnRossitter likes this.
  21. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    We haven't done this just yet, but it should not be to difficult. One thing we are doing is keeping ALL the new image effect settings in (serializable) structs. You can just set these each frame if you want. So you could quite easily take two snapshots at edit time, then write a script to lerp between them + set them on the image effect :)
     
    Martin_H and hippocoder like this.
  22. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Seems perfect, thanks for working it all out so we don't have to :)
     
    Martin_H likes this.
  23. 8iVR

    8iVR

    Joined:
    Oct 29, 2014
    Posts:
    9
    Are there any example pre-made textures that can be plugged into the texture slot for LUT on the 'Tonemapping Color Grading' script?
    The ones that I have tried create some rather psychedelic colors.
    Clipboard01.png 3DUnwrappedContrastEnhance.png
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    There's a template for the LUT in the latest repo
     
  25. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    My point was only that Unity has been more 'mobile focused' historically than something like Unreal, or the CyrEngine...

    I'm not saying Unity cant be used to create something like 'Witcher 3' or whatever, just that it got its place in the market by saying 'We have a game platform that you can develop on, that will enable you to deliver to ALL platforms (and by that we mean mobile)'

    When I say the clue is in the name, it is. The point of Unity is that you can make a game with Unity and it will work on platforms such as PC and iOS... Ok other engines are catching up on this but it was Unity that started the trend, surely?

    Anyway lets not get in to an argument about it...
     
  26. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    I suppose what I was hoping was that SSRR might mean that we could have reflections on mobile that might not totally kill performance. I appreciate that you cannot make a mountain out of a pea, but I have just heard so much about how amazing SSRR is that I thought it might just be possible that mobile might now be able to have some kind of real time reflections...
     
  27. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    It's unfortunate, but yeah, no dice. Compare mobile CPU and GPU performance with PCs, ballpark a year with equivalent PC tech and check the visuals in the games back then. Most devices aren't even on a level that can run HL2-heavy experiences yet, so something more modern like deferred rendering or SSRR is completely out of question for anything but extremely niche devices like Tegra X1 based tablets. Some lightweight techniques are adopted on poorly performing platforms ahead of the curve, yes - for example, with few compromises, modern HDR rendering and tonemapping/color grading can be used on mobile even though they became popular on PC at quite a bit later point, but that doesn't mean that every modern technique can run on mobile platforms.
     
  28. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    @Chman You're the developer of Chromatica Studio and now you've apparently been hired by Unity and are also the developer of the new built-in color grading feature. Is there a conflict of interest there?

    Is it overly skeptical of me to think that there's no way you would make the built-in feature as good as your commercial asset? Or to put it another way, is it naive of me to hope you'll make the built-in feature as good or better than your commercial asset? I know the implications of the asset store have been discussed before, but I've never seen such an easily comparable example as this before. I mean, unless the built-in color grading is just as good as Chromatic Studio would it not be easy for us to say that you're actively holding back features in favor of your own commercial asset seeing as we know you can do better? And on the other hand, if you do in fact put everything into the built-in color grading then there's no point in Chromatica Studio anymore.

    What's Unity's stance on something like this?
     
    Last edited: Feb 9, 2016
  29. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    @Chman doesn't strike me as someone who is giving less than 100% of commitment, ever. The situation sure is kind of weird, but I have no doubt that good things will come from him being hired by UT. My first thought was that they should have just bought all the rights to his assets from him and include those for free and have him work on further improvements. But I guess that would have angered everyone who has bought them so far. I've bought Colorful FX the last time it was on sale and I'd recommend it. For his work at UT imho it would make the most sense to produce things that so far are not covered by assets (temporal AA etc.) and things that really should have been included in the free post effects long ago. Buying stuff from the asset store will always be part of the Unity experience I guess, and in a way that is exactly the "don't make us pay for things that we don't need"-approach that people often demand to see.
     
  30. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    @TwiiK That's a very good question and I understand your concerns.

    There is, like you say, a potential conflict of interest. And for that reason I won't be able to work on Chromatica anymore (my other assets aren't affected at all). I'm still trying to figure out how to handle this the best way possible before I make a post on the official topic (should I deprecate the package ? should I just make it free and put it with all my other open source assets ?). I can't keep selling it if I know I won't be able to support it, it doesn't sound right to me anyway.

    Now, for what it's worth, beside a few specific features the new Color Grading component in Unity is faster and better-engineered than Chromatica and I would, in fact, recommend it over my asset.

    Once again, I can't comment about our roadmap for color grading & post-processing in Unity, all I can say is that I would in no way hold back a feature in favor of one of my asset on the store.
     
  31. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    If you think the new one is better I'd think deprecating the old one from the store and open sourcing it makes the most sense. People who own it can still access the source if they need it and noobs looking for something like this will look first on the assetstore I guess.
     
  32. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Thank you for your honest and certainly uplifting answer.

    It will be cool to for once have a best in slot image effect come from Unity rather than a third party on the Asset Store.
     
    Martin_H likes this.
  33. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    That would be me :)
    I just submitted Zone Controller Pro to the asset store for review yesterday which works with any unity component generically to allow you to control them at runtime.
    Here are some examples:

    Here is a tutorial:


    Hopefully it will be reviewed and released this week.
     
    Martin_H likes this.
  34. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    I would just say that Chman does not seem like the type of person that would hold back. I have had the opportunity to talk with him offline and he's a very honorable person. His interests are making the best solutions.
     
    Martin_H likes this.
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Come on guys. . . have faith in him :D
     
    Martin_H likes this.
  36. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    I don't ask when, but will there be studies of auto-exposure (eye adaptation) during that R&D or scenes in Unity will still be done the old artistic way of all lights on the same exposure? I don't know how it was with Chromatica Studio
     
  37. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    @Chman I noticed that the new merged FXAA / SMAA seems to have double vision or ghosting artefacts when the camera turns or there's lateral motion. It's actually quite pronounced for me, wondering why it happens- is it an artefact of the temporal approach used? AA is first on the component stack and it's deferred.
     
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oh i thought i was doing something wrong on the AA configuration. so it also happened on everybody else?
     
  39. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's fine when Temporal is turned off. I guess it's a flaw of the technique currently used. It's not visible when you have static scenes, or in/out motion.

    It's very visible with a 3rd person game and chase cam, especially when the character runs to the side, causing camera to turn to follow. If this is as good as it gets I suppose I could disable temporal whenever rotation or panning goes on.
     
  40. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,790
    They need proper motion vectors to counteract that which I'm guessing they haven't implemented yet.
     
  41. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Correct... :(
     
  42. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm going to go out on a limb and imagine that this involves altering Unity's shader system so it's non trivial and depends on other people? Not to worry, I think you guys have done a bang up job on post so far!
     
  43. Parallax

    Parallax

    Joined:
    May 23, 2015
    Posts:
    39
    Keep getting this error:
    NullReferenceException: Object reference not set to an instance of an object
    UnityStandardAssets.CinematicEffects.ScreenSpaceReflection.get_shader () (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/ScreenSpaceReflection/ScreenSpaceReflection.cs:364)
     
  44. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Make sure you have the latest version as we pushed a few important fixes to the repository yesterday.
     
  45. Parallax

    Parallax

    Joined:
    May 23, 2015
    Posts:
    39
    Thanks for the quick reponse. Started a fresh project and ran the fetcher. Still getting:

    Assets/Standard Assets/Effects/CinematicEffects(BETA)/DepthOfField/DepthOfField.cs(149,14): error CS1729: The type `UnityEngine.SpaceAttribute' does not contain a constructor that takes `0' arguments

    GTX 750Ti Unity 5.1 1p3f Windows 7 16gb ram

    Need to install GTX970 and Unity 5.3

    Any ideas which Nvidia driver would be compatible for the Dk2?
     
    Last edited: Feb 12, 2016
  46. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    upload_2016-2-15_14-3-53.png
    Damn. . . . i never realize that this button is exist all this time. Usefull stuff man.......no more moving back n forth to PS. . .
     
  47. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    There is an export, is there an import?
    Also, I like how Amplify Color does it, it sends a screenshot from one of your game cameras with the LUT texture in top-left corner directly to Photoshop. You do all color grading you want in there on your camera screen, and then Amplify Color automatically crops the LUT texture from the screenshot and reads it back and saves it in your project folder.
     
  48. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Note that you don't actually need to use this button when working with the new color grading component, the LUT will be cached internally anyway (see this post for more information on how it works). It's just a quick utility I added in case you wanted to save the LUT to disk.
    You can import and use your own authored LUTs but there is no direct bridge between Unity and Photoshop like Amplify Color does.
     
    Devil_Inside likes this.
  49. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Chman btw there's still some color banding if using the new LUT/color correction any way to reduce it? this is not happened when using the old color correction LUT
     
  50. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Banding in light or dark areas ? Does the precision field help reduce the effect ? Could you provide a screenshot (or even better: a minimal test scene) so I can look into it ?