A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Graphics Experimental Previews' started by Matjio, Feb 11, 2022.
Any ETA when Dynamic APV comes? And is it comes to 2023.3?
Unfortunately no, it's very unlikely that it will come for 23.3
wait, is APV going to be dynamic? as in dynamic realtime re-lighting?
This is something that we showcased at GDC this year during the APV talk at the very end
It's support GI from dynamic lighting in static environments, so it's not full GI
Sadge. But if it can interact with dynamic models (such as character), it will solve so many headaches with various GI solutions
Ah. . . you mean the automatic lighting scenario blending part? i thought it going to be full dynamic GI
Where does it say "automatic scenario blending"? It is dynamic GI where light can move but environment can not.
Not sure where, either in this thread or in twitter. It was a day after the talk, Someone from the HDRP team explain that it's basically the scenario blending can be automatically connected to Sun Light Direction, it still a precomputed GI but we don't have to deal with scenario blending manually.
I don't see any others solutions than storing lightmap data and blend it in runtime, it's even more convenient with light probes and with native Unity UI it will make it even better
I believe this segment in GDC 23 is what you're both referring to.
Is this a bug right?.
My shadow Max Distance is short 15, using one cascade count.
I'm using Lighting Mode = Shadow Mask.
So dynamic objects follow this rule: "Baked shadows from static GameObjects using Light Probes, beyond the Shadow Distance."
With classic light probes, everything is right, but using AVP the direct lighting is hitting directly, not taking into account the light probes.
It depends on your settings. What is the geometry bias you have set? Are you using view bias? Please provide us with your setup.
Hi. I am unable to bake any scenes with probe volumes. I tried with 22lts-23lts-23.1 versions. I checked all tutorials available. Tried many scenarios. It says it's baking but nothing happens afterwards. What i am missing?
Be sure that you turn on the effect in the HDRP Global Settings
Check different values and nothing. I think that it's not a parameters issue.
Shadow mask is not supported with APV. It is not the right solution to the problem as you need to have pretty high res data for shadows mask to work correctly
Instead the recommended way is to use a long range for the last cascade of the shadow map.
Using cached shadow maps may help regarding the performance, especially because you can set different update frequency for each cascade (eg. close cascades are every frame, far cascades are every few frames).
More info in the doc: https://docs.unity3d.com/Packages/c...anual/Shadows-in-HDRP.html#shadow-update-mode
Thanks for the reply. I will test what you mentioned.
But actually, the Shadow Masks with short distance shadow + lightmaps have been working very well even in low-end hardware devices.
I want some meshes not to be lit by probe volumes or reduce the effect of probe volumes.
Is there any way to change the effect of probe volumes depending on the layers or meshes?
You can use the indirect lighting controller volume override to dim the GI influence on some light layers
Is there a way to avoid APVs in UNITY_SERVER builds? Currently, it's built and deployed to all our servers and also loaded at runtime. We're on 2022 LTS
If you have a custom hdrp asset for your server build, you can disable apv so that data is not included in the build
Thx! It worked.
Shadowmask support seems like a UI issue, since I assume it relies on the lighmap settings from meshrenderers, which are only enabled for lightmapped objects. Is there any other reason shadowmasks aren't compatible?
Probably because Shadow masks baked static marked gameobjects and realtime for unmarked. The system may conflict with APV
I'm also really curious about his point 1. I'm getting similar errors with a much smaller and more modest terrain, 4km x 4km. I've found I can mitigate it somewhat by strategically lowering the number of, say, trees that have Contribute GI/Light Probes turned on... but if I have to do that, then APV's don't actually decouple light complexity from scene complexity, do they?
They do decouple the lighting from scene complexity, but there's no real way to decouple the baking process from scene complexity unfortunately. One of the biggest things APV is in need of right now is a proper incremental bake system. The workaround for now is to split your terrain into many smaller terrain pieces in many different scenes, and then bake each scene one by one in a baking set. This setup does let your iterate while only baking part of the scene, but way better tooling for this is needed.
(Ideally a bake by cell system)
Hello, first a good news: improvements to virtual offset have landed in 23.2.0b11 (available very soon i guess)
Previously the system was using physics raycast on colliders to detect intersections, while it's now relying on raytracing which is both more precise and faster (and it doesn't need raytracing compatible hardware).
I hope it's gonna help with some of the problems you encountered, please share feedback if you have any!
Regarding issues with large terrain. Indeed as Kabinet13 said the decoupling is at runtime, baking currently requires all scene to be loaded.
I am currently working on making a bake by cell system, i'll update here once it's done
Surely the actual baking part of APV has to have some knowledge of the format and is written into editor source code somewhere? Else would this imply you could build a runtime lightmapper?
Thank you for sharing!
APV uses UnityEditor.Experimental.Lightmapping.SetAdditionalBakedProbes, but this API dates from before APV, so technically APV doesn't require any editor source code change
But the new baking system i talked about in the previous message will not use this API anymore, so there may be some possibilities for runtime fun
Great stuff, I look forward to testing it. Been a while since I opened unity, gonna be fun testing again.
Hopefully it makes a noticeable difference in reducing light leaks and detecting things correctly.
Is there a code reference for APV blending to mimic real-time GI?
I still don't understand why Sky Occlusion still not implemented and still under consideration, it should fix this kind of issue isn't
Hey! Will this feature "HDRP Streaming Data from Disk", make it possible to bake very large scenes? My graphics card always runs out of memory and unity would crash, does this directly store baked data onto disk?
We're on 2022.3.5 and I just found that this 2 lines takes 5ms:
If I comment them out, I'm getting 5ms back and everything seems to work fine.
Why those arrays need to be sorted?
Is it fine to disable sorting?
Is there a chance that you'll add option to disable sorting in an upcoming 2022 lts patch release?
When you have to many cells to fit in memory, they are sorted by distance to the camera so that only the closest ones are loaded.
This was optimized in 2023 versions but not backported, i'll see if we can do something if it doesn't require too much changes.
I wonder why sorting code can take THAT much, I mean 5ms in unacceptable.
And we're placing probe volumes only in important places, they are not covering a whole map
Are you always using quick-sort ?
I'm guessing this collections are almost sorted right ? - should you not use different algorithm for this ?
I must admit that 5ms is weird, and we are sorting cells, not probes so that would mean you have a huge ammount of them
But it's not necessary to sort the whole list every frame so i'd rather investigate that than optimizing the sort itself
I tried the new virtual offset, and to be completely honest, didn't notice a big difference in terms of light leaking or accurate virtual offset differences.
But I couldn't properly test it with the APV debugger and virtual offset debugger because the latest alpha is all sorts of broken with invisible UIs.
I'll give it a try again for sure, once the editor UI thing is sorted
Does URP 15 not support APV switching? I tried to call the mixed method, but the editor gave me this error message. If yes, I'd like to know what the correct code case looks like.
public class APVSwitch : MonoBehaviour
const string scenario1 = "Day";
const string scenario2 = "Night";
// Start is called before the first frame update
if (Application.isPlaying && ProbeReferenceVolume.instance.isInitialized)
ProbeReferenceVolume.instance.lightingScenario = scenario1;
Any ETA for scenario blending landing in URP?
Can someone clarify which lightmapping settings apply to APVs? For example, is "Max Bounces" respected? Obviously the Lightmap Resolution and such isn't relevant.
Also, it seems like it could enable a lot of functionality if there was a way to have a "Lighting Scenario Override Volume". For example, you could have a Day and Night scenario. And then within that you could specify for a particular room in a larger open-world game I want a Lights On and Lights Off scenario that simply overrides a particular brick or whatever. That would end up being four possible scenarios but you would only have to bake the delta of a small area. Or maybe the planned precomputed-realtime solution would serve the same purpose? Naively it seems like something like this would be relatively straightforward to implement.
Can't bake APV in URP on integrated Vega 7 graphics (R5 4600G), in a basic scene - driver instantly crashes (tried in 2023.1.13 and 2023.3.0a10)
I could use some help trying to debug something I'm seeing. I have two scenes that use APVs with the same settings, same set of prefabs, same lights, skybox, etc. However, one scene has very "splotchy" lighting and the probe debugger seems to show the probes themselves are unevenly colored. What could cause this?
Scene A (bad result)
Scene B (good result)
If it's the same project different scene names but different results, see if flipping the bake order changes too.
Equally you can also see if creating a new scene (but the same) is different or expected again.
The results may indicate something project or scene specific
it's available starting from 2023.3.0a11 on URP
Maybe those two scenes have different sample count in the scene tab of the lighting window
The relevant settings are obviously the one related to sample count, max bounces is also used, and although the name is not very intuitive "lightmap resolution" is also used for the meta pass (as the tooltip says, it drives the resolution of albedo and emission textures using during baking)