APV Baking States#6415
Conversation
…ialization slowdown (affects domain reloads). Store shader data pre-swizzled (priming a future loading PR).
…ebug display checked. Hide PV debug options when they are not available (and the entire panel when none are)
|
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP SRP Core Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
|
There are a bunch of things we need to discuss about this actually before I go on with the review, give me a ping when you around for a call |
|
Also adding @alelievr as there are touches to the baking window. |
# Conflicts: # com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.Debug.cs # com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeReferenceVolume.cs
TomasKiniulis
left a comment
There was a problem hiding this comment.
Continuing on Motiejus testing. I seem to be running into lighting issues when switching between two states after I use same states in multiple Baking Sets. Probe volumes themselves remain unchanged but the lighting is way off. Maybe a potential bug to lighting team or not pr related, but the states feature reveal this.
Running into some UX issues where I seem to be not getting "Out Of Date" state usually when having multiple sets. Also loading scenes from another set does not load probes from state, but the state is highlighted.
I also find it confusing switching states, but having to manually switch through volume lighting setups or different lighting scenes, would be good to have some sort of functionality directly in the ui to disable/enable specific volumes load/unload scenes, I guess that's something planned for the future?
Listed my findings in test doc: https://confluence.unity3d.com/display/HDRP/APV+Baking+State could you have a look? And let me know if more info is needed.
Fix state status, fix state loading when changing scene or domain reload
Save prompt for "Load scenes in set"
hide baking states when baking set is empty
TomasKiniulis
left a comment
There was a problem hiding this comment.
Looks good! Issues listed in test doc are addressed for this PR. Status seems to be properly shown after bake and clearing or not saving the scene. Baking States table is hidden when no Scene is assigned.
|
@FrancescoC-unity right now since the state name is appended to the baked data file name on disk, existing project will need to rebake. I didn't do a conversion step but i could do it if you think it's important |
I think it's fine; we are still in experimental so it's fine breaking. Only thing is remember to ping the slack channel when this lands. |
TomasKiniulis
left a comment
There was a problem hiding this comment.
Gave another look after the changes. Looks good! Haven't ran into any PR specific issues
iM0ve
left a comment
There was a problem hiding this comment.
Tomas tested the PR. Couldnt remove myself, approving.

Purpose of this PR
This PR adds baking states for APV. It allows to bake lighting in different scene configurations that can then be used at runtime when needed.
First here's as gif showing how it works. Note that there's a script changing the lights when the state is changed

New UI: Total number of states is fixed to 16, and the names are shared between sets, but the content can be baked separately, and some sets can choose to use only some of the states

Added new api in
ProbeReferenceVolumebakingStateto set/get the current active stateonBakingStateChanged, a delegate so that scripts can register to state changeI also changed a bit the logic when selecting "Generate Lighting > Bake the set", which now doesn't require saving and reloading the scenes if the scenes in the set are already currently loaded.
Also "clear baked data" now delete the asset on disk
Notes:
Testing status
Tested baking multiple states, also tested in a setup with multiple sets