Thanks for the explanation Richard I think I understand the concept now. The problem I have is that I want to move the light around and make it orbit an object and I can't use PointLight3D as it doesn't support the Dot3 material I'm using, and it doesn't look like the diectional light was ever meant to do thiskind of thing. But I guess thems the breaks.
On Jun 7, 11:39 am, richardolsson <[email protected]> wrote: > What do you mean, "centered to the scene"? > > DirectonalLight3D has internally always worked the same. But in > previous versions, it's position was used to calculate the direction, > which was essentially just the inverse of the position vector relative > to the scene origin (e.g. if it was above your scene origin, light > would be downward from infinitely far away). > > The position properties might have seemed logical when one incorrectly > thinks of the dir light as a point light, but it's not and doesn't > work like one. Instead, this caused a huge logical issue: If you > "positioned" a dir light between two objects, it would still light > both of them from the same direction, because it's considered to > really be infinitely far away. This was and is correct, but could be > extremely hard to grasp, since the existence of position attributes > implied that the light had a position, when in fact it was just a > result of it extending Object3D. So the position properties were > removed. > > If you want to simulate zenith sun, use a direction vector of (0, -1, > 0) i.e. downward. To have a western sunset, use (1, 0, 0) i.e eastward > pointing. > > Hope this helps you guys understand the concept behind the light > source. :) > > Cheers > /R > > On Jun 7, 11:32 am, Michael Iv <[email protected]> wrote: > > > Got you David , it is like a Sun Light actually but directed . Still , it is > > hard to implement it on objects centered to the scene > > > On Mon, Jun 7, 2010 at 12:11 PM, David Lenaerts > > <[email protected]>wrote: > > > > Dot3 only supports directional lights, since the nature of directionals > > > offer it a very fast way to calculate lighting. > > > > Now, as for why the directional light doesn't have a position: don't > > > consider it as a specific light source. Instead, it's typically used for a > > > strong light source very far away, such as the sun. Of course, it's an > > > approximation, but again it offers optimizations. The idea is that > > > wherever > > > you are in the scene, the light always comes from the same direction > > > (hence > > > the name). If it were to have a position, then the light direction would > > > change depending on where the lit object is relative to the light (and > > > that > > > is a point light). > > > > Hope that clarifies a thing or two! > > > > David > > > > On Mon, Jun 7, 2010 at 10:50 AM, Michael Iv <[email protected]> wrote: > > > >> I did it with PhongColorMaterial actually . Don't know why it doesn't > > >> work > > >> with Dot3 I will try to check it too. > > > >> On Mon, Jun 7, 2010 at 11:47 AM, Josh > > >> <[email protected]>wrote: > > > >>> I'm having the same problem Michael, however I can't seem to get the > > >>> PointLight3D to work with Dot3BitmapMaterials. does anyone know if > > >>> Dot3s support pointLights? > > > >>> On Jun 7, 8:44 am, Michael Iv <[email protected]> wrote: > > >>> > It is hard to understand why directional lights position doesn't make > > >>> sense > > >>> > . I mean , take 3d modelling program ,or UDK or Unity(ok that is not > > >>> the > > >>> > same in terms of technology ) , but the light should have emission > > >>> source > > >>> > and the soruce should have a position in 3d space ? . and the source > > >>> > position of DirectionalLight3D is in the center of the scene, So if > > >>> > my > > >>> > object is not offset from the center ,there is a problem , the object > > >>> > doesn't receive the light at all . And .direction doesn't help in this > > >>> case, > > >>> > I was trying to tweak it too without much success . Eventually used > > >>> > PointLight3d. > > > >>> > On Mon, Jun 7, 2010 at 10:35 AM, richardolsson <[email protected]> > > >>> wrote: > > >>> > > The direction property is the way to go. As of 3.5, directional > > >>> lights > > >>> > > don't have positions, which never made sense anyway since dir lights > > >>> > > are orthographic in a way, and not to be considered as point in > > >>> > > space > > >>> > > -- they are infinitely far away. > > > >>> > > If you cannot get direction to work like below, make sure you are > > >>> > > using materials that support dir lights! > > > >>> > > var light : DirectionalLight3D = new DirectionalLight3D; > > >>> > > light.direction = new Number3D(0, -1, 0); // Downward > > > >>> > > Cheers > > >>> > > /R > > > >>> > > On Jun 5, 10:15 pm, fab4ce <[email protected]> wrote: > > >>> > > > Hi Fabrice, > > > >>> > > > PointLight3D has a position property, but DirectionalLight3D > > >>> doesn´t > > >>> > > > have it. > > > >>> > > > On 5 Jun., 19:53, Fabrice3D <[email protected]> wrote: > > > >>> > > > > there is a position property > > > >>> > > > > Fabrice > > >>> > > > > On Jun 5, 2010, at 2:08 AM, fab4ce wrote: > > > >>> > > > > > Hi all, > > >>> > > > > > after updating to the new version 3.5 i had to change my > > >>> directional > > >>> > > > > > light from view.scene.addChild(light) to > > >>> view.scene.addLight(light); > > >>> > > > > > How can change my code for positioning the light in the scene? > > >>> I was > > >>> > > > > > using the .x and .y and .z properties of the light object. > > > >>> > -- > > >>> > Michael Ivanov ,Programmer > > >>> > Neurotech Solutions Ltd. > > >>> > Flex|Air > > >>> |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp:// > > >>>www.meetup.com/GO3D-Games-Opensource-3D/ > > > >>> Tel:054-4962254begin_of_the_skype_highlighting 054-4962254 > > >>> end_of_the_skype_highlighting > > >>> > [email protected] > > >>> > [email protected] > > > >> -- > > >> Michael Ivanov ,Programmer > > >> Neurotech Solutions Ltd. > > >> Flex|Air |3D|Unity| > > >>www.neurotechresearch.com > > >>http://blog.alladvanced.net > > >>http://www.meetup.com/GO3D-Games-Opensource-3D/ > > >> Tel:054-4962254 > > >> [email protected] > > >> [email protected] > > > > -- > > >http://www.derschmale.com > > > -- > > Michael Ivanov ,Programmer > > Neurotech Solutions Ltd. > > Flex|Air > > |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp://www.meetup... > > Tel:054-4962254 > > [email protected] > > [email protected]
