Search Unity

[RELEASED] MK Glow

Discussion in 'Assets and Asset Store' started by MKGameDev, Mar 29, 2019.

  1. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    hey,
    sadly out of the box this is not possible, because there is no emissive text mesh pro shader (not even an option for a hdr color)

    What actually works:
    1) Open the TMP_BaseShaderGUI.cs
    2) Go to ~400 and find the DoColor function
    3) Init replace the ColorField line with the folowing:
    Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, true, true, true);

    After that your font color can be used as an hdr color, which gives you some kind of emission you can use to make the text glow.

    This way you dont have to modify the shaders itself or write a custom one.
     
  2. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Well. I haven't used TextMesh Pro, yet. Seems like maybe I shouldn't.

    Here's what I really want to do: I want to be able to embed an image in text and make it glow. I noticed you have a text asset. Would that be a better out-of-the-box experience?

    I don't mind coding, of course, but I don't like hacking up a 3rd party asset.

    It might be cheaper for me to write a script that creates spaces, measures the locations of those spaces, and uses that information to set the position of an image...
     
  3. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    If you are using the builtin UI Text then you could simply apply the MK/Glow/UI/Default to your material. This shader has an emissive Color, which you can simply raise to make the text glow.

    I just did some test using Textmesh pro. Whats also working: After creating a new material based on a tmp preset you can change the "_FaceColor" Color Property via (editor)script to apply any hdr color.
     
  4. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Yep. You can even do that in the GUI. Thanks!
     
  5. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Although I'm interested in how you did that programmatically as I seem to be breaking the target materials.
     
  6. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    To be clear, I guess I'm setting it correctly but I'm failing to read it out of the MK Glow material (default UI shader), somehow.
     
  7. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    I see. Copy "_Color" to "_FaceColor". For someone else who wants to do this:

    Code (CSharp):
    1.   static void CopyHdrColor(Material Source, Material Destination)
    2.   {
    3.     if (!Source) return;
    4.     if (!Destination) return;
    5.  
    6.     Debug.Log(Source.color);
    7.     Destination.SetColor("_FaceColor", Source.GetColor(@"_Color"));
    8.   }
     
  8. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Nope. That didn't copy the emission stuff. Trying to poke values into the glow settings is not working out and, even if it did, I would have to create a mapping between what MK Glow means by a value and what TMP means.

    I'll shut up now because nothing I'm trying is working. I'm trying to get text presented in TextMesh Pro to look exactly like all the other text in my UI, with the nice, clean, soft glow that is offered by MK Glow. I think this is basically impossible. So, if I want to embed images in text, I have to choose: Give up MK Glow so I can use TextMesh Pro or figure out how to make it look like an image is embedded in text, myself.

    You never answered my implied question about whether or not I could do what I want with EasyText and now I see why: It's a different "MK" (MasterKey).

    Right now, I think the answer is dump TMP and figure how to how to align an image with my text so that it looks like it's a part of said text. We're just talking about some in-game currency symbols. It shouldn't be too hard.

    Thanks for your help.
     
  9. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    I got it and it's actually super easy!
    1. Make the TMP control.
    2. Add a mask to it.
    3. Turn off "show mask graphic"
    4. Add an image with no sprite and a white tint as a child to the TMP control.
    5. Set the material of the masked sprite.
     
  10. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Dang it. That still doesn't work when you have an embedded image because it creates two meshes. TMP seems pretty hacky to me. I'll see if I can just use a horizontal layout, some text, and an image, instead.
     
  11. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    well, yeah i thought your main problem was the glow.


    On the mk glow default UI shaders the emissive color is named: "_EmissionColor"
     
  12. MaxGuernseyIII

    MaxGuernseyIII

    Joined:
    Aug 23, 2015
    Posts:
    315
    Yes. MK Glow is easy to understand and use.

    It's TMP that seems designed to block us at every turn.
     
    MKGameDev likes this.
  13. K0ST4S

    K0ST4S

    Joined:
    Feb 2, 2017
    Posts:
    35
    Hello there. Where is the Volume Component that you mention in the last step of setting up for URP?
     
  14. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey there,
    On the URP the Volume Component (built-in pipeline component) is used for Postprocessing. Normally you have at least one in your scene. On this component you should be able to add MK Glow as an override.

    all the best
    Michael
     
  15. K0ST4S

    K0ST4S

    Joined:
    Feb 2, 2017
    Posts:
    35
    Okay thanks. How to make specific layers glow without using Selective with URP? Currently when I select it I get this error:
    upload_2020-10-26_9-41-34.png
     
    Last edited: Oct 26, 2020
  16. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey again,

    Regarding Selective Workflow:
    It was based on the replacement rendering feature, which seems now more or less be deprecated. The scriptable renderpipelines do not call this feature anymore and therefore it can't be supported. Thats also the reason why it will be removed in some future version of MK Glow.

    Regarding layers:
    I'm not sure if its possible on the URP to layer postprocessing effects to specific layers to be honest. On the built-in renderpipeline this was kind of possible if you set one camera as an addive layer via clearFlags. Since the URP is such a weak renderer i guess its not possible without any hacks.

    Whats actually works:
    On Threshold Workflow: Set the threshold to a value of ~1.25 (or maybe higher) and just raise the emission on specific objects you get kind of a similar selective feeling.
    On Natural Workflow: Since here is no threshold or color cutoff you could simply lower the intensity of the effect and raise the emission of the specific materials.

    Regarding your error:
    This looks really engine related rather than related to mk glow. If this issue is reproduceable and related to mk glow it would be super helpful if you could simply drop me a message via support email and send me over a simple example package which contains this issue. Then i'll take a look into it as soon as possible.

    all the best
    Michael
     
  17. ToxMox

    ToxMox

    Joined:
    Jul 23, 2020
    Posts:
    25
    How do I prevent the install wizard from constantly opening everytime the project rescans assets?
     
  18. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Right after you clicked the import package button this behavior should be disabled (maybe you imported the package again after you installed it already). Otherwise: Inside the MKGlow/Editor folder you should find a "Configuration" asset which has a "Show Installer On Reload" toggle, simply disable it.
     
  19. ZhekunWang

    ZhekunWang

    Joined:
    Mar 1, 2021
    Posts:
    1
    how do you even use this in unity...I'm using unity unity 2020.2 URP. The package I downloaded is the the MK glow 39.99$ one, and it came with an instruction sheet. I and I can't add custom renderer feature as it says for URP! And where is the volume thing ...
     
  20. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Right after you imported the package an install wizard should open. Select Universal as a renderpipeline and click the import package button.

    After that:
    1) On your Forward Renderer Asset (by default located inside the Assets/Settings Folder) click the Add Renderer Feature button and add the MK Glow Renderer Feature.
    2) On your postprocessing profile (Volume Profile called in the URP) click the Add Override Button and add Post-processing/MK/MKGlow. In the URP example scene you have "Post-process Volume" object which has a Volume Component (something you have to create for postprocessing in your own scenes) where you add your volume profile (can also be created via rightclick on your assets folder/Create/Volume Profile).

    Also highly recommend:
    Enable HDR on your Universal Render Pipeline Assets. By default there are 3 created inside the Assets/Settings folder. Make sure to enable on every of them HDR using Quality => HDR. This is especially useful for things like glow/bloom.

    Once everything is set up simply raise the emission of your materials.
     
  21. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Is it possible to set only one object glowing, in HDRP, and leave rest of the scene unaffected? If MK Glow is added to HDRP global Volume it affects everything of course. I guess you wrote somewhere that there is no way to use layers to achieve this...?
     
  22. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Sadly its not possible without any overhead (even with the now legacy Selective Workflow). I'm already experimenting with some alternatives regarding this case, but nothing felt smooth to use right now... So the best way right now is to filter the scene using the global intensity (natural workflow) and the threshold (threshold workflow).
     
  23. Tkara

    Tkara

    Joined:
    Dec 6, 2013
    Posts:
    2
    Hi! Love MKGlow! First time using URP. I'm making a VR demo for my Oculus Quest 2. I created a new project, added OpenXR plugin, XR Interaction Toolkit, and MKGlow Lite according to the instructions. I have added nothing to the default scene except for the XR Rig. As soon as I hit run and turn my head, the edges of the view/screen start glowing and slowly get worse like in attached image. It goes away if i disable MK Glow renderer feature. Is this a bug, or am i doing something wrong? Thanks!
    Unity 2020.2.1f1
    URP_Glare.png
     
  24. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey there & sorry about the issue you get,
    sadly i can't help you in that case. With the update of the URP version for 2020.2+ (earlier versions should work as intended) something internally has changed about the XR rendering, which broke the XR compatibility completely. As far as i broke it down its something about the rendered XR Occlusion Mesh and i assume a stencil buffer or a rendertarget is not cleared correctly (this issue is also reproduceable if you port the builtin bloom onto the scriptable renderer feature, which is our only option for custom prostprocessing effects).
    I also pointed it out on the public trello board: https://trello.com/c/yLGn1lrj/144-20202-on-urp-xr-cant-be-supported-right-now (will update the compatibility section of the product description to make it more clear)

    If you bought the shader especially for the specific project feel free to drop a message via email (in that case i could offer you a refund at least).

    all the best
    Michael
     
  25. Tkara

    Tkara

    Joined:
    Dec 6, 2013
    Posts:
    2
    Thanks! I appreciate the response. I don't need a refund. I just wasn't sure if it was my own error or a problem with the plugin, or in Unity. I don't need any specific version of unity right now, since I'm just making stuff for myself for fun. I've used MKGlow in multiple projects in the past, and I can just use an older version of unity or a different render pipeline for now. I'm just glad you're aware of the issue in 2020.2+, and maybe if someone else is having the same issue, they'll see this post.
    Thanks again! MKGlow is a great asset!
     
  26. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    hey, glad you like the shader!
    feel free to drop me a message at any time if you need some further assistance. The issue will be fixed as soon as possible (hopefully we get a proper postprocessing framework in the future for URP).

    all the best
    Michael
     
  27. Valentinhon

    Valentinhon

    Joined:
    Oct 20, 2019
    Posts:
    76
    Hello every one

    I'm creating a game with unity for Android devices and to make the difference with the multitude of the game in the same genre, I use your MK Glow plugin.
    I had no issue at all using it but 1 week ago, between two build, all scene that use MK glow script are make the game freeze on build. Everything is fine on the Unity Editor but on build (.apk) when the scene has to be loaded, the game freeze.

    I've used adb logcat to see the problem :

    Code (CSharp):
    1. 00000000000000000000000>:0
    2. 12-22 06:21:16.330 17032  6463 E Unity   :   at MK.Glow.Legacy.MKGlow.OnRenderImag
    3. 12-22 06:21:16.357 17032  6463 I Unity   : test
    4. 12-22 06:21:16.357 17032  6463 I Unity   : Playermovement:Update()
    5. 12-22 06:21:16.357 17032  6463 I Unity   :
    6. 12-22 06:21:16.360 17032  6463 E Unity   : RenderTexture.Create with shadow sampling failed: Hardware does not support shadow compare sampling.
    7. 12-22 06:21:16.360 17032  6463 E Unity   : UnityEngine.RenderTexture:GetTemporary(RenderTextureDescriptor)
    8. 12-22 06:21:16.360 17032  6463 E Unity   : MK.Glow.MipBuffer:CreateTemporary(RenderContext[], Int32, CommandBuffer, RenderTextureFormat, Boolean, RenderPipeline)
    9. 12-22 06:21:16.360 17032  6463 E Unity   : MK.Glow.Effect:PreSample()
    10. 12-22 06:21:16.360 17032  6463 E Unity   : MK.Glow.Effect:Build(RenderTarget, RenderTarget, Settings, CommandBuffer, CameraData, Camera, Boolean)
    11. 12-22 06:21:16.360 17032  6463 E Unity   : MK.Glow.Legacy.MKGlow:OnRenderImage(RenderTexture, RenderTexture)
    12. 12-22 06:21:16.360 17032  6463 E Unity   :
    13. 12-22 06:21:16.360 17032  6463 E Unity   : [ line -298585256]
    14. 12-22 06:21:16.360 17032  6463 E Unity   :
    15. 12-22 06:21:16.362 17032  6463 E Unity   : IndexOutOfRangeException: Index was outside the bounds of the array.
    16. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.RenderTargetContext.SetRenderTargetContext (System.Collections.Generic.List`1[T] renderTargets) [0x00000] in <00000000000000000000000000000000>:0
    17. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.PipelineExtensions.Draw (System.Collections.Generic.List`1[T] destinations, UnityEngine.Material material, System.Boolean useGeometryShader, System.Int32 pass) [0x00000] in <00000000000000000000000000000000>:0
    18. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.Effect.Draw (MK.Glow.RenderDimension dimension, System.Boolean forcePixelShader) [0x00000] in <00000000000000000000000000000000>:0
    19. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.Effect.PreSample () [0x00000] in <00000000000000000000000000000000>:0
    20. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.Effect.Build (MK.Glow.RenderTarget source, MK.Glow.RenderTarget destination, MK.Glow.Settings settings, UnityEngine.Rendering.CommandBuffer cmd, MK.Glow.CameraData cameraData, UnityEngine.Camera renderingCamera, System.Boolean finalBlit) [0x00000] in <00000000000000000000000000000000>:0
    21. 12-22 06:21:16.362 17032  6463 E Unity   :   at MK.Glow.Legacy.MKGlow.OnRenderImag
    22. 12-22 06:21:16.390 17032  6463 I Unity   : test
    23. 12-22 06:21:16.390 17032  6463 I Unity   : Playermovement:Update()
    24. 12-22 06:21:16.390 17032  6463 I Unity   :
    25. 12-22 06:21:16.395 17032  6463 E Unity   : RenderTexture.Create with shadow sampling failed: Hardware does not support shadow compare sampling.
    26. 12-22 06:21:16.395 17032  6463 E Unity   : UnityEngine.RenderTexture:GetTemporary(RenderTextureDescriptor)
    27. 12-22 06:21:16.395 17032  6463 E Unity   : MK.Glow.MipBuffer:CreateTemporary(RenderContext[], Int32, CommandBuffer, RenderTextureFormat, Boolean, RenderPipeline)
    28. 12-22 06:21:16.395 17032  6463 E Unity   : MK.Glow.Effect:PreSample()
    29. 12-22 06:21:16.395 17032  6463 E Unity   : MK.Glow.Effect:Build(RenderTarget, RenderTarget, Settings, CommandBuffer, CameraData, Camera, Boolean)
    30. 12-22 06:21:16.395 17032  6463 E Unity   : MK.Glow.Legacy.MKGlow:OnRenderImage(RenderTexture, RenderTexture)
    31. 12-22 06:21:16.395 17032  6463 E Unity   :
    32. 12-22 06:21:16.395 17032  6463 E Unity   : [ line -298585256]
    33. 12-22 06:21:16.395 17032  6463 E Unity   :
    34. 12-22 06:21:16.397 17032  6463 E Unity   : IndexOutOfRangeException: Index was outside the bounds of the array.
    35. 12-22 06:21:16.397 17032  6463 E Unity   :   at MK.Glow.RenderTargetContext.SetRenderTargetContext (System.Collections.Generic.List`1[T] renderTargets) [0x00000] in <00000000000000000000000000000000>:0
    36. 12-22 06:21:16.397 17032  6463 E Unity   :   at MK.Glow.PipelineExtensions.Draw (System.Collections.Generic.List`1[T] destinations, UnityEngine.Material material, System.Boolean useGeometryShader, System.Int32 pass) [0x00000] in <00000000000000000000000000000000>:0
    37. 12-22 06:21:16.397 17032  6463 E Unity   :   at MK.Glow.Effect.Draw (MK.Glow.RenderDimension dimension, System.Boolean forcePixelShader) [0x00000] in <00000000000000000000000000000000>:0
    38. 12-22 06:21:16.397 17032  6463 E Unity   :   at MK.Glow.Effect.PreSample () [0x00000] in <00000000000000000000000000000000>:0
    39. 12-22 06:21:16.397 17032  6463 E Unity   :   at MK.Glow.Effect.Build (MK.Glow.RenderTarget source, MK.Glow.RenderTarget destination, MK.Glow.Settings settings, UnityEngine.Rendering.CommandBuffer cmd, MK.Glow.CameraData cameraData, UnityEngine.Camera renderingCamera, System.Boolean finalBlit) [0x00000] in <00000000000000000000000000000000>:0
    The first thing that is weird is this ".. RenderTexture.Create with shadow sampling failed: Hardware does not support shadow compare sampling." This is false because my old build run Mk glow perfectly on my phone and I didn't change my phone.

    Could you please help me to identify the real issue please ?

    Regards ,

    Honoré Valentin
     
  28. DCUplink

    DCUplink

    Joined:
    Feb 25, 2019
    Posts:
    2
    Hi All,
    I'm having an issue with the demo scenes in a URP 2021.2.8f1 install.
    The cubes scene shows the cubes, but no lighting.
    I ran a bake using bakery but still only get cube glow.
    Any suggestions as to what's wrong with the lighting? upload_2022-4-24_1-17-21.png
     
  29. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey,
    I'm not sure whats happening here. Based on the image i would guess you have the "Debug View" enabled on the postprocessing component. Could you please check that? Bakery should not affect it at all.

    Also did a quick test on 2021.3 LTS, but was not able to reproduce your issue.

    if the issue still persists it would be super helpful if you could send me over a simple example package via support mail if this is reproduceable. Then i'll take a closer look at it.
     
    DCUplink likes this.
  30. laessnb

    laessnb

    Joined:
    Jun 10, 2014
    Posts:
    101
    Hi, I have layered cameras in 2019.4 built-in, and was wondering whether MK Glow would work with it.

    Basically, I have a world camera and a UI camera. I was using Beautify's bloom because it looked great, but there's no way to modify the settings by layer (e.g., I want Beautify's aniso flares in my scene, but not on my UI). I'm currently rendering the UI camera to a rendertexture and then drawing that over everything as a RawImage, but Unity has so many compositing issues that the resultant UI image doesn't always match the actual UI. I was thinking of combining Beautify on the world camera with MK Glow on the UI camera, but I would need to restrict MK Glow to operating only on the UI layer. Is this possible with my setup? Is there a way for me to test this without buying the asset?

    Thank you in advance.
     
  31. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey there & sorry about the late reply.
    Somehow just got the notification very late.

    Its quite hard to give you an 100% correct answer here.

    Camera Stacking:
    Since you are using the Built-in renderpipeline it should be possible to do some kind of camera stacking. One camera, which renders the all the non-glowing objects using a "dont clear" flag. And another camera, which renders all glowing objects normally. I did something similar on a project in the past and it worked great. However i'm not sure how this would fit in your setup.

    Glowing UI objects:
    Even if the above would work, i'm not sure how this would fit in into glowing UI's. Your canvas has to be set to render either in Screen Space - Camera or World Space. Screen Space - Overlay does not work, because its completely separated from post processing.

    Selective Workflow:
    Whats also worth a try would be the Selective Workflow of MK Glow. I deprecated it some time ago, but its still in the shader for backwards compatibility and should work fine on the built-in renderpipeline. It creates a glow map, which then lets you selectively make objects glow. The downside of this is you have to use separate shaders and the objects get drawn a second time, because of the used replacement rendering.
    However i would still recommend the Threshold or Natural workflow, because it has a better performance and works shader independent, but still wanted to mention the selective workflow here.

    Render To Texture:
    If you are only using a Screen Space - Camera UI you could also try to render it into a texture and then let mk glow perform on it and blend it afterwards onto your regular camera (should work with any reder to texture setup if you are using current approach).

    Feel free to drop me a message via support mail if you have any further questions or a test version.

    all the best
    Michael
     
    laessnb likes this.
  32. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    I am using Unity 2022.1.18 with default rendering and latest post process stack.
    I imported MK glow to my project including sample scenes.

    upload_2022-10-2_17-57-19.png

    I set HDR mode, HDR itself is turned on or off by an option in the game:

    upload_2022-10-2_17-58-20.png

    "Attach the MK Glow component to your rendering camera" it says next, but I do not find anything:
    upload_2022-10-2_18-0-3.png

    I also tried to add an effect like in the demo scene to my post processing volume:

    upload_2022-10-2_18-0-39.png

    but there is none. What am I missing? Thanks a lot!
     
  33. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    PS: When I am opening the mk glow samples in my project, they work there but without glow. And in the post process volume I also cannot find it. Is it something with the namespace maybe?
     
  34. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey,
    I'm not sure what is going wrong here.

    If you imported the component for a specific renderpipeline/setup you should also hit the example import button again, because based on the renderpipeline selection a different setup of example scenes is imported.

    I assume you have imported the legacy image effects (component per camera) and the post processing stack v2 component at the same time. This should be no problem at all and it also confuses me that there is actually no component for the camera and for the ppsv2 either.

    In your case it would be super helpful if you could send me over a message via support mail, then i'll take a closer look at this. At best would be if you attach a simple example package including this issue. Normally it should be fixed in no time.

    all the best
    Michael
     
    Firlefanz73 likes this.
  35. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    I think I got it working with reimporting again for BuiltIn + Post Processing, I am not using a render pipeline, and setting HDR on the main camera to "Use graphic settings".
    Now it works and looks great so far, I will do some fine-tuning now :)

    Thanks for the hint! On a monitor without HDR would it also look good (maybe not as great but also with a glow effect)?
     
  36. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Hey again,
    glad you could already solve the issue & hope you like the shader!
    Yeah sure, since the effect is based on the render target's precision it can be used with and without a HDR monitor.
    HDR itself for the rendertarget and a linear color space (can be changed in project settings) is just something i would highly recommend for effects like glow in general, because it simply does so well together. Otherwise you would need to fit in the glow into a color range of [0, ..., 1] and mess around with the gamma correction..

    Feel also free to drop me any feedback via support mail (just the best place to reach out to me) if you like at any time

    all the best
    Michael
     
    Firlefanz73 likes this.
  37. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Great stuff this is, thanks. :) Yeah I will get back to you if I have some questions or maybe screens / videos next couple of days.
     
    MKGameDev likes this.
  38. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Can I create a volume light or an effect like this with your shaders? For an underwater scene with a spotlight that should be visible and also work like a spotlight. I already have a mesh and a texture that is weaker at the bottom:

    upload_2022-10-18_20-55-7.png
     
  39. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Just to point out: MK Glow ist not a replacement for a volumetric lighting. MK Glow should simulate the bright surface scattering of light and/or emissive surfaces.

    However what you could try:
    Since mk glow is based on the pixel's brightness, you can use that for your cone. If you make the cone transparent and emissive (for example URP lit shader set to transparent and raise up the emission) you should end up with a transparent glowing lighting cone. I never tested such a usecase to be honest, but it may get you closer to your desired result.
     
  40. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    I'll try that thanks a lot!
     
  41. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    @MKGameDev We're trying to push our project from Unity 2021 to 2022 and MKGlow is not updating correctly.

    I created a fresh project in Unity 2022.2.1f1 and imported the package to see what happens and it gives the same problem:


    Could not find Install Wizard Configuration Asset, please try to import the package again.
    UnityEngine.Debug:LogError (object)
    MK.Glow.Editor.InstallWizard.Configuration:LogAssetNotFoundError () (at Assets/_MK/MKGlow/Editor/Configuration.cs:74)
    MK.Glow.Editor.InstallWizard.Configuration:TryGetInstance () (at Assets/_MK/MKGlow/Editor/Configuration.cs:97)
    MK.Glow.Editor.InstallWizard.Configuration:get_isReady () (at Assets/_MK/MKGlow/Editor/Configuration.cs:26)
    MK.Glow.Editor.InstallWizard.InstallWizard:Reload () (at Assets/_MK/MKGlow/Editor/InstallWizard.cs:78)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

    Help?
     
  42. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    Update: should be fixed already.

    thanks for reporting!

    all the best
    Michael
     
  43. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hi!

    I love the effect but it lights up my skybox way too much. I trie to set Deferred Fog to true and Exclude Skybox to true on post process layer but it did not help much, I set the camera on an own layer and removed that one from the post process layers but does not help at all only if I remove the default layer but I do not want that...

    Any idea how to get my skybox darker / unbloomed again?

    Thanks!
     
  44. MKGameDev

    MKGameDev

    Joined:
    May 14, 2013
    Posts:
    69
    hey,
    since i dont have any specific details about your project or rendering i can give only my general thoughts.
    Based on the used Renderpipeline version, Editor version and the project setup then the post processing works differently. Its kinda confusing but thats the way it is currently.

    General Rules:
    Threshold Workflow:
    The threshold value acts like a greyscale filter, which means, the higher this value gets, the more colors will be filtered out. You control the resulting glow by the threshold (base of the glow map), the global intensity of the effect and the pixels brightness influenced by lighting, emission and so on.
    Natural Workflow: This is more of a realistic approach. There is no thresholding happen. This means the resulting glow is based on the global intensity and the pixels color (lighting, emission and so on...)

    Additional Info:
    HDRP:
    There is so much going on in terms of colors (color grading, whitebalance, tonemapping, exposure, eyeadaptation...) that it can be hard to get the threshold workflow working without any issue. Therefore i mostly use and recommend the natural workflow here, because it simply fits better with the hdrp.
    URP: Using multiple cameras, culling masks and renderers (including their masks) it is possible to create quite a selective glow (a proper Selective Workflow for SRP's is still something i experiment with). If you are interested in this feel free to drop me a message via email. I still have an older example project left using this setup. Of course there may be some case in which its not the perfect solution.
    If this selective workflow is also working for the HDRP i'm not sure about (i never tested it to be honest). For the built-in renderpipeline it should be possible using the "dont-clear" flag and multiple cameras (bit clunky).

    Debugging the resulting glow:
    you can view the base glow map via => Debug Mode => Raw Bloom. On the threshold workflow you will see here the glow base map after filtering using threshold. On natural workflow here you will see basically mostly the raw image, influenced by some parameters (remember no thresholding is happening in natural mode).

    So to get your skybox filtered out by using the threshold workflow (just to give you an example) you want to have a very "neutral"setuped scene as a base. Then switch to the debug view and icrease the threshold value until you see only the objects you want to glow. Remember, the higher the threshold value gets, the more bright a pixel need also to get. So be careful to don't mess up your emission values.

    If you are forced to the natural workflow and missing the thresholding, thats actually something i have on my List of ideas.
    So feel free to drop me a message via email here too (also any feedback is highly appreciated, because of the someday to be released version 5).

    all the best
    MIchael
     
    Firlefanz73 likes this.
  45. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Thanks a lot, I will try. I also had a gamma effect that was too high in addition to mk glow, I lowered it and now it is already a lot better. I am not using HDRP by the way :)
     
    MKGameDev likes this.