View Full Version : Are "Air" Polygons really Necessary?
MacGregg
05-27-2006, 08:28 AM
Is it really necessary to create "Air" polygons around Glass surfaces to get the Refraction correct? Doesn't LW just default to "Air" refractive index?
And if LW does NOT default to "Air" can't I just adjust the Glass refraction index slightly to compensate and get the EXACT same result? BUT, without the bother of creating this extra geometry?
Thanks,
Gregg
Lightwolf
05-27-2006, 09:06 AM
Is it really necessary to create "Air" polygons around Glass surfaces to get the Refraction correct? Doesn't LW just default to "Air" refractive index?
The problem is... LW doesn't know it is exiting the glass (unless you have air polygons). And if you render double sided it will assume the "air" has the same refraction index as the surface.
And if LW does NOT default to "Air" can't I just adjust the Glass refraction index slightly to compensate and get the EXACT same result? BUT, without the bother of creating this extra geometry?
No, because the ray is bent twice... once when entering and once when exiting the surface. And there is basically no way to replace that by one index that "double" bends so to speak. (Especially since the amount of bending depends on the distance travelled through the glass).
Cheers,
Mike
MacGregg
05-27-2006, 09:51 AM
Thanks Mike, I will need to think about this a bit more... I am a noob, so I was thinking I would just model a "Jar" with an inside and outside (and model the thickness). Now you have light going from "Air" thru a poly set to "Glass" the next poly would be from "Glass" back to "Air"... I haven't tried using "Air" poly's yet... so this is all just thinking. Seems just like Physics the light only bends at the surfaces. The difference in IOR would set the bend... LW would just keep track of the current accumulated IOR as it goes thru each poly with an IOR. Well, I must be wrong since I see everyone is using "Air" poly's all over. :) It would be a problem if you used double sided poly's.
Are you saying that LW does NOT keep track of the accumulated IOR for a light ray as it passes thru poly's? Hmmm! I guess that is it...
Thanks,
Gregg
Captain Obvious
05-27-2006, 10:05 AM
Are you saying that LW does NOT keep track of the accumulated IOR for a light ray as it passes thru poly's? Hmmm! I guess that is it...
Oh, it does. But it does NOT take into polygons with the normal facing away from the ray being fired.
Lightwolf
05-27-2006, 10:07 AM
Are you saying that LW does NOT keep track of the accumulated IOR for a light ray as it passes thru poly's? Hmmm! I guess that is it...
It keeps track of the IOR... but you need to explicitly tell it when to change it. Thus the need for air polygons... otherwise LW doesn't know it is leaving a medium (glass) - and what the properties of the new one are (air).
It is a lot like physics actually. :D
Cheers,
Mike
MacGregg
05-27-2006, 04:03 PM
Ok, I see... single sided poly's only refract light in one direction thru the poly. So, I need to use a double sided poly setting the outside facing normal to Air and the inside Normal to Glass.
Can you actually do this with double sided poly's, it doesn't seem like I can select just the outside/inside Normal poly's reliably to set the IOR for each differently. When you click on a double sided poly you don't know which one you will get.
Thanks,
Gregg
Celshader
05-27-2006, 05:15 PM
Can you actually do this with double sided poly's...
I don't think you can do it in [8], but I think there's a way to do it in 9.0. Check out the listing at the end of "Spot Info (1)" in the attached image.
THREEL
05-27-2006, 09:12 PM
This looks interesting, so I thought I'd ask a couple of questions myself. First, what kind of surfacing do you use for to make an "air" surface? Second, are the "air" polys on the inside, facing in, or the outside, facing out, or are the "air" polys sanwiched between two surfaces that represent the inside and outside of the glass? Third, what are good "median" refraction settings for these three surfaces to get the proper look. Finally, since a glass looks better with liquid in it, let's say water for this purpose, do you just model the top of the water, the entire volume the water fills the glass, or is it better to use hypervoxels? Oh, and what are good refraction settings for water?
Thanks! THREEL:)
P.S. Are there any good tutorials on this subject?
Robin Wood gives a very good explanation and tutorial of this:
http://www.robinwood.com./Catalog/Technical/LightwaveTuts/LWTutSet.html
MooseDog
05-28-2006, 08:59 AM
thx for the link parm:thumbsup: very useful.
i'm gonna keep an eye on this thread as i'm trying to get my head around the notion of how backfacing poly identification eliminates the need for air polys. and how to implement it too:D
Darkharmony
06-03-2006, 04:09 PM
I've been working on something that I'm using these air polys for a little while now and I keep having a problem with coplanar polys when I render. I'll post a render below. What I am wondering if theirs any way around this. I figured I would post in this thread since it's along the same line.
I was inspired this image and wanted to create a similar effect but having no luck.
http://ic1.deviantart.com/fs10/i/2006/136/0/e/glassDRAGON_by_Waymaster.jpg
Celshader
06-03-2006, 06:00 PM
I've been working on something that I'm using these air polys for a little while now and I keep having a problem with coplanar polys when I render. I'll post a render below. What I am wondering if theirs any way around this. I figured I would post in this thread since it's along the same line.
I was inspired this image and wanted to create a similar effect but having no luck.
http://ic1.deviantart.com/fs10/i/2006/136/0/e/glassDRAGON_by_Waymaster.jpg
That's a gorgeous dragon!
I'm wondering if your bird's glass surface is double-sided. If so, it would conflict with the air polys. The glass polys should be single-sided and facing outwards, and the air polys shoud be single-sided and facing inwards.
If you could post your object, or even a small part of your object that demonstrates the problem, someone here might be able to debug it for you. :)
Darkharmony
06-03-2006, 06:13 PM
Sure I have no problem posting the object. I don't have either surface double sided and the inside I have flipped.
Karmacop
06-04-2006, 02:29 AM
This looks interesting, so I thought I'd ask a couple of questions myself. First, what kind of surfacing do you use for to make an "air" surface?
I usually make them 100% transparent and completely black (no spec, no gloss, no luminosity, no colour etc). They are just there to tell the ray that they've hit something, not to change the colour of the ray etc. Although I'm not sure if the actual back side of a surface does have any shading attributes.
Second, are the "air" polys on the inside, facing in, or the outside, facing out, or are the "air" polys sanwiched between two surfaces that represent the inside and outside of the glass?
The air polygons are at the exact same location as the surface polygons, only they are pointing in the opposite direction. This means that they do get sandwiched between the surface that represent the inside and outside of the glass.
eg, if you have a window on a house then you'll have a polygon for the bit of the window pointing away from the house, and a polygon for the bit of the window pointing inside the house. Each of these polygons need an air surface pointing in the opposite direction to themselves.
Third, what are good "median" refraction settings for these three surfaces to get the proper look. Which three surfaces? Air polygons should always have the refraction index of the surface it's going into. So with air make it 1.0. The other surface can be whatever you want it to be, eg glass could be 1.5.
Finally, since a glass looks better with liquid in it, let's say water for this purpose, do you just model the top of the water, the entire volume the water fills the glass, or is it better to use hypervoxels?
You need to model the entire water volume. Also, make the water volume overlap with the glass polygons so that it doesn't look fake.
Oh, and what are good refraction settings for water?
1.33333
DuneBoy
06-04-2006, 03:00 AM
Nitisara wrote a shader plugin called GlassWorks that can do glass without the need for air polys, here's the thread:
http://www.newtek.com/forums/showthread.php?t=50596
Thomas M.
06-04-2006, 04:44 AM
Judging from the results I've seen so far, don't even think about using this shader to create glass. Do it the "hard" way, which is pretty easy and straight forward.
Cheers
Thomas
DuneBoy
06-04-2006, 06:55 AM
In side by side comparisons (Airpolys, Nodal, GlassWorks) I only noticed subtle differences in the refraction (and small render time differences). The plugin seems stable so it can't hurt to try it, but get the latest version off the fourth page (version 1.2.1).
I attached an animated gif with the different renders, the Airpoly and Nodal render look the exact same and the difference in the GlassWorks render is in the edges where it's effected by GlassWorks' Fresnel filter (the other renders just used plain values instead of gradents). I only tested refraction, so I can't vouch for refection or shadow casting.
Darkharmony
06-05-2006, 01:38 AM
So no ideas on the model I posted? I tried using glassworks but it still seemed flat.
Is their any way to add thickness to a complicated object? I think I tried to smooth scale it slightly smaller but that just didn't work. I'm not sure where to go with it. I know what I want and not sure how to accomplish it.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.