Looooong / Unity-SRP-VXGI

Voxel-based Global Illumination using Unity Scriptable Render Pipeline
MIT License
774 stars 63 forks source link

Doesn't work with Unity 2018.3.0f2 #1

Closed tusharsankhala closed 5 years ago

tusharsankhala commented 5 years ago

Hi, Tried with Unity 2018.3.0f2, no effect of VXGI, that i can see. Hope you could help.

Thanks, Tushar novxgi

Looooong commented 5 years ago

Looks like upgrading to any verions of Unity forces re-importing the whole project. In my experience, this process usually breaks the currently used render pipeline asset (located in Assets/Profiles/VXGIRenderPipeline.asset), and thus Unity switch back to use the default render pipeline.

This is not an actual problem though. All you have to do is to re-create a new render pipeline asset by going to the Create menu: Create/Rendering/VXGI Render Pipeline Asset. Then go to Edit/Project Settings/Graphics. Under the inspector, drop the newly created asset into Scriptable Render Pipeline Settings. It looks like this:

screenshot from 2019-03-06 16-48-53

tusharsankhala commented 5 years ago

Hi,

Thanks for the reply. I followed the same steps that you have mentioned, but still no output in unity. I am attaching the screenshot of asset and console.

new_vxgiasset consolecapture

Looooong commented 5 years ago

What kind of OS are you working on? And what kind of graphics card and graphics API you are using?

tusharsankhala commented 5 years ago

Working on windows 10 64 bit GPU: Nvidia 660ti

Looooong commented 5 years ago

Strange. I imported this project onto Unity 2018.3.6f1 and it works fine.

Looooong commented 5 years ago

I think that the voxel lighting environment is not created. You can click on Camera object, under the VXGI component, change Resolution to a lower value like Low or Medium. I doubt that your GPU cannot create high resolution voxel texture.

tusharsankhala commented 5 years ago

I tried with Low res as well but issue is still there can't see VXGI, might be due to my graphics card. :( But anyways thanks for the help, hoping to see new updates on this repo, will surely try again after upgrading my PC.

Looooong commented 5 years ago

I see that the GTX 660ti can have 2GB to 3GB of RAM. The highest resolution only consumes around 800MB of RAM. I wanna know if your card is supporting 16-bit floating-point 3D render texture format. Here is the document for this format.

As stated in the document, you can check SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf). If it returns false, your card doesn't support this format. You can modify the source code to use other texture format, such as 8-bit floating-point.

Looooong commented 5 years ago

You can also send me editor log file after opening the project. I will inspect it later.

jeske commented 5 years ago

FYI - I was able to get this SRP-VXGI working today in Unity 2018.3.6f1 by following the video tutorial.

The video tutorial is just missing a couple steps:

1) go into Window->Packages, clicking "+", then "Add package from disk..." and navigating to the Unity-SRP-VXGI/package.json file 2) go into Project Settings -> Player -> Other, and change the Color Space to Linear

After that I think all the steps are in the video.

Looooong commented 5 years ago

@jeske I intentionally used Gamma Color space because it looks better with high intensity light. Also, I have just reorganized the project yesterday, so importing the package is different than before that.

jeske commented 5 years ago

Ahh... I thought I read somewhere that it needed Linear color space. That must have been my mistake.

I'm pretty impressed with the results on my small tests. Of course there are issues, but it's a great starting point. Thanks so much for open-sourcing this!

Looooong commented 5 years ago

@jeske Maybe you are right about that we should pick linear color space because of calculation accuracy. I chose gamma color space a year ago and now I don't quite sure why I made that decision.

AFAIK, Linear color space pipeline removes gamma correction from input colors and textures and, later on, add gamma correction the output frame buffer. With HDR camera, very bright light will be clamped to white. I think this is why I used gamma color space just to display high intensity light more nicely.

To use linear color space with HDR, we will need tonemapping to be able to display very bright pixel. However, the render pipeline doesn't work with post-processing stack so I cannot use its tonemapping.

I will probably open 2 issues:

Looooong commented 5 years ago

@jeske

I intentionally used Gamma Color space because it looks better with high intensity light.

I was mistaken for this incorrect statement. Actually, I did use Linear color space, so you are right about this. The decision was based on SEGI User Guide