Announcement

Collapse
No announcement yet.

Light Coordinate From Light Vector

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Light Coordinate From Light Vector

    How could I get light world coordinate from the light vector ?

    #2
    You can't. The light vector is already normalized which means you can't re-construct the light position from this vector.

    Comment


      #3
      How could I get light world coordinate in any way then ?

      Comment


        #4
        If you are looking for a way to this in the material editor, it's not possible. You would need to pass in the coordinates as a constant from uscript or maybe kismet.

        Comment


          #5
          Alright I dont need coordinates anyway, is it possible to calculate distance between current position of object and light position ?

          I really did not understand official instructions about vectors, I always thought vectors as distances but it seems they are not.
          And if you dont mind, could you explain what is a vector exactly and what is a normalized vector ?
          And what dot and cross operations exactly do ?

          Thanks and regards...

          Comment


            #6
            Am no Maths expert but i hope this helps.

            Originally posted by caner_ozdemir View Post
            And if you dont mind, could you explain what is a vector exactly and what is a normalized vector ?
            Vector is a three-dimensional Euclidean Vector which contains the values X, Y and Z. Euclidean Vector is a quantity having magnitude (ie how long it is or think of it as length) and direction. Vector is used to define a lot of things such as velocity, position, distance, direction and many more.

            Normalized Vector means dividing the magnitude (length) by its axis which returns a unit vector. For example, think of a vector (5,4,3) with a length of 6.25. When normalized it will be like:

            X = (5 / 6.25 = 0.8)
            Y = (4 / 6.25 = 0.64)
            Z = (3 / 6.25 = 0.48)

            So the normalized copy of vector (5,4,3) with length 6.25 will be (0.8,0.64,0.48).

            Originally posted by caner_ozdemir View Post
            And what dot and cross operations exactly do ?
            Dot Product (aka Scalar Product) always return the smallest angle between two vectors. Dot Product will be negative if two vectors point in the opposite direction and positive if they point in similar directions and will be zero if they are perpendicular.

            Cross Product (aka Vector Product) returns a vector which is perpendicular to given vectors and therefore can be the normal of the surface. See the below gif. Blue and Red are the given vectors and the Pink is the cross product.

            Comment

            Working...
            X