LWRPAmbientOcclusion icon indicating copy to clipboard operation
LWRPAmbientOcclusion copied to clipboard

Unity 2019.1.3f1 + Post Processing 2.1.6 + LWRP 5.7.2

Open PinkPanter opened this issue 5 years ago • 35 comments

Hello, I just added support for new version of Post Processing, and updated some other stuff to fit new Unity and LWRP.

PinkPanter avatar Jan 26 '19 01:01 PinkPanter

Thanks for the update. Sadly I am getting a black screen when I enable this in a build or when I hit the play button. Unity 2018.3 LWRP version 4.6/4.8/4.9 Post Processing 2.1.2

When I disable the "Post Processings" in the editor viewport, the view is rendering properly (minus the post effects of course).

It seems to be a peculiar glitch as it may or may not happen with each time you start the editor.

black screen

enqui avatar Jan 29 '19 16:01 enqui

Do you get black screen only in Scene tab, or in Game tab too? Cause I found a problem with Scene view, but everything was fine in Game view.

PinkPanter avatar Jan 31 '19 09:01 PinkPanter

I fixed black screen. But I could reproduce this bug only in editor view.

PinkPanter avatar Feb 03 '19 13:02 PinkPanter

I fixed black screen. But I could reproduce this bug only in editor view.

It was in both, but after a couple of restarts it started only happening on Editor view only. I have not yet tried the fix. If the problem persists I will let you know. This is a crucial feature and I am not sure why they have not given us access to it by default.

Thank you!

enqui avatar Feb 03 '19 16:02 enqui

@PinkPanter I just try your PR and It works. Would @beinteractive consider to merge it ?

edwin0cheng avatar Feb 07 '19 15:02 edwin0cheng

What's the proper way to add this to an existing project via the package manager? I am interested in trying this out. I have tried adding

"jp.beinteractive.lwrpambientocclusion": "https://github.com/PinkPanter/LWRPAmbientOcclusion.git" to my project's manifest.json but Unity's package manager gives an error stating cannot clone the https://github.com/keijiro/FFmpegOut package.

brianjkd avatar Feb 16 '19 06:02 brianjkd

@brianjkd , Right now you cannot use this package directly in Package Manager by git package dependencies, as "finding packages in subdirectories" is still not supported in Package Manager at this moment.

However, i found a little trick to do it right now :

  1. Fork this repo and clone it to local.
  2. Use this command: git subtree split --branch upm --prefix /Assets/Post-process LWRP AO/ to create a new branch which only contain the subdirectory. Read more about this command
  3. Push it to your forked repos.
  4. Use "jp.beinteractive.lwrpambientocclusion": "https://github.com/YOURNAME/LWRPAmbientOcclusion.git#upm" instead.
  5. Done.

edwin0cheng avatar Feb 16 '19 06:02 edwin0cheng

@edwin0cheng Thanks.

This works in the Unity editor, but not on my Android Pixel 2. The AO effect is not rendered, and other image effects are. Is this intended to work on mobile?

brianjkd avatar Feb 16 '19 17:02 brianjkd

@brianjkd , It will only works in machine which support compute shader. The reason is it just use reflection to by pass the limitation of LWRP (which do not use compute shader).

edwin0cheng avatar Feb 16 '19 17:02 edwin0cheng

@edwin0cheng Gotcha, thank you for the help.

brianjkd avatar Feb 16 '19 17:02 brianjkd

Fixed bug, that we caught on iOS. It was breaking whole render.

PinkPanter avatar Feb 19 '19 21:02 PinkPanter

Does this PR work without package jp.keijiro.ffmpegout in subdirectory? I think it does.

harayoki avatar Mar 14 '19 08:03 harayoki

I have upgraded AO to support Unity 2019. But be aware, sometimes it behaves really weird. Like breaks another effects, or isn't work until cleaning up library.

PinkPanter avatar May 22 '19 21:05 PinkPanter

Does this PR work without package jp.keijiro.ffmpegout in subdirectory? I think it does.

Yep. it's just a tool for recording screen - repo You can safely delete it

PinkPanter avatar May 23 '19 17:05 PinkPanter

Sorry, I'm a beginner in unity and I don't know how to add the effect, if I click in my post process volume it doesn't show the custom effect option, I use the 2018.3.4.1 version.

ismael1034 avatar May 23 '19 19:05 ismael1034

Well, it should work from the box, check for errors in console. And try run example project, it should work.

PinkPanter avatar May 26 '19 10:05 PinkPanter

I tried the demo scene and it seems to work.

lwrpao2

~Although, it makes both my scene and game views black.~

lwrpao

Edit: You must use both Unity/Ambient Occlusion and Custom/LWRPAO together. (Read the docs? 😆) Now it seems to work great! Nice work @PinkPanter @beinteractive

