guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

how do you bake multiple volumes within the same scene? #86

Closed laurentopia closed 3 years ago

laurentopia commented 3 years ago

in the following scenario: 1 scene is a cinematic cameras controlled by timeline environment activation controlled by timeline animation controller by timeline for example starts in space, baked star sky and shuttle thrusts within 1 volume then switch to flying over planet where now the volume should bake the planet light bounce and the sky dome but not the thruster how is baking of all volumes done? how is pushing volume globally when the time comes done?

guycalledfrank commented 3 years ago

Did you check example_volumes_advanced? There are movable volumes and volumes you can swap by a key press.

laurentopia commented 3 years ago

I did but that's not how i work, i'd prefer to bake individual volumes then plug them in the reason is this: the planet is lit by the harsh sun which works well for her but washes out all small bodies image image

and the scene is 5000 units across, how do i separate? place a wall that blocks harsh sun light? image

laurentopia commented 3 years ago

(the planet is volume lit because i don't know how to make 2 lightmaps coexist) if light volume work with light bitmask then i could have 2 light rigs bake to 2 volumes exclusively, then I'd use volume triggers

guycalledfrank commented 3 years ago

You should be able to a) Bake them apart and move at runtime b) Bake in separate scenes and load/unload scenes at runtime

Bitmasks were planned for volumes but turned out tricky to implement, since all volumes in the scene currently bake in one pass, and both C# side and the denoiser take advantage of it...

laurentopia commented 3 years ago

understood, I'll work with how your system intended. a) How do I bake volumes apart? apart as in distance or as in separate scene? move as in motion or transfer to main scene? b) that's what i'm trying to do and it's not working at all, what are the constraints when doing additive loading? it seems that your bakery volume components sets global texture on enable so it should be simple i'm having loads of problems with baking volumes of different object types. for example one volume is baked for the planet which is very large and the other is for small objects like the shuttle. when i use directional light all volumes get polluted, should i try that with point lights instead to avoid cross contamination?

guycalledfrank commented 3 years ago

a) Similar to this example:

image

so yeah, just distance.

b) Maybe you have multiple global volumes and they conflict. Try disabling the old one and calling SetGlobalParams() on the new one. If the loading is async, make sure to call it after it's completely loaded.

"Polluted": what do you mean, how does it look?

laurentopia commented 3 years ago

a) only works with point or surface light, if I need to emulate direction light of something moving at high velocity is there a way? polluted = contaminated, my way of saying that using directional light in a multi volume scenario doesn't work since the directional lights of one volume contaminate the lighting of all volumes. maybe this will help explain what i'm trying to achieve. image each shot with a different lighting direction with real time lights i'd just turn on and off directional lights RT lights is too consuming on switch so i'm using volume

guycalledfrank commented 3 years ago

Ah, different directional lights? OK, yeah, it's trickier. OK, there is actually a simpler way to solve it, I think:

This way you'll cache different lighting in different volumes. You can then toggle them at runtime.

laurentopia commented 3 years ago

oh nice, that's way easier than what i ended up doing, which is a scenes per lighting model and loading scene on the fly