Archived

This topic is now archived and is closed to further replies.

Light through translucent cube

This topic is 5498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Imagine there's a tranclucent cube and a lightray goes through it:
     ________
     |      |
100% |      | 50% intensity
*****|* * * |*****
     |      |
     |______|
  
After going through the cube, the ray has 50% intensity left. Now, if the ray would go through a cube made of the same material, but twice as thick:
     ______________
     |            |
100% |            | ???% intensity
*****|* * * * * * |*****
     |            |
     |____________|
  
Then how much intensity should the ray have after going through the material? How much intensity will the lightray have after going through the material for a given length? Thanks. P.S. No this is not a homework question, but me who wants to try to make voxels in a voxel engine translucent. [edited by - lode on November 18, 2002 9:06:25 PM]

Share this post


Link to post
Share on other sites
My best guess is that it''s probably an inverse-squared relationship. In other words, given the same opacity of the material, for every factor of a base thickness, the opacity decreases by that factor squared. So if you double the thickness, you''d cut the intensity by a fourth; multiply the width by 6, and you decrease the intensity by a factor of 36, etc.

However that''s just an educated guess. I guess it would depend on the material really.

Share this post


Link to post
Share on other sites
Think of it as photons and statistics. Consider your original cube. A particular photon has a 50%, or 0.5, chance of being absorbed, and a 0.5 chance of being allowed through.

Now consider the double-width cube. Essentially, it''s just two of the cubes stuck together. So in order for a photon to travel through, it needs to be allowed through both. The chance of this happening is 0.5*0.5 = 0.25, or 25%. In other words, 25% of the photons will get through, on average.

You can extend this to a formal equation. If q is the percentage of light allowed through a translucent surface of width 1, then the percentage of light Q let through a translucent surface of width w, as a function of w, is Q(w)=qw.


Don''t listen to me. I''ve had too much coffee.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
> ... If q is the percentage of light allowed through a
> translucent surface of width 1, then the percentage of light Q
> let through a translucent surface of width w, as a function of > w, is Q(w)=qw.
>---------------------------------------------------------------->Don''t listen to me. I''ve had too much coffee.

Sneftel stop drink that coffee! You had a perfect reply up to the cited text above. Your function increases with depth -surely an error.

The whole thing is a standard differetial equation:
(I beeing intensity, x just a lenght coordinate)
(f is a damping factor)

dI = -f*I*dx (intensity changes proportinally to intensity)

dI/I = -f*dx

integrate over x:

ln(I) = -f*x

I = exp(-f*x) (witch is the solution) (falls of nicely with depth)

/Ola

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
> ... If q is the percentage of light allowed through a
> translucent surface of width 1, then the percentage of light Q
> let through a translucent surface of width w, as a function of > w, is Q(w)=qw.
>---------------------------------------------------------------->Don''t listen to me. I''ve had too much coffee.

Sneftel stop drink that coffee! You had a perfect reply up to the cited text above. Your function increases with depth -surely an error.


His reply makes perfect sense, since as he says you can treat a block of length N as 2 adjacent blocks of length N/2. Also, his function doesn''t increase with distance because q < 1, so q > q^2 > q^3 > ...

Your solution might work, but I see no proof that your assertion dI=-f*I*dx is true.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Sneftel stop drink that coffee! You had a perfect reply up to the cited text above. Your function increases with depth -surely an error.

What the heck are you talking about? q is a fractional value, between 0 and 1. remember third grade math? when using percentages in math, you divide them by 100. For instance, if a 1-meter width transmits 25% (that''s 0.25, ya see) then the following widths transmit as such:
0 meters: 0.250 = 1.0
1 meter: 0.251 = 0.25
2 meters: 0.252 = 0.0625
3 meters: 0.253 = 0.015625

Does that look like it increases with depth?

quote:

The whole thing is a standard differetial equation:
(I beeing intensity, x just a lenght coordinate)
(f is a damping factor)



Your function does indeed give a smooth tapering off. But it isn''t the RIGHT ONE. if you don''t believe me, try it out yourself, with a lamp, pieces of paper, and a light meter.


Don''t listen to me. I''ve had too much coffee.

Share this post


Link to post
Share on other sites
Gentlemen, relax. You are both saying the same thing.

K^x = exp(-log(1/K)*x)

It''s only a question of how which expression you understand better. I would go with exp(-f*x) myself, because it''s easier to compute and makes more obvious that it''s the solution of the above-mentioned differential equation. But that''s just a matter of taste.

Share this post


Link to post
Share on other sites
Despite the fact that Zipster''s guess isn''t right, I think it is important to note that the intensity of light moving through space (something where the optical opaqueness is close to zero) is an inverse square relationship. This is just like every other inverse field (gravity, electrostatics, magnetism), and is an inherent property of the geometry of the space we live in. Anyone see an application of Gauss''s law for finding the amount of light hitting a plane perhaps? Would this be useful? I don''t know. And for the people who have posted about the exponentials: All exponentials will be correct. The difference between a confusing one and a concise one is whether it can incorporate quantities that we give names to. I was at a lecture a few months ago and there is a name given to the constant in the exponent before the depth of the material. This constant has been measured for various mediums, and because of that, you will want to use the formula that incorporates the constant. At any rate, the question has been answered. Sorry for being so picky.

Brendan

Share this post


Link to post
Share on other sites
I'm not sure that your answers are correct, even though I don't have a better one myself.

We're talking about translucency, here. The light is diffused through the material; photons are absorbed and reemitted (I'm not sure that this assertion is correct, but for the purpose of this discussion, it will suffice). Consider:

|
|
A | B
|
|

vs


A | B