2019-05-26 04_36_16-Unity 2019 1 4f1 Personal - Sandbox unity - Oddstone - PC, Mac   Linux Standalon


Unity 2019.1.4f LWRP 5.13.0

jlmakes avatar May 26 '19 11:05 jlmakes

Excuse me, I don't know why I always got the error message => Assets/Post-process LWRP AO/Runtime/LWRPAO.cs(6,29): error CS0234: The type or namespace name PostProcessing' does not exist in the namespace UnityEngine.Rendering'. Are you missing an assembly reference? when I input this package.... how do I fix it :(

edc19rfv26 avatar May 28 '19 09:05 edc19rfv26

Looks like you don't have Post Processing Stack. Try to check. If you have, then you can try to delete LWRPAO.cs, and wait until Unity will compile all code. Then try add it again

PinkPanter avatar May 28 '19 14:05 PinkPanter

Works great. Any tips on how to extend this to work for VR? The left eye is fine, but the effect is slightly offset in the right eye.

JasonMichaelSmith avatar Jun 11 '19 23:06 JasonMichaelSmith

Awesome. This PR Works for me in 2019.2.0b5 with LWRP 6.7.1. I imported the package via Package Manager ("select package from disk" then selected the package.json file).

transat avatar Jun 12 '19 07:06 transat

Struggling to get this to work in 2019.1.8f1, LWRP 5.16.1, V2 PP. Tried your fix above of deleting the LWRPAO.cs and re-adding it, but didn't work. Imported into project through package manager ("add package from disk"). I'm sure I'm missing something but don't know what!

Edit: forgot to mention I'm getting the same error as edc19rfv26 - Assets/Post-process LWRP AO/Runtime/LWRPAO.cs(6,29): error CS0234: The type or namespace name PostProcessing' does not exist in the namespace UnityEngine.Rendering'. Are you missing an assembly reference?

jessunity avatar Jun 27 '19 11:06 jessunity

This is a great project! I would also be interested to know if it can be made to work in VR. I'm having the same problem mentioned above with the effect for the right eye being offset.

jaselito avatar Jul 09 '19 15:07 jaselito

Struggling to get this to work in 2019.1.8f1, LWRP 5.16.1, V2 PP. Tried your fix above of deleting the LWRPAO.cs and re-adding it, but didn't work. Imported into project through package manager ("add package from disk"). I'm sure I'm missing something but don't know what!

Edit: forgot to mention I'm getting the same error as edc19rfv26 - Assets/Post-process LWRP AO/Runtime/LWRPAO.cs(6,29): error CS0234: The type or namespace name PostProcessing' does not exist in the namespace UnityEngine.Rendering'. Are you missing an assembly reference?

Some Problem here. Unity 2019.1.9f + Post Processing 2.1.6 + LWRP 5.7.2

TimJansenDB avatar Jul 12 '19 08:07 TimJansenDB

@TimJansenDB @jessunity I had such problem, but it dissapear after deleting PackagCache from Library folder. I also updated project to actual version of Unity and Post Processing. But I see this error very often, looks like it some problem with Package Manager

@jaselito @JasonMichaelSmith Sorry, but I don't know how to handle VR with it, I researched Post Processing a little and I think the problem is there, or somewhere in the LWRP. You can found VR part of it and try to fix it. Maybe this problem situated in AO, but it is not completely, but kinda black box, you can try to check if it works without LWPR. If it is, then LWRPAO is missing something

PinkPanter avatar Jul 14 '19 19:07 PinkPanter

Hey, been trying to get this working in WebGL. I just get a blank screen :( I've tried fiddling with the AO parameters and enabling/disabling it but so far no luck. Any suggestions? file

robrab2000 avatar Jul 15 '19 14:07 robrab2000

@PinkPanter Fair enough, thanks for replying! AO does work in VR with the default render pipeline.

jaselito avatar Jul 16 '19 09:07 jaselito

@robrab2000 I'm pretty sure that it happens because WebGL doesn't support compute shaders. But I'm not 100% sure

PinkPanter avatar Jul 20 '19 11:07 PinkPanter

I'd love to be able to try this but, after trying multiple solutions listed above, I'm getting the same error as others. Assets/Post-process LWRP AO/Runtime/LWRPAO.cs(6,29): error CS0234: The type or namespace name PostProcessing' does not exist in the namespace UnityEngine.Rendering'. Are you missing an assembly reference?

Any ideas on how I can get this working? Using 2019.1.7f1 with LWRP 5.16.1 and PostProcessing 2.1.7. Thanks!

alanmthomas avatar Aug 03 '19 08:08 alanmthomas

Thank you for maintaining this. It's super helpful. Are there any plans to upgrade to 2019.2?

In 2019.2 looks like AO is drawn on top of everything without any blending.

enqui avatar Aug 12 '19 19:08 enqui