Difference between revisions of "Reference Talk:Light Source"
(+reply) |
m (tweak) |
||
Line 73: | Line 73: | ||
:Oops, I was wrong. But translation is *dangerous*. As per clipka's response to my post: | :Oops, I was wrong. But translation is *dangerous*. As per clipka's response to my post: | ||
− | + | :<blockquote>And that direction is unchanged: With a parallel light source, the | |
− | <blockquote>And that direction is unchanged: With a parallel light source, the | ||
direction of all light rays depends only on the /relative/ location of | direction of all light rays depends only on the /relative/ location of | ||
two points: The light source's nominal center and the point_at | two points: The light source's nominal center and the point_at | ||
Line 81: | Line 80: | ||
location of the points, not their relative location to one another. And | location of the points, not their relative location to one another. And | ||
thus the light direction remains unimpressed.</blockquote> | thus the light direction remains unimpressed.</blockquote> | ||
− | + | :I.e. translating a light source translates the location of the source of the light *and* the location the light is pointing at, which could produce unwanted effects. [[User:SharkD|SharkD]] 16:59, 12 September 2016 (UTC) | |
− | I.e. translating a light source translates the location of the source of the light *and* the location the light is pointing at, which could produce unwanted effects. [[User:SharkD|SharkD]] 16:59, 12 September 2016 (UTC) |
Revision as of 17:00, 12 September 2016
Suggested looks_like
changes
Here is the current wording:
Normally the light source itself has no visible shape. The light simply radiates from an invisible point or area. You may give a light source any shape by adding a
looks_like {
OBJECT}
statement.There is an implied
no_shadow
attached to thelooks_like
object so that light is not blocked by the object. Without the automaticno_shadow
the light inside the object would not escape. The object would, in effect, cast a shadow over everything.If you want the attached object to block light then you should attach it with a
union
and not alooks_like
as follows:union { light_source { <100, 200, -300> color White } object { My_Lamp_Shape } }Presumably parts of the lamp shade are transparent to let some light out.
Here is my suggested wording:
Normally the light source itself has no visible shape. The light simply radiates from an invisible point or area. You may give a light source any shape by adding a
looks_like {
OBJECT}
statement.There is an implied
no_shadow
attached to thelooks_like
object so that light is not blocked by the object. Without the automaticno_shadow
the light inside the object would not escape. The object would, in effect, cast a shadow over everything.When creating the light source, the
looks_like
object should be positioned at the origin. For instance:union { light_source { <100, 200, -300> color White } object { sphere { <0, 0, 0>, My_Lamp_Radius } } }Alternately, you could declare the object beforehand and reference the object from within the light source, like this:
#declare My_Lamp_Shape = sphere { <0, 0, 0>, My_Lamp_Radius } light_source { <100, 200, -300> color White looks_like { My_Lamp_Shape } }For point lights and spotlights you could also place the light source and the
looks_like
object at the origin and translate them together later. But forparallel
lights this will not work.If you instead want the attached object to block light then you should attach it with a
union
and not alooks_like
as follows:union { light_source { <100, 200, -300> color White } object { My_Lamp_Shape } }Presumably parts of the lamp shade are transparent to let some light out.
SharkD 22:48, 8 September 2016 (UTC)
- Oops, I was wrong. But translation is *dangerous*. As per clipka's response to my post:
And that direction is unchanged: With a parallel light source, the
direction of all light rays depends only on the /relative/ location of two points: The light source's nominal center and the point_at parameter. But transformations act on both these points (I've just checked the code), so a translation operation changes only the absolute location of the points, not their relative location to one another. And
thus the light direction remains unimpressed.
- I.e. translating a light source translates the location of the source of the light *and* the location the light is pointing at, which could produce unwanted effects. SharkD 16:59, 12 September 2016 (UTC)