A is a light source separated from point B by a block of negligible width. B will obviously receive more light from A in the first case, since the photons emitted from A that are going at 30 degrees of the horizontal might be reemitted in the direction of B when they hit the block.

My point is that, in the original post, height is not modified, but the ratio height/width is. It might have an impact on the solution. It's a pretty complex problem.

Cédric

[edited by - cedricl on November 19, 2002 8:34:08 PM]

[edited by - cedricl on November 19, 2002 8:35:57 PM]

Share this post


Link to post
Share on other sites
We''re talking about translucency, here. The light is diffused through the material; photons are absorbed and reemitted (I''m not sure that this assertion is correct, but for the purpose of this discussion, it will suffice).

Not all translucent materials scatter the incident light. Moreover when they do the emitted photons often have longer wavelengths, in the infrared or microwave.

Sometimes electrons exited by incoming light might jump into a conduction band and no photons are re-emmitted at all. I think this is what happens in tinted glass where metal powders are added to the glass in the manufacturing process.

There are also some processes involving acoustic waves in the translucent material, but I am a little hazy about these.

For just about everything the exponential dropoff with thickness method is appropriate.

Share this post


Link to post
Share on other sites
What I''m trying to achieve is that in my voxel engine, you can see more through one translucent cubes than through two translucent cubes of the same kind, in a realistic way. Also if you look through one cube, you can see more or less through it depending on how the lightray goes through it (e.g. if the ray goes through a corner of the cube for a few centimeters, much less light is absorbed). And I''m not really planning to do refraction.

Share this post


Link to post
Share on other sites
quote:
Original post by sQuid
Not all translucent materials scatter the incident light. Moreover when they do the emitted photons often have longer wavelengths, in the infrared or microwave.

Isn''t this the difference between transparency and translucency?
quote:
Dictionary.com
Translucency : Transmitting light but causing sufficient diffusion to prevent perception of distinct images

quote:
Sometimes electrons exited by incoming light might jump into a conduction band and no photons are re-emmitted at all. I think this is what happens in tinted glass where metal powders are added to the glass in the manufacturing process.

This is transparency; tinted glass doesn''t blur the image.

Anyway, this all theoretical. Exponential functions will work fine for CG.

Cédric

Share this post


Link to post
Share on other sites
Lode, what you are trying to do is slightly different then the way you initial stated the problem. Assuming we are working with a point light infinitely far away, all areas of the cube should have the same brightness (as long as the viewing plane is parallel to the edge of cube which is parallel to the light wavefronts). Furthermore, I think what we are talking about is transmittance and absorbtion of light through a medium, which is definitely an exponential process. An object will blurr an image when light coming through the boundary of the medium is diffracted at different angles. I think its much like specular and diffuse reflection off of an object. It also depends upon the internal structure of what you are looking at. If you want the corners to be brighter, than you are going to have to calculate the distance the rays must go through. I would assume that the scattering of light inside is relatively constant (a fair assumption), and then do raytracing, but this is what you don''t want to do. Try posting it on the graphics forum, they probably know more about stuff like this there.
Brendan

Share this post


Link to post
Share on other sites
I''m sorry, I appearantly used the wrong word, I meant transparent instead of translucent! Dumb dumb me. So I got no heavy blur and scattering calculations to do at all

I think I got my answer pretty much answered now, I''ll try to do it exponential, thanks.

Share this post


Link to post
Share on other sites
In response to the original post, I think the light that passes through the cube depends on the index of refraction of the material, not the volume of the material, as well as the number of interfaces between the light source and destination. Here''s a general equation for finding the intensity of refracted light at an interface:

Ir = ( (ni - nr) / (ni + nr) )2 Ii

Ir is the intensity of the light refracted from the cube.
Ii is the intensity of the incoming, or incident light.
ni is the refractive index of the material from which the incident light is originating
nr is the refractive index of the material the light is passing into

For your specific problem, I see two interfaces. The first is the air-to-cube interface, and the second is the cube-to-air interface. The refractive index of air is approximately equal to 1. Hypothetically, let''s say that the refractive index of your material is 1.5, an average type of glass. Substituing these values gives:

Ir = ( (ni - nr) / (ni + nr) )2 Ii = ((1 - 1.5)/(1 + 1.5)2 Ii = (0.04)Ii

If 4% of the original light is refracted at the air-to-cube interface, the Law of Conservation of Energy states that this will leave 96% to pass through the cube itself (inside the cube). Solving for the intensity at the cube-to-air interface will also yield 4% refraction. So 96% of the light in the cube will actually pass through. Simple multiplication shows:

(0.96)(0.96)100 = ~91%

Approximately 91% of the original light passes through the cube. So, to make a long story even longer, I''d say that the intensity of the light will still be 50% no matter how long you make the cube. Gotta love physics.

Also note that if you double the thickness of the cube, it''s no longer a cube.


"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein

Share this post


Link to post
Share on other sites
In a situation such as Lode was talking about with partial transparency, the amount of reflected light (which is what your equation represents) is trivial compared to the amount of absorbed light. And that latter is dependent on the width of the material.


Don''t listen to me. I''ve had too much coffee.

Share this post


Link to post
Share on other sites
Yes, you''re right. I completely forgot about absorption. Though, assuming my reasoning and computations in my previous post, I still don''t think refraction is anything to scoff at.

"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sorry Sneftel and to the coffee-drinking people around (as myself for instance).

I didn''t get that you actually had an exponent I just saw q*w.

Personally I prefer to write in "computer readable" form:
exp(arg) sin(arg) etc
to make formulas readable when no LaTex or similar in in use.

/Ola

Share this post


Link to post
Share on other sites