Announcement

Collapse
No announcement yet.

Underwater rendering

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

  • #16
    The orphanage huh? Very cool!

    Thanks everyone who posted here, it's a great lot of information.

    I started setting up the scene last night for a bit after work (late), got the water volume in, a sun/sky and a vray cam. I tried to get some fog color for the water material into my volume but it was acting very odd, even the slightest value in the fog color would send it totally saturated extreme color, or black. No in between, even trying .001 for fog mult. I'll get back to it tonight, but I'm guessing the problem was the lack of a bubble for the camera, and when the cam is in the volume without the bubble it seems to act differently than I'd expect. I tried turning off the scale option as well, but no go.

    Don't have to work late tonight so going to make some progress, thanks again for all your help.

    Comment


    • #17
      Hi Deflaminis, try the water as a surface rather than a volume. When the camera is within a bubble, the void between the water and the bubble will become your volume (hope that makes sense)

      This will ensure that your fog and ior work correctly, this is what I gathered from Vlado's sample scene (definitely worth downloading)

      Ant

      Comment


      • #18
        Hi Richb, thanks for the post. I downloaded the checked out that scene file you mentioned, it's amazing in its simplicity, yet I find I don't fully understand why it works. It's pretty amazing if the distance between the bubble and the plane for the surface of the water can be viewed by vray as if it was a volume. Again, I never would have expected that.

        Bear with me here as I try to reason my way through this. Since the bubble *and* the surface have the same material on them, and since they are both single sided geometry, Vray thinks that the fog color is based on the space in between them? (Amazing.) The conclusion I'm drawing (and maybe improperly) is that Vray doesn't care if a volume (or in this case surfaces) are "water tight" or closed. It just sees that there is distance between the two surfaces and since they have the same fog settings will go ahead and draw/render the fog even though they are separate objects. Is that close? (I'm having a hard time articulating what I mean here.) Regardless, I never would have guessed that or tried anything like it. (I realize that's basically what you posted, I'm just trying to figure out why it works.)

        Oddly, if I duplicate the material and put the copy on the plane but not the bubble, it stops working. (Or maybe that isn't odd, but I don't understand why.) The dupe can have the exact same settings but it won't fly.

        Even stranger (to me) is that if I use a plane instead of a bubble, the effect breaks. instead of going black around the edges, it goes white. So there is something about actual curvature of the 'bubble' that makes this work. Is it possible this relates in part to the normal curvature of a lens? Also odd, is if I flip the bubble-replacer-plane so that the normals point toward the camera, I still get fog but the black around the edges is now just normal fog, though I still get a nice window in the center.

        And even more curious is the effect of a plane with a bend modifier has on the surface of the water, it can start to look even a bit cloudlike.

        I'm so glad I started this thread, I feel like my vray knowledge (outside of commercials and viz) is increasing quite a bit. Thank you everyone for your time posting here and helping me figure this stuff out. I really appreciate it.

        Best Regards,
        AJ
        Last edited by Deflaminis; 01-08-2012, 02:01 PM.

        Comment


        • #19
          Here's a screen of the plane with bends on it instead of a sphere. Notice the swirly striations on the surface, almost like a post effect. Working as intended I'm sure, just cool and curious.

          Click image for larger version

Name:	Plane_Bend_Modifiers.jpg
Views:	1
Size:	228.8 KB
ID:	845884

          Comment


          • #20
            There are some things I am having trouble wrapping my head around too so you're not alone, I'm just happy that it works but I'm just like you in wanting to find out 'why?'

            Vlado said earlier in the thread that the bubble and the surface work together to return the correct refractive amount, as per the IOR (1.333) (though he used different words)

            Not sure why swapping the bubble for another plane would break the setup, only thing I can think of is make sure the normals of the plane face the camera, the normals for the water's surface should remain facing away from the camera

            I have somewhat of a better logical explanation in my head as to why this setup works but I'm having trouble knowing where to begin explaining it

            Check the normals and try it again, I'll fire up the pc and try it too cos I would like to know if my understanding of this scene is correct

            Ant

            *Just re-read your post and I must have missed the bit where you had tried flipping the normals, I'm still gonna mess with the scene to test what makes it/breaks it
            Last edited by Richb; 01-08-2012, 02:33 PM. Reason: Didn't read the whole post

            Comment


            • #21
              Just following up here. I dusted off my old college physics book and it makes a lot of sense to me now why the rounded shape creates Snell's window as such. With the sun, the incident ray angle is of course the same (thus the directionality) but the angle of refraction and incidence is constantly changing as the surface normals are curving which leads to this cool effect. As a result the direction of the refracted ray is changing as well, which is why it leads to such darkness around the edges. At least, that is how I understand it currently.

              I don't know why I had such a hard time grasping that yesterday, but it all makes sense to me now. It really must be based off of the fact that a real world lense has curvature to it, and this is probably the most poignant case of the main difference between a cg camera and a real one that I've encountered in a while.

              Thanks all for bearing with me. I'm super happy to have learned that two unrelated shapes with the same material can cause fog inbetween them. Already thinking of neat ways to use this.
              Last edited by Deflaminis; 02-08-2012, 09:22 AM.

              Comment


              • #22
                Hi deflaminis, here's a curveball

                If I delete the bubble surrounding my camera, I still get the Snell's window effect.
                This leads me to believe that the bubble isn't responsible for the effect, it's only used to ensure the correct fog colour and strength for the material applied to it (and also the waters surface). This also seems to be in-line with Vlado's suggestion earlier on in this thread

                I could be wrong although I literally have nothing but a HDR, vrayplane and camera in my scene and I am seeing the same result as I would with the bubble in there

                There is also a disadvantage to using the bubble which I have noticed in that only your refraction element will contain any information, basically nullifying the composite

                This might be fixed by using the affect all channels in the refraction of the water and bubble material though again I could be wrong

                Comment


                • #23
                  Originally posted by Richb View Post
                  If I delete the bubble surrounding my camera, I still get the Snell's window effect. This leads me to believe that the bubble isn't responsible for the effect, it's only used to ensure the correct fog colour and strength for the material applied to it (and also the waters surface).
                  This is correct; it is not the bubble that creates the Snell's window; the bubble just helps V-Ray figure out the correct shader parameters (ior and fog).

                  Best regards,
                  Vlado
                  I only act like I know everything, Rogers.

                  Comment


                  • #24
                    Thanks for the confirmation Vlado

                    Ant

                    Comment


                    • #25
                      Well, darn. :/

                      I wonder what causes the window then. I get how it works now, but I just don't get *why*. Not important for rendering I guess, but curious.

                      When I delete the bubble in Vlado's scene (and remove fog), the effect breaks and seems to invert and head to white. Is that working as intended? Is it the fog that creates the window in the first place?

                      I realize this is all academic as long as the effect works, but I like to know for sure what is happening.

                      Click image for larger version

Name:	What.jpg
Views:	1
Size:	177.9 KB
ID:	845891

                      So you guys are obviously right, the window is still there but I didn't expect it to get brighter. The definition on Wiki says "The area outside Snell's window will either be completely dark or show a reflection of underwater objects." So I sort of expected the darkness to be a function of a changing surface normal and IOR as opposed to natural fog in water.

                      So maybe that lack of any fog on the material (from removing the bubble) causes it to go white and be "wrong"? I apologize for all the questions here fellas, just trying to sort this all out mentally. (Ha!)

                      Thanks,
                      AJ

                      EDIT: Maybe it's white because it *is* reflecting the sky... just underwater as there is no ground plane. I think I have it all sorted out now. I apologize to all the people who have been following this and are face-palming at how long it took me to figure it out.
                      Last edited by Deflaminis; 02-08-2012, 01:02 PM.

                      Comment


                      • #26
                        no facepalm mate! this has been a very interesting read, learning things not strictly work related is really refreshing. if people weren't curious where would we be?

                        Comment


                        • #27
                          I second that entirely kimgar, questions lead to answers which lead to progress

                          I've learned some interesting things from this thread myself so kudos to Deflaminis for starting it!

                          Comment


                          • #28
                            Originally posted by Deflaminis View Post
                            EDIT: Maybe it's white because it *is* reflecting the sky... just underwater as there is no ground plane.
                            This is correct, yes.

                            Best regards,
                            Vlado
                            I only act like I know everything, Rogers.

                            Comment


                            • #29
                              Thank you all for being so supportive. I means a lot to me, and thank you Vlado for your time. Hope you all have a great weekend!

                              AJ

                              Comment


                              • #30
                                been reading this thread with interest as im working on an underwater scene and having trouble getting it to actually look like its underwater rather than a 'blue day'
                                its for print and animation and im trying to do as much in render as I can get away with for sake of ease

                                the set up is a vray fog, single plane water, sky and a few spots for the volume and caustics

                                here is a link to my test animation in shallower water...

                                vray caustics / environ fog

                                https://dl.dropbox.com/u/9641128/NS14_water_test.mp4

                                however im having all kinds of problems once i try to get something pleasing on a deeper more complex scene - the caustics don't reach as well with deeper water and the fog is difficult to set up with such deep water (goes very dark. i guess ill do the caustics separately but id like to do the fog in render

                                does anyone have any more tips for deep water rendering? i find it hard to balance the fog the exposure and the lights (dome (ambient) spot (caustics) spot (noise projectors for rays)
                                not having much luck with underwater particles either!

                                Click image for larger version

Name:	NS14_underwater_.jpg
Views:	1
Size:	269.2 KB
ID:	846878

                                Comment

                                Working...
                                X