Announcement

Collapse
No announcement yet.

Excluding a light from an environment fog box doesn't seem to be working...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Excluding a light from an environment fog box doesn't seem to be working...

    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?

    Please advise.

    Thanks! Click image for larger version  Name:	Fogsettings.jpg Views:	2 Size:	711.4 KB ID:	963155
    Attached Files
    Last edited by evanerichards; 06-08-2017, 03:06 PM.

  • #2
    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.
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Hmmm. Ok. I see the difference. I'll have to play around with using the volumetric fog in the shading group.

      Here's what I'm trying to do.
      Have a scene I'm lighting. Looks like this: Click image for larger version  Name:	Screen Shot 2017-08-11 at 3.12.03 PM.png Views:	2 Size:	814.7 KB ID:	963819

      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: Click image for larger version  Name:	Screen Shot 2017-08-11 at 3.12.15 PM.png Views:	2 Size:	1.60 MB ID:	963818


      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.
      Attached Files

      Comment


      • #4
        I guess an alternative would be to make a light into a fog gizmo (rather than a geometry). Is that possible?

        Comment


        • #5
          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.
          Alex Yolov
          Product Manager
          V-Ray for Maya, Chaos Player
          www.chaos.com

          Comment


          • #6
            Originally posted by yolov View Post
            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!

            Comment


            • #7
              Originally posted by yolov View Post
              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.
              OK. So I tried your second idea here. Didn't work for me. Here are my settings:
              Click image for larger version

Name:	Fogsettings2.jpg
Views:	509
Size:	222.8 KB
ID:	963944



              And here's what it did:
              Click image for larger version

Name:	Fog2.png
Views:	487
Size:	1.82 MB
ID:	963945



              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.
              Attached Files
              Last edited by evanerichards; 14-08-2017, 05:28 AM.

              Comment


              • #8
                Can you try re-attaching the images? There seem to be no attachments to your last post.
                Alex Yolov
                Product Manager
                V-Ray for Maya, Chaos Player
                www.chaos.com

                Comment


                • #9
                  Originally posted by yolov View Post
                  Can you try re-attaching the images? There seem to be no attachments to your last post.
                  Weird I can see them.
                  I re-uploaded them.
                  I think it's been fixed now.

                  Comment


                  • #10
                    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.
                    Attached Files
                    Alex Yolov
                    Product Manager
                    V-Ray for Maya, Chaos Player
                    www.chaos.com

                    Comment


                    • #11
                      Originally posted by yolov View Post
                      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.
                      I'll check it out.
                      Thanks so much for your help with troubleshooting!
                      I'll let you know what I find.

                      Comment


                      • #12
                        Originally posted by yolov View Post
                        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.
                        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!

                        Comment


                        • #13
                          Oh, OK. Well, do let me know if there's anything else I can help you with.

                          Alex
                          Alex Yolov
                          Product Manager
                          V-Ray for Maya, Chaos Player
                          www.chaos.com

                          Comment

                          Working...
                          X