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

Utilities [RELEASED] Deckard ChromaKey System (20%OFF)

Discussion in 'Tools In Progress' started by olix4242, Dec 19, 2020.

  1. ttw1993

    ttw1993

    Joined:
    Jul 19, 2017
    Posts:
    11
    Thanks, my mistake, I tried Unity 2020.3 again and it worked correctly. But under the same material parameters, the keying effect is not exactly the same as in Unity2019. Can you provide some hints or tips on how to adjust the parameters in the material. I feel distressed that it is difficult to adjust to the perfect effect.
     
  2. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Good news for you: I've added a support for keying out any color and it should behave perfectly as for green color.
     
  3. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Are you sure that you are using a same version of chromakeyer? There were some changes introduced lately and this might make differences between versions.
    As for setting up effect, always start from setting up everything from up to bottom. Setting first 3 sliders and color is a most important thing. Then refine other values.
     
  4. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    @olix4242
    Hi, I am using the latest version of shader graph (11), and I am still getting the same issue. Nothing is working correctly.
    I am also using the latest version of the asset with the URP plugin/patch you provided earlier in this thread.

    When I open the shader graph assets like you said, for both of them I am getting a message in the Graph inspector that says "HD (Unknown) Cannot find the code for this target, a package may be missing"

    What should I do?
    Thanks!
     
  5. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Latest version of Chromakeyer shouldn't be used with a patch. What version of URP and Unity are you using?
     
  6. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    Thank you for you reply.
    I am using URP v11.0.0 and Unity 2021.1.13
    I just deleted the entire asset and reimported the latest version of Deckard with no patch, and I'm still having the same issue.
    All scenes included in the package (for HDRP or Standard) have everything pink, and I'm getting a bunch of shader errors in the console.
    upload_2021-7-7_18-24-38.png
     
  7. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Ok, I was able to pinpoint the issue. Looks like there are some bugs in shader graph. So you have to follow exact procedure described here:
    1. Delete your existing Deckard Chromakey folder (if you have already imported it).
    2. Even if your project uses only URP, you have to import also HDRP package from package manager and wait that it compiles. Once done, procede to a next step.
    3.Import Deckard Chromakey package from Package Manager
    4. Import a package found here:
    https://www.dropbox.com/s/9v42mik7hfgyafk/URP_fix_2021.1_DeckardChromakey.unitypackage?dl=0
    5. Now import Deckard Chromakey HDRP object into your scene.


    *note: this procedure was tested on URP11 and Unity 2021.1. Other version might or might not work. I hope that in future versions this step will not be needed (when unity fixes this shadergraph limit/bug).
    **Any other order of those steps will produce errors and break importing process


    Problem why this is happening is that Shader Graph has ability to make URP and HDRP target shaders with a single graph. But this requires both HDRP and SRP to be installed - and it won't work if both aren't present in project. Also, if both aren't present, this will result in corruption of a shader. I will have to submit a bug about this to Unity. And in a meantime, I will look into alternative solutions that are more user friendly.
     
    Last edited: Jul 8, 2021
  8. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    @olix4242 Thank you!
    Do I leave HDRP in the project even after I'm done?
    Also, at Step 4, am I importing the Chromakey package from the package manager? Or should I have done that earlier?
     
  9. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Sorry, I forgot a step where you should import Deckard Chromakeyer package. I've corrected original post to reflect this.
    From my tests it won't work without HDRP installed as Unity will have to recompile shaders from time to time.
     
    Last edited: Jul 15, 2021
  10. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    Got it, thank you.
     
  11. GeniusKoala

    GeniusKoala

    Joined:
    Oct 13, 2017
    Posts:
    97
    Hi @olix4242 ,

    For our new TV shows we need to composite our 3D characters on a video in the background like to make them inserted in real live footage. The problem with vanilla HDRP is that the PP (tonemapping, color curves, etc...) applied to the characters is also applied to the video in the background.

    I tried to draw the video on an Unlit material with a render pass "after post processing" but it make weird outline around my characters so it's not useable for a production. If if I render my characters and the video on both cameras and make them rendered in 2 different RenderTextures one of top of the another there is alpha blending problem due to AA and DoF (it's my guess). The characters RenderTexture make alpha black (the color of the background of the camera set on black with alpha 0). If I make the background red with alpha 0, the alpha of the DoF turns red for example. I tried the Compositor but I did'nt succeed to make it work...

    After this long introduction sorry, I would like to know if your asset would let us make this compositing. Having the PP on the characters but not on the video in the background. The video needs to stay as it is and we need to render our characters as much as we want with every PP available in Volumes.

    We have already purchased Deckard renderer even if we have hard time to use correctly. Does the Chromakey need Deckard render to work? Or can we just use it with vanilla HDRP?

    Could it at least render our characters on alpha background and export it to make the compositing in Adobe Premiere? With vanilla HDRP there are outlines on the characters so we can't use it...

    Thank your assets, you make Unity better for all of us and I appreciate it!
     
  12. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You could use it probably if you don't have any green (or blue) elements on characters. Procedure could be:
    -Render your main camera (the one that renders PP and characters) into a render texture with a green background (60%-75% green)
    -Set a render texture as a source for Deckard Cromakeyer.
    -Set Chromakeyer to project as screen space chroma.
    -Create new camera and disable any PP's with a local volume.
    -Place your video as a background plane and place Deckard Chromakey over background.
    -Tune keying to your liking.

    BTW, be avare that chromakeying can never be as perfect as native alpha blending.

    p. s. Chromakeyer doesn't require Deckard render.
     
    GeniusKoala likes this.
  13. ttw1993

    ttw1993

    Joined:
    Jul 19, 2017
    Posts:
    11
    Hello, I found several problems after trying the 2.0 version. Although the blue background function is added, the keying effect is not as good as the previous version. We tested in a variety of color backgrounds, our background is not particularly perfect, there are some noise, in this case version 1.6 can perfectly remove the background. But no matter how the 2.0 version adjusts the parameters, there are still some residues. Is this a bug introduced by the new version? In addition, it is hoped that the ease of use will be improved. I don't need too many functions, just remove the background. I can only use Deckard components. Is there an easier way?
     
  14. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    New version should be much more tolerant on keying - at least, from my own tests. Do you have some non keyed example to share (single image)?
     
  15. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hi @olix4242

    I'm on HDRP 10.5.1 and the DemoHDRPProfile material is broken.
    It's a clean import on a new project on 2020.3.11f1.

    upload_2021-11-28_9-41-45.png
     
  16. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    This is completely normal visualization of that shader as this is internal shader used by internal scripts and it can't preview correctly in inspector when using HDRP. It also isn't meant to be placed in a scene.
     
  17. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Okay. I tried the sample scene by using video provided as source, but I’m not seeing any projection on screen. It’s just empty.
     
  18. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Sorry, about that, I've made some updates to procedures, and a demo scene wasn't updated (but it is enough to move Threshold slider down to see it).
    Here is a simple patch for a demo scene.
     

    Attached Files:

    ikazrima likes this.
  19. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Thanks. I’ll check it out when I’m back from work
     
  20. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @olix4242 I just bought your marvelous asset. It seems fantastic! :)
    I created 3 new projects in SRP,URP and HDRP. Using Unity 202.3.21f1, I also get a bunch of errors in all of the projects. Any help would be greatly appreciated. here is a picture of the console errors:
    upload_2021-11-29_12-14-41.png

    UPDATE: I just downloaded and installed the HDRP patch and the errors are gone in HDRP. Thanks a lot for the quick fix!
     
  21. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @olix4242 I now have these errors below.

    InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    UnityEngine.Input.GetKeyDown (UnityEngine.KeyCode key) (at <6af207ecd21044628913f7cc589986ae>:0)
    debugSwitcher.Update () (at Assets/DeckardChromaKey/UlitityScripts/debugSwitcher.cs:48)


    If I switch it to "input manager old" I have this warning when unity save and reopen later on:

    upload_2021-11-29_15-59-2.png

    Any ideas? Thank you!
     
  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    This is normal with new Unity versions. Nothing that can't be done from my side. But it shouldn't be of any worry.
     
  23. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    @olix4242
    Hi, I've been messing around with all the tools included in Deckard finally and it's super cool, but I still just can't get it working with URP. That being said, I'm going to mess around with the person tracking and other utilities that are included, and hopefully get that working with the different, simpler chroma key asset that does work for me by reactoring some of the code in the main chroma key script. I know it's not the intended use, but I figured it's okay since that's the way I can get it working for my case. (Allowing the end user to configure the keying at runtime).

    So I just had a quick question:. Having the ability to get the chroma key surface to face the camera is very useful, but I was wondering if it's possible to use the person tracking to have the pivot point on the y-axis be the bottom of the person being tracked. So even if the person moves over slightly, it's still rotating by the person's center making a more realistic effect if you have a large green screen area. Because there's no reference to the bottom center of the person moving, I'm not sure how to achieve this. Is it possible? With your current system, can you provide an example?
    Maybe by getting the point at the bottom of the surface, from the position of the head to the bottom? Not sure how I would do this, so I would appreciate any help.

    Thanks so much for your help, and the incredible asset! :D
     
  24. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    URP should work. But be sure that you have installed Shader Graph, and HDRP also (in your project).
    Shaders are made in Shader Graph, and it is required for this task. Unfortunately, for shader to be able to compile for HDRP and URP, it requires that you have a HDRP installed (without actually changing your Pipeline). I think that this is actually a bug in Shader Graph. So, intall Shader Graph and HDRP. Afterwards, Unity will recompile shaders for URP and you will be able to use them. If I remember correctly, afterwards, you can just remove HDRP from your project.
     
  25. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I will make you simple script for this.
     
  26. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    Thanks!
    I also noticed that the top and bottom trackers are reversed, with the Top tracker being anchored to the bottom of the frame, and the Bottom tracker moving with the top of the bounds. Am I missing something?
    Thanks again!
     
  27. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    Hi, I just wanted to follow up about this? It would be incredibly useful for many Deckard users as well, I think! :D
     
  28. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I'm trying to find a logic way onto doing this. A problem is that I can't easily approximate position without making persons do a "moonwalk". So this is something that I should solve right now.
     
  29. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
  30. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    473
    Oh, interesting. I really thought it was as simple as drawing a line directly down from the tracked head position and make the pivot point the point at which that line intersects with the bottom of the chroma key surface, if that makes sense.

    Unless I am completely mistaken, I feel like this can be done with some subtraction math, but you would know this better than I do lol :)

    I hope what I'm looking for makes sense. Really just to change the way the quad will rotate towards the camera so the illusion doesn't get broken when the person walks left or right in front of the green screen so the pivot point stays at the person's feet.

    Thanks so much for your help throughout this, I really appreciate it!!
     
  31. twinmatrix

    twinmatrix

    Joined:
    Sep 6, 2012
    Posts:
    38
    Hi Oliver,

    I‘ve bought your Deckard Chromo Key asset in the assetstore. It looks very promosing, and is far more that I need for my purposes, but of course, that is a good thing.

    I am absolutely no cinematic person, and I only want to use it for using Green Screen videos in a simple gaming/virtual environment. And I mean simple, not technical with lots of cameras. Just a video with transparant sectors and (moving) gameobjects in the background. Mostly for a video playing slide guitar, with a background for example with a desert of a swamp objects (maybe with creatures).

    I tried to follow the videos of your life feeds but they are far too technical for me (and far more than I need). But because of the lack of a simple tutorial I am stocked with an issue what I have to solve. I don’t think it’s a bug, it’s only a lack of knowledge from my side.

    The problem is this:

    By the lack of simple documentation (a this moment) I tried to understand how you made the VideoPlayerScene, which is the scene which come most in the direction of what I want.

    I tried to replicate the scene with a video that I had download from Youtube, because it resembles what I intend to do (guitar playing before a not so good – rimpled – green screen.

    Before I start with the process your demo scene works very well:

    upload_2022-1-10_0-10-46.png

    Than I changed the videoclip in the Deckard Chromakey to my downloaded clip, after I inserted it in a video player, just like yours.
    It looks fine in the editor before I start the scene to play.

    upload_2022-1-10_0-10-46.png

    But when playing, the video is not shown in the Gameview AND it also disappeares in the Deckard Chromakey component (see below).


    upload_2022-1-10_0-10-46.png


    And strangly enough (and I think that can be indeed a bug), when I change the video back in the Deckard Chromakey component afterwards, your own video shows the same problems as with the new movie clip (although each setting is the same as before I tried the new video), until I restart Unity again (with NOT saving the scene).


    upload_2022-1-10_0-10-46.png

    I tried the procedure serveral times, every time with the same result.

    Looking at your program I think that I understand that I have to make an new ChromakeyProfile, for every new video I insert in the Deckard Chromakey component?
    But I am not sure, and don’t know how to do that (there is no documentation for that).
    Like you see I tried that but without succes (again this is because of a lack of knowledge, not because your program is faulty).


    Another question: is there a way to make a mask for sectors that are not part of a green screen (like the borders you see in the new video)? Can I do that with the Trackers, and how?


    Thanks, Johan van der Brugge
     
  32. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    From what I can see, your player is in pause. Are you sure that you don't have activated Error Pause (in console)?
     
  33. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You have an option to add custom mask (BW image that masks zones).
     
  34. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
    I am using Unity 2021.2.8f1 (URP). I followed all the steps described above, but the materials are pink:
    Screen Shot 2022-03-21 at 18.25.42.png
    How am I supposed to fix it? And does the plugin work in Unity 2021 in the first place?
     
  35. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You have to install also a HDRP package and Shader Graph package into your project. This is due to shaders using a Shader Graph that compiles for both HDRP and URP, os it needs a HDRP package for it to work. Sorry, this is a limitation of shader graph.
     
  36. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
    They are already installed:
    Screen Shot 2022-03-21 at 19.34.45.png
    Screen Shot 2022-03-21 at 19.35.09.png

    I followed these five steps that you listed:
    "1. Delete your existing Deckard Chromakey folder (if you have already imported it).
    2. Even if your project uses only URP, you have to import also HDRP package from package manager and wait that it compiles. Once done, procede to a next step.
    3.Import Deckard Chromakey package from Package Manager
    4. Import a package found here:
    https://www.dropbox.com/s/9v42mik7hfgyafk/URP_fix_2021.1_DeckardChromakey.unitypackage?dl=0
    5. Now import Deckard Chromakey HDRP object into your scene."
     
  37. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    It is absolutely normal that you have Pink previews in material editor. This is because those shaders are using Unity standard unlit materials. Also, in your view you are seeing a pink floor plane, as this is a HDRP demo. If you look closely at Chromakey plane, you should see that it isn't pink - but probably transparent.
     
  38. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
    Even then, none of the sample scenes are working. All of them contain that pink material at runtime:
    Screen Shot 2022-03-21 at 20.07.41.png
     
  39. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
  40. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    URP doesn't have any sample scenes.You just have to oen any scene (or create new one) right click on hierarchy, and from menu choose Deckard/Deckard Chtomekey HDRP
    It will place a rig in your scene.
     
    Last edited: Mar 21, 2022
  41. dyuldashev

    dyuldashev

    Joined:
    Mar 3, 2016
    Posts:
    76
    Your plugin is working in my URP project now. However, I had to enable HDRP.
    My Android app size went from 60 mb to 400 mb.
    And it builds forever because of the HDRP shaders.

    If we are not using HDRP, we should not have to import HDRP.
    In this state, is there any way for me to get an Android APK that's less than 100 MB?
     
  42. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    2022-04-08 17_22_14-Window.png

    -Open two shaders that are on an objects Projection Plane, and Projection Plane Mask.. (highlighted in yellow).
    -In shader graph, go to graph inspector and remove HDRP from Active Targets list. Keep just a URP in this list.
    -Save shaders
    -Remove HDRP from your project.

    A need to install HDRP and URP is due to some bugs in Unity Shader Graph.
     
  43. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @olix4242 This is a Fantastic asset. It work really well except I have problem when using it with the Deckard renderer. (please see attached picture). Is there any setup needed when using it in combination with Deckard renderer? When I save render image, the image is clear. Thanks!
    upload_2022-5-10_18-11-43.png
     
  44. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @olix4242 Hi.

    I am just starting using Deckard Chromakey. Great asset! I am not using any live camera for the moment but mostly using Deckard Chromakey in video player mode. I am using the unity video player but I would like to use the AV Pro Video asset instead. Is there any documentation to do this or perhaps you can describe the steps to do this. Thank you!
     
  45. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,687
    Does the current version offer apriltag tracking like you show in this video?
     
  46. mikedamanskis

    mikedamanskis

    Joined:
    Jul 23, 2019
    Posts:
    4
    @olix4242 I am doing something somewhat similar to your Stardom - Interzone (Joy Division remake) video. I am using both Deckard ChromaKey and VR Panorama Camera.

    When I render from VR Panorama Camera, my 3d animations play fine - but my 2d video of the band member is stuck on frame 1. I do have play on awake checked on the video - and the video plays in the Editor when I use the regular camera instead of VR Panorama.

    Is there a trick to getting the video to start when using both of these assets at the same time? Do you have any tips on things I should check? Settings here:

    upload_2023-7-9_23-25-49.png
     
  47. prxxxy

    prxxxy

    Joined:
    Jun 25, 2020
    Posts:
    16
    What am I setting am I needing to change to remove the box around the cat?
     

    Attached Files:

  48. prxxxy

    prxxxy

    Joined:
    Jun 25, 2020
    Posts:
    16
    upload_2024-1-18_13-7-13.png
     
  49. unity_JfubE4sMEwc4Ww

    unity_JfubE4sMEwc4Ww

    Joined:
    Nov 13, 2018
    Posts:
    1
    Hey there,

    I've been using the asset for some time now on unity 2021.2 HDRP and it's working perfectly. anyhow, I needed to update my unity version due to a bug which blackened my display every few minutes and made it impossible to work. but now for some reason chromakey acts strangely:

    I can't seem to be able to scrub through the video in the editor, the only way for the video to play is through play mode. I used to work on videos in the timeline by animating the frame slider but now it's not working in any other unity version since 2021.2.7f. I also tried the video scrubber script from the deckard render to no avail.

    this has been tested with at least 3 new projects on newer unity versions, all are HDRP and are acting the same.
    Is there some setting i'm missing?

    Thanks.