Ambient occlusion of a sole object in a scene
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
So, the german wikipedia states about ambient occlusion:
The ambient occlusion method is based on the assumption that an object, a set of objects or an entire scene is surrounded by a unit sphere of light.
Now, let's suppose we've got a scene in which the only object is a pipe, closed at one end, at the center of the scene. If I got this right, then to get the ambient occlusion this object would now be evenly light from every direction.
But wouldn't lighting the object evenly from everywhere mean that for every point in the pipe there would also be a ray of light that would directly reach it, leading to no ambient occlusion at all (no shadows inside the pipe)?
What did I get wrong here?
ambient-occlusion
add a comment |Â
up vote
4
down vote
favorite
So, the german wikipedia states about ambient occlusion:
The ambient occlusion method is based on the assumption that an object, a set of objects or an entire scene is surrounded by a unit sphere of light.
Now, let's suppose we've got a scene in which the only object is a pipe, closed at one end, at the center of the scene. If I got this right, then to get the ambient occlusion this object would now be evenly light from every direction.
But wouldn't lighting the object evenly from everywhere mean that for every point in the pipe there would also be a ray of light that would directly reach it, leading to no ambient occlusion at all (no shadows inside the pipe)?
What did I get wrong here?
ambient-occlusion
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
So, the german wikipedia states about ambient occlusion:
The ambient occlusion method is based on the assumption that an object, a set of objects or an entire scene is surrounded by a unit sphere of light.
Now, let's suppose we've got a scene in which the only object is a pipe, closed at one end, at the center of the scene. If I got this right, then to get the ambient occlusion this object would now be evenly light from every direction.
But wouldn't lighting the object evenly from everywhere mean that for every point in the pipe there would also be a ray of light that would directly reach it, leading to no ambient occlusion at all (no shadows inside the pipe)?
What did I get wrong here?
ambient-occlusion
So, the german wikipedia states about ambient occlusion:
The ambient occlusion method is based on the assumption that an object, a set of objects or an entire scene is surrounded by a unit sphere of light.
Now, let's suppose we've got a scene in which the only object is a pipe, closed at one end, at the center of the scene. If I got this right, then to get the ambient occlusion this object would now be evenly light from every direction.
But wouldn't lighting the object evenly from everywhere mean that for every point in the pipe there would also be a ray of light that would directly reach it, leading to no ambient occlusion at all (no shadows inside the pipe)?
What did I get wrong here?
ambient-occlusion
ambient-occlusion
asked Aug 29 at 7:02
yot
233
233
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
When you compute ambient occlusion (AO) for a point on an object's surface, you sample multiple directions and measure what fraction of them escape. That is, you're trying to approximate what fraction of the unit hemisphere is visible to that point on the surface. (Note that it's a unit hemisphere because half of the unit sphere is on the wrong side of the surface to start with.)
So in your pipe example, the outside of the pipe is not at all occluded. From every point on the outside, any ray fired in that hemisphere will escape without intersecting the object. All of the outside would be lit with 100% of the ambient light.
The inside is another matter. The inside of the end cap can only see a small circle of that hemisphere, through the other end of the pipe. The exact fraction depends on the radius and length of the pipe, but call it 10% for the example. 90% of rays fired from a point on the end cap will hit the inside of the cap, and the other 10% will escape along the length of the pipe and out of the other end. These points are 90% occluded, so they'll be lit with 10% of the ambient light.
Consider a point at the open end of the pipe, but on the inside. This point is 50% occluded. Half of the rays fired from it go into the pipe and intersect with it at some point. The other half go straight out and escape to the unit hemisphere. This point will be lit with 50% of the ambient light, and it's easy to see that the 50% will smoothly decrease to the 10% (or however much is the minimum) as you travel down the inside of the pipe towards the end cap, as less of that hole is visible.
The important point I think you misunderstood is that you measure or estimate what fraction of the unit hemisphere is visible from the point you're shading, not whether it's visible at all. Casting many rays and counting what fraction escape is one way of estimating this.
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
add a comment |Â
up vote
3
down vote
Ambient occlusion is basically shooting out a large number of rays diffusely from a surface point. In a pipe some of the rays will intersect with the pipe itself, which means that this surface point will not receive as much ambience as points that don't have intersecting rays. The inside of the pipe vs the outside of the pipe will be different.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
When you compute ambient occlusion (AO) for a point on an object's surface, you sample multiple directions and measure what fraction of them escape. That is, you're trying to approximate what fraction of the unit hemisphere is visible to that point on the surface. (Note that it's a unit hemisphere because half of the unit sphere is on the wrong side of the surface to start with.)
So in your pipe example, the outside of the pipe is not at all occluded. From every point on the outside, any ray fired in that hemisphere will escape without intersecting the object. All of the outside would be lit with 100% of the ambient light.
The inside is another matter. The inside of the end cap can only see a small circle of that hemisphere, through the other end of the pipe. The exact fraction depends on the radius and length of the pipe, but call it 10% for the example. 90% of rays fired from a point on the end cap will hit the inside of the cap, and the other 10% will escape along the length of the pipe and out of the other end. These points are 90% occluded, so they'll be lit with 10% of the ambient light.
Consider a point at the open end of the pipe, but on the inside. This point is 50% occluded. Half of the rays fired from it go into the pipe and intersect with it at some point. The other half go straight out and escape to the unit hemisphere. This point will be lit with 50% of the ambient light, and it's easy to see that the 50% will smoothly decrease to the 10% (or however much is the minimum) as you travel down the inside of the pipe towards the end cap, as less of that hole is visible.
The important point I think you misunderstood is that you measure or estimate what fraction of the unit hemisphere is visible from the point you're shading, not whether it's visible at all. Casting many rays and counting what fraction escape is one way of estimating this.
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
add a comment |Â
up vote
4
down vote
accepted
When you compute ambient occlusion (AO) for a point on an object's surface, you sample multiple directions and measure what fraction of them escape. That is, you're trying to approximate what fraction of the unit hemisphere is visible to that point on the surface. (Note that it's a unit hemisphere because half of the unit sphere is on the wrong side of the surface to start with.)
So in your pipe example, the outside of the pipe is not at all occluded. From every point on the outside, any ray fired in that hemisphere will escape without intersecting the object. All of the outside would be lit with 100% of the ambient light.
The inside is another matter. The inside of the end cap can only see a small circle of that hemisphere, through the other end of the pipe. The exact fraction depends on the radius and length of the pipe, but call it 10% for the example. 90% of rays fired from a point on the end cap will hit the inside of the cap, and the other 10% will escape along the length of the pipe and out of the other end. These points are 90% occluded, so they'll be lit with 10% of the ambient light.
Consider a point at the open end of the pipe, but on the inside. This point is 50% occluded. Half of the rays fired from it go into the pipe and intersect with it at some point. The other half go straight out and escape to the unit hemisphere. This point will be lit with 50% of the ambient light, and it's easy to see that the 50% will smoothly decrease to the 10% (or however much is the minimum) as you travel down the inside of the pipe towards the end cap, as less of that hole is visible.
The important point I think you misunderstood is that you measure or estimate what fraction of the unit hemisphere is visible from the point you're shading, not whether it's visible at all. Casting many rays and counting what fraction escape is one way of estimating this.
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
When you compute ambient occlusion (AO) for a point on an object's surface, you sample multiple directions and measure what fraction of them escape. That is, you're trying to approximate what fraction of the unit hemisphere is visible to that point on the surface. (Note that it's a unit hemisphere because half of the unit sphere is on the wrong side of the surface to start with.)
So in your pipe example, the outside of the pipe is not at all occluded. From every point on the outside, any ray fired in that hemisphere will escape without intersecting the object. All of the outside would be lit with 100% of the ambient light.
The inside is another matter. The inside of the end cap can only see a small circle of that hemisphere, through the other end of the pipe. The exact fraction depends on the radius and length of the pipe, but call it 10% for the example. 90% of rays fired from a point on the end cap will hit the inside of the cap, and the other 10% will escape along the length of the pipe and out of the other end. These points are 90% occluded, so they'll be lit with 10% of the ambient light.
Consider a point at the open end of the pipe, but on the inside. This point is 50% occluded. Half of the rays fired from it go into the pipe and intersect with it at some point. The other half go straight out and escape to the unit hemisphere. This point will be lit with 50% of the ambient light, and it's easy to see that the 50% will smoothly decrease to the 10% (or however much is the minimum) as you travel down the inside of the pipe towards the end cap, as less of that hole is visible.
The important point I think you misunderstood is that you measure or estimate what fraction of the unit hemisphere is visible from the point you're shading, not whether it's visible at all. Casting many rays and counting what fraction escape is one way of estimating this.
When you compute ambient occlusion (AO) for a point on an object's surface, you sample multiple directions and measure what fraction of them escape. That is, you're trying to approximate what fraction of the unit hemisphere is visible to that point on the surface. (Note that it's a unit hemisphere because half of the unit sphere is on the wrong side of the surface to start with.)
So in your pipe example, the outside of the pipe is not at all occluded. From every point on the outside, any ray fired in that hemisphere will escape without intersecting the object. All of the outside would be lit with 100% of the ambient light.
The inside is another matter. The inside of the end cap can only see a small circle of that hemisphere, through the other end of the pipe. The exact fraction depends on the radius and length of the pipe, but call it 10% for the example. 90% of rays fired from a point on the end cap will hit the inside of the cap, and the other 10% will escape along the length of the pipe and out of the other end. These points are 90% occluded, so they'll be lit with 10% of the ambient light.
Consider a point at the open end of the pipe, but on the inside. This point is 50% occluded. Half of the rays fired from it go into the pipe and intersect with it at some point. The other half go straight out and escape to the unit hemisphere. This point will be lit with 50% of the ambient light, and it's easy to see that the 50% will smoothly decrease to the 10% (or however much is the minimum) as you travel down the inside of the pipe towards the end cap, as less of that hole is visible.
The important point I think you misunderstood is that you measure or estimate what fraction of the unit hemisphere is visible from the point you're shading, not whether it's visible at all. Casting many rays and counting what fraction escape is one way of estimating this.
answered Aug 29 at 8:05
Dan Hulmeâ¦
4,8531631
4,8531631
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
add a comment |Â
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
With "hemisphere on the wrong side of the surface" do you mean the bottom hemisphere? Why is it on the wrong side when in this scene there's no such thing like a ground?
â yot
Aug 29 at 10:13
2
2
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
@yot No, I mean the hemisphere that is back-facing with respect to the surface; the opposite side from the surface normal. Just like in direct lighting, each point can only be lit from half of space.
â Dan Hulmeâ¦
Aug 29 at 10:35
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
Objects are made up of flat surfaces and flat surfaces have surface normals on both side, I think. Is the "front-facing" side of the surface the one the 'sees' the sky and not the interior of the object it belongs to?
â yot
Aug 29 at 13:37
1
1
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
If you consider a polygon mesh, it's usual for surfaces to have only one side and one surface normal: the back face is typically not drawn at all. This is because the inside of the surface isn't visible. What you said is possible too, but even then, you still have to light each side of the surface separately, otherwise surfaces could be illuminated by lights that are actually behind them. This is a much bigger discussion than just AO though.
â Dan Hulmeâ¦
Aug 29 at 14:13
add a comment |Â
up vote
3
down vote
Ambient occlusion is basically shooting out a large number of rays diffusely from a surface point. In a pipe some of the rays will intersect with the pipe itself, which means that this surface point will not receive as much ambience as points that don't have intersecting rays. The inside of the pipe vs the outside of the pipe will be different.
add a comment |Â
up vote
3
down vote
Ambient occlusion is basically shooting out a large number of rays diffusely from a surface point. In a pipe some of the rays will intersect with the pipe itself, which means that this surface point will not receive as much ambience as points that don't have intersecting rays. The inside of the pipe vs the outside of the pipe will be different.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Ambient occlusion is basically shooting out a large number of rays diffusely from a surface point. In a pipe some of the rays will intersect with the pipe itself, which means that this surface point will not receive as much ambience as points that don't have intersecting rays. The inside of the pipe vs the outside of the pipe will be different.
Ambient occlusion is basically shooting out a large number of rays diffusely from a surface point. In a pipe some of the rays will intersect with the pipe itself, which means that this surface point will not receive as much ambience as points that don't have intersecting rays. The inside of the pipe vs the outside of the pipe will be different.
answered Aug 29 at 8:02
beyond
1213
1213
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcomputergraphics.stackexchange.com%2fquestions%2f7985%2fambient-occlusion-of-a-sole-object-in-a-scene%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password