The title is pretty self explanatory. I’ve created a box and linked the environment fog to it. I THOUGHT the idea behind doing it this was is that you can use light linking to exclude lights (in this case VrayLightRect3) from this volume and have them affect the lighting in the scene, but not blow by getting all bloomed out and diffused by the fog. It doesn’t seem to be working though. I’ve attached a screenshot of all my settings. Perhaps someone could take a quick look and see if they immediately see some problem?
Do I need to toggle off the “use environment fog setting”? Do I need to add the fog to the fog box volume material?
It should work in theory with light linking, at least it does on our end, but depending on what exactly you’re trying to achieve, there might be a better approach. Here’s some examples:
1. when adding the fog as an environment volume and adding an object to the fog set, you’re setting up what we call a fog gizmo - which unlike other setups, will allow rendering fog when your camera is *inside* the fog containter.
2. you could instead - not use the fog as environment, but add it as a volume shader to your container’s shading group. Then you can add lights to the fog set and set the light mode in the fog itself to “intersect” so only the lights that are members of the set will contribute to the fog.
Do you have an example scene and/or a reference image of what you’re after? It might help us give you more info on how to approach the setup.
The interior is a little dark though so I decided to put a soft light behind the camera pointed back towards the windows. But when I do this, it completely washes out the scene. Like this:
So basically, I want to say “Use this soft light coming from behind the camera, but do not contribute to the environment fog.”
I couldn’t figure out how to do this using the fog gizmo. Making sure the light behind the camera wasn’t affecting the fogbox through light linking didn’t change a thing. Hmmm.
Yes, it is - your original setup was actually a fog gizmo - when the fog is used as an environment volume and then a mesh object is added to the fog set in the outliner - it’s the setup that allows both the fog to be contained in an object and the camera to be inside the fog. I need to test a bit how light exclusion would work in this specific scenario.
Right, what I meant in my previous post was, rather than adding a mesh object to the fog set, could you add a light to the fog set. I’ve tried it and it doesn’t work, but I was wondering if maybe there is some way to just have the fog showing up in the beam of a single light rather than for all the lights/the entire scene. That would be a useful feature.
I’m planning to test out your second method today and see if I can make it work.
Thanks!
I’m not certain what’s going on, but it looks like the fog is outside the box since I can’t see the road outside the windows or the far building, I think there has to be a lot of fog in between. I’m also not sure if other lights will be visible in this fog or not. The fog is so thick, I can’t see any lights other than the bright beam-casting window light. Hmmm.
You said not to use the fog as environment. When I remove it though, even if I’ve added it to the fog boxes volumetric shader group when I render there is zero fog in the scene.
Yes, you were correct, sorry - your setup will require the fog as a gizmo (i.e. as an environment, but contained in a gizmo) to see fog from the camera (when the camera is inside the gizmo).
I did some quick tests and I think you can use the fog as environment, add an object to the fog set that will be the gizmo, then you can simply break the light link between your light and the gizmo.
I’m attaching my setup - I’ve used another cube that wraps around my entire scene - and that’s the gizmo. lightRect2 is the light behind my camera that I don’t want to affect the fog, but only the objects inside it.
Also, I’m keeping the fog settings for lights to default. fog_01.0001.ma.zip (13.5 KB)
Yeah, your scene definitely worked how you said it would. I swear I’ve done that exact same thing though and it didn’t work like your scene did. I’ll have to go back and check it again to see if I missed anything.
Thanks!