Announcement

Collapse
No announcement yet.

Animating lightfunctions in matinee not possible?

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

    Animating lightfunctions in matinee not possible?

    My environment has a cloud layer that I control via kismet/matinee. Using a material instance the visibility of the clouds can be easily adjusted, however I also want the clouds to cast shadows on the world using a light function, but for some reason the same method to adjust the cloud material does not work for the light function.

    My current setup for both the cloud material and the light function:
    - Base material that defines the look and has a param to adjust the visibility
    - Material instance with this param checked
    - Material instance actor in the level that references the material instance
    - Matinee sequence to adjust the param that references the MI actor

    Is this not supported for lightfunctions or am I just doing something wrong?

    #2
    Place exactly same material as you use for lightfunction on some mesh or csg and see if matine can adjust that. Then you at least know if its not supported or you are making something wrong.

    Comment


      #3
      Thanks, I just tried that and I also tried the reverse: applying the working clouds material instance as the light function.

      The bad news was that it still did not animate as a light function while working properly as a normal material so I'm afraid that means this is not supported. Which is kind of weird as it would seem quite useful for things like dynamic weather systems.

      Is there any other way to influence a lightfunction?

      Comment


        #4
        Maybe you can affect light that casts lightfunction. Intensity of it should work from matine, this way you can make shadows less/more visible.

        Btw. How did you sync shadows to clouds? I tried it with lightfunction and worldposition scalling but i could not find simple way for doing it.

        Comment


          #5
          I already adjust the intensity of the light, but that is not enough by itself as I want to go from a completely clear sky to a rainy sky.

          To sync them I just eyeballed the speed. I did not sync the actual cloud locations. I have mostly smaller clouds so it is very hard to notice that they don't exactly match up.

          If you want them to properly match here's what I would try: adjust your lightfunction scaling to the UVs on your cloud mesh then place a checker pattern on both to align them once and animate at the same speed. Haven't tried it though, so not sure. I'll see if I can try that later on.

          Comment


            #6
            Originally posted by Arnage View Post
            If you want them to properly match here's what I would try: adjust your lightfunction scaling to the UVs on your cloud mesh then place a checker pattern on both to align them once and animate at the same speed. Haven't tried it though, so not sure. I'll see if I can try that later on.
            That would work only for light at 90deg angle, anything else makes trial and error approach hard to sync them. Rotation of light and angle stretches and rotates texture, and this makes hard to tune lightfunction uv's. Worldposition node does not work for projected texture, or did not in february build.

            Comment


              #7
              True, although if you only rotated the sun around either X or Y the scaling should be quite easy to calculate. When rotated around both the math will get a bit harder, but not impossible.

              Comment


                #8
                You can try making an instance of your cloud instance. Use the child instance as your light function. Theoretically, it should take any settings that are not overridden from the parent instance. In this case, your clouds. I've not tried this dynamically, but it may work. Then you wouldn't need to update the light function. It would update itself because it gets its settings from the cloud instance, which is changing via matinée.
                If you need to invert it or anything for the shadows to look right, you'd just need to add that as an option in the material and override it in the light function instance.

                Comment

                Working...
                X