Ambient occlusion of a sole object in a scene
$begingroup$
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
$endgroup$
add a comment |
$begingroup$
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
$endgroup$
add a comment |
$begingroup$
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
$endgroup$
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 '18 at 7:02
yotyot
233
233
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
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.
$endgroup$
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
add a comment |
$begingroup$
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.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "633"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
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
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
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.
$endgroup$
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
add a comment |
$begingroup$
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.
$endgroup$
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
add a comment |
$begingroup$
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.
$endgroup$
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 '18 at 8:05
Dan Hulme♦Dan Hulme
5,3601732
5,3601732
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
add a comment |
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 10:13
2
2
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
@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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 10:35
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
$begingroup$
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?
$endgroup$
– yot
Aug 29 '18 at 13:37
1
1
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
$begingroup$
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.
$endgroup$
– Dan Hulme♦
Aug 29 '18 at 14:13
add a comment |
$begingroup$
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.
$endgroup$
add a comment |
$begingroup$
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.
$endgroup$
add a comment |
$begingroup$
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.
$endgroup$
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 '18 at 8:02
beyondbeyond
3074
3074
add a comment |
add a comment |
Thanks for contributing an answer to Computer Graphics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown