IOR < 1?

I want to do an underwater scene… If I want a bubble, I think I should set the IOR to 1/1.33 =0.75 , am I right? (with 1.33 as IOR of water in air) However I can’t set it. :frowning: I can numerically input the value, but it jumps back to 1 every time I set it below 1.

Why can’t I enable that? Don’t they use the same code? ( I mean, for IOR >1 and IOR <1)

what is IOR

IOR == Index Of Refraction, it describes how much light bends when it passes from one medium (like air) to another (like water)…
In theory, I don’t think it’s possible to have IOR <1. But it’s been a few years so, maybe the theories have changed? either way, I can’t remember what it would mean if you COULD do it.

The problem is that in blender, it’s as if you have a default IOR of 1. It’s as if the entire scene is full of air. To fix this you’d have to change the default IOR to 1.33, and then set the bubble’s material to have an IOR of 1. But this would probably require some source hacking. …Or… make a HUGE cube with IOR of 1.33, build the entire scene in said cube, then make bubbles have IOR of 1.0. And use mist to hide/obscure the distant edeges of the cube. This would probably take forever to render though.
I prefer solution 1, but I haven’t read the blender source, so I’m not sure how to implement that hack… any coders out there wanna try to add a “global IOR”?..

hey - if the thing is entirely underwater - set your IOR for the bubbles to 1.33 and don’t even worry your head about the volume of the water.

IOR can be thought of as a ratio between how much light bends when passing from one material to another, with 1.0 being the reference (air). Think about it - a light ray passes from air into air, that’s 1/1 = 1 no change. A light ray going from air into water has it’s angle changed proportionately 1/1.33. Going from water to air it’s 1.33/1

So, when underwater think of the ratio of air to water in reverse and use the water IOR for the air bubbles. Ie, your air bubble is effectively a “negative” water bubble. The light ray bends the same amount.

Also, set the IOR of the mesh of your water’s surface to 1.33 as well.

Clear?

nik
:wink:

If the camera’s underwater it wouldn’t matter what the IOR is. Plus the light only bends I think when it hits the actual mesh part of the mesh, not the voleaum (spelling) like what you may be talking about.

homeboy: The IOR value in Blender is limited to values higher than 1.0 I’m not sure if the rendering engine could work with lower than 1.0, but I can assume it could. I could do some tests whenever I have time (merely removing the limit on the button and rendering).

[quote=“Kansas_15”]If the camera’s underwater it wouldn’t matter what the IOR is.

Yes, as a matter of fact, it would.

[quote=“Kansas_15”]Plus the light only bends I think when it hits the actual mesh part of the mesh, not the voleaum (spelling) like what you may be talking about.

Again, you are wrong.

Please refrain from answering a question if you can only give assumptions at best.

Martin

nharron: I don’t have a water surface… the whole scene is supposed to be underwater, and the surface is far above.
as you have said, 1/1.33 != 1.33/1. How can I think it in reverse? the effect is different from water looking into air. You can get total internal reflection.

theeth: As I type the words, “total internal reflection”… I think that might be the reason why IOR<1 requires a different code?

ior values: http://www.3dluvr.com/gabesilver/ior.htm

Physically refraction is caused by changes in the speed of light as light enters a different medium. By definition the IOR of a substance is always determined with respect to the vacuum which has an IOR of 1. Air itself has very little density so its IOR is almost 1 in fact it’s 1.003. So IOR cannot be less than 1 because there is nothing less dense than a vacuum.

IOR also depends on the wavelength of the light which gives rise to aberations in any refractive medium through which it passes.

If you deal with relative values as is the case here, yes.
In this case, the neutral medium would be water instead of vacuum. Since water is usually 1.33, you’d have to recalibrate all the other IOR by dividing by this value (IIRC). This would make the IOR of air 1.03/1.33 < 1.0

Martin

OK I see what you are on about, it would be useful to be able to either set a global value for IOR or to adjust IOR < 1 for rendering for instance realistic water scenes.

I agree with nharron on this one. I don’t think an IOR value < 1 is necessary. An air bubble under water will look the same as a water bubble in air when viewed from under water.

Check this out:

http://www.deepseaworld.com/Wallpapers/BUBBLE%20RING%20800.jpg

It shows a ring shaped bubble. It looks just like water does in zero g:

http://www.jky.net/science/zero_g_water.jpg

Also, bubbles are generally very small under water (unless you’ve been at the beans) so they’re not noticeable in a realistic scene:

http://www.visualdolphin.com/mermaids4.jpg

Finally, total internal reflection happens in bubbles but no more than it happens with glass in air, which is why you see a faint reflection in most glass objects. It’s also dependent on viewing angle which is hard to achieve from a moving irregularly shaped bubble but not so hard from say the underside of a pool surface.

Air bubbles in water and water bubbles in air may look similar because we are not use to seeing them in our every day experience, but the refraction for the two cases is different, as expected from Snell’s Law. Water in air is more refractive than air in water.

Here is a test blend in a black box using yafray. The first is a water sphere in air, the second an air sphere in water. Behind the sphere is a red rod. The camera, lighting and setup were identical for the two cases.

http://gallery.mudpuddle.co.nz/albums/somen/testbub.jpg

How did you do the second? Does yafray support IOR<1?

I imagine you must have an air bubble inside water which itself is viewed with the camera in the air. I don’t think that’s the same as a camera underwater.

Anyway, even if the refraction is different, is anyone really going to notice?