beinteractive / LWRPAmbientOcclusion

Post-Processing Stack v2 Ambient Occlusion works on Lightweight Render Pipeline
185 stars 21 forks source link

Unity 2019.1.3f1 + Post Processing 2.1.6 + LWRP 5.7.2 #2

Open PinkPanter opened 5 years ago

PinkPanter commented 5 years ago

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

enqui commented 5 years ago

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

PinkPanter commented 5 years ago

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 commented 5 years ago

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

enqui commented 5 years ago

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!

edwin0cheng commented 5 years ago

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

brianjkd commented 5 years ago

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.

edwin0cheng commented 5 years ago

@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.
brianjkd commented 5 years ago

@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?

edwin0cheng commented 5 years ago

@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).

brianjkd commented 5 years ago

@edwin0cheng Gotcha, thank you for the help.

PinkPanter commented 5 years ago

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

harayoki commented 5 years ago

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

PinkPanter commented 5 years ago

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 commented 5 years ago

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

ismael1034 commented 5 years ago

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.

PinkPanter commented 5 years ago

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

jlmakes commented 5 years ago

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

edc19rfv26 commented 5 years ago

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 namespaceUnityEngine.Rendering'. Are you missing an assembly reference? when I input this package.... how do I fix it :(

PinkPanter commented 5 years ago

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

JasonMichaelSmith commented 5 years ago

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.

transat commented 5 years ago

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).

jessunity commented 5 years ago

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?

jaselito commented 5 years ago

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.

TimJansenDB commented 5 years ago

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

PinkPanter commented 5 years ago

@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

robrab2000 commented 5 years ago

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

jaselito commented 5 years ago

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

PinkPanter commented 5 years ago

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

alanmthomas commented 5 years ago

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!

enqui commented 5 years ago

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.

bladesero commented 5 years ago

image image

Unity3D 2019.1.10f1,PPSV2 2.1.6+LWRP5.7.2, the sealed class type make AORender is inaccessible, how to deal with it?

buFFalo94 commented 4 years ago

This thing won't work on newer version of LWRP since it's now use an internal version of Post Processing which is directly tied to it. No more need to add Post Processing Package as you can see in the screenshot below LWRP

PinkPanter commented 4 years ago

I have just checked Unity 2019.2.8f1 + Post Processing 2.1.7 + LWRP 6.9.1, and everything is working, at least in Editor.

For anybody who is meeting problems, I suggest to delete the library and check manifest.json to include those lines

"com.unity.postprocessing": "2.1.7",
"com.unity.render-pipelines.core": "6.9.1",
"com.unity.render-pipelines.lightweight": "6.9.1",
SusanneSGI commented 4 years ago

Thanks for updating this for Unity2019.2! It works perfectly for me in the project provided, but unfortunately I get this error when I try to use it in an existing project: CommandBuffer: built-in render texture type 5 not found while executing Render PostProcessing Effects (SetComputeTextureParam)

I can play the scene, and the cubes are generated and everything, but the AO effect is just not there.

The two projects use the same Unity version, the same package versions, and I can't find any differences in project settings or other things that would cause this error. Do you have any guess as to what could be the issue?

I've already tried the "go to" fix of deleting the Library folder and opening the project again. Didn't help :/

LeGoatie commented 4 years ago

image image

Unity3D 2019.1.10f1,PPSV2 2.1.6+LWRP5.7.2, the sealed class type make AORender is inaccessible, how to deal with it?

Same Problem here on 2019.2.8f1 + Postprocessing 2.2.2 + LWRP 6.9.2... I had to change the import settings, because the 2 assembly references were grayed out and i got the same error that the namespace could not be found. After i changed it to the settings shown in the screenshot, i got the error that it is inaccessible. I already tried deleting the library and cache but no luck here :-( is there any way to fix this? thanks in advance!

AO_Bug