Announcement

Collapse
No announcement yet.

RASL - Upgrading the real time light by Hevedy

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

    [TOOL] RASL - Upgrading the real time light by Hevedy


    RASL
    Realtime Artistic Simulated Light
    This is a demo post of how the base system works, the complete solution is not here and is paid.

    x~1.25 more expensive than of a total baked solution, while the less expensive real GI solution is about x~1.45
    Note a complete scene using a directional light and skylight in real time is already x~1.20 more expensive than the total baked solution.

    RASL is a package of tools to upgrade your level realtime light at next level, supporting day-night cycles, simulated GI, and simulated lights at low cost.



    Note: As the name say, this is a simulated light solution, no a real light solution, if you're looking for something automatic and real, this system is not for you.

    This is a good low cost system, can be used in all type of desktop computers and give about 20FPS more than the first less expensive GI solution (LPV)
    This post will be updated until the end of project

    The final package aim to the marketplace, but here I will give the bases of the system for free under MIT license (The engine code changes and the shader material base) feel free to use this in commercial or non commercial projects (Games, tutorials, films, ArchViz...), but no in other marketplace content.

    The aim of this project is get results simulating the light from bounces to light blends etc (all in realtime)

    How the common light works:

    Imagine we got a box scene like in the image:


    The Blue top box is a spot light, while the right yellow is a window with the light that come from the sun (a single Directional light).
    By default as the line traces show the light comes in one single direction, this don't give us the result we want when got a room with one window from where the sun comes.

    In a real room the sun light bounces in the surfaces until don't have more energy, as this images show:


    when the traces touch the walls or other objects absorb part of the color, this depend of the color intensity and the power of the light, the sun got more power and energy than the normal light in a common case



    for example using one single line trace we can get a result like this:

    ...and the colors blend like this, more or less:


    after this, and after know how the light bounces and taking note that the spot light bounces too and mix with the sun and the colors of the walls, at the end we should get a result more or less like this:



    Now you know more or less how the global illumination works more or less, as fast intro.
    The common GI light solutions try to simulate this at real time, the lightmass baker of Unreal Engine 4 try to simulate this too. Usually this methods are automatic and take time to simulate the light.

    So,my solution looks more or less like this:


    The base of this solution is, place over the map spheres and cubes that simulate the light of the bounces and can be changed in real time
    Note: (Are not real lights, but can be used with real lights).

    The max amount of lights in screen are right now 16, you can use less or add more, but this will add or remove performance, since you need overload all the materials in the scene with the new function.

    Examples:

    Original Matinee Scene (Baked Static Light):


    Original Matinee Scene (Real Time Dynamic Light, and using about 10 lights less):

    • Why you made this ?
      - Since I don't get a true solution to simulate GI in real time or a Day-Night cycle and the GI solutions (In Alpha/Beta status) are pretty expensive, I decided to make this.
    • What is the performance ?
      - Each material used need to be overloaded with a new function to simulate the light. (Or you can use only in the models where you want light simulation).
    • This light can affect particles and non static models ?
      - Yes, just add the new node over that materials you want.
    • This work for VR or DX10 ?
      - Yes and Yes, this is the only method to simulate GI that can be used over DX10 (Shader Model 4).


    Engine changes:

    Engine Fork: https://github.com/Hevedy/UnrealEngi.../Hev_RASL_4.11
    Download and compile and other versions
    (The shader and the code needs updates but in general is more expensive since need do one if more in each light the difference with two directional is 132FPS in the vanilla build and 127FPS in the build with this shader)

    To use the new feature you can place a light in the map and uncheck the Bool Cast Shadows, you will notice the difference.

    The new lights shader are free for all under the MIT license. (Only the code added)
    This new function help to simulate the light bounces since, don't give any type of shadows info.

    This image show the use only of x2 Directional Lights 100% real time:

    I'm added a new function to all the light types, to ignore the models shadows, in this way, you can simulate better the GI bounces without shadows in the models (This lights will ignore the walls and all models, so try to no place where are 2 sided walls)



    This is how get this feature working:




    Pros: (Complete Version)
    • Can be used with DX 10. (This include OpenGl 3.2 too but no tested)
    • Can be used in all materials, in a single material or in the materials you want (Only the ones using the node are affected by light system)
    • Up to 16 lights and one ambient color (You can add more, but will add extra cost to the materials)
    • Less expensive than common lights.
    • Project the light in all sides, something the normal light wthout shadows can't do.
    • Artist driven.
    • Can blend the color of the light in 2 zones.
    • Pretty low cost system.
    • No need of bake light.
    • Support day-night cyles.
    • Can give negative values to the colors. (Creating dark zones)
    • Can be used with VR.
    • Probes to change the light in different zones and be affected by colors.


    Cons: (Complete Version)
    • Max 16 lights at same time in the camera (You can add more, but will add extra cost to the materials)
    • This system add cost to all the materials using this node.(Material overload)
    • Not a real light solution.
    • Volumes can't be rotated (This is a possible problem if you think in use the box zones).
    • Don't affect the material properties as other solutions do.
    • Since project light in all directions, the walls leak light in the other side (Something the artist should control)
    • No automatic system.
    • Preview limitations in editor.
    • Don't support 100% white or black surfaces.
    • The scene need to be well lighted in some cases.
    • Need edit the whole project, scene and materials to add the system.
    Last edited by Hevedy; 07-10-2016, 05:11 PM.
    Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
    Hevedy - Image Tools: https://hevedy.itch.io/imagetools

    #2
    Very cool Hevedy I'll definitely be taking a look at that!

    Comment


      #3
      Originally posted by Niktsuki View Post
      Very cool Hevedy I'll definitely be taking a look at that!
      Thanks you
      Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
      Hevedy - Image Tools: https://hevedy.itch.io/imagetools

      Comment


        #4
        Amazing. Great work Hevedy!
        KITATUS
        "Information shouldn't be behind a paywall, It should be free for all!"

        Comment


          #5
          Originally posted by KitatusStudios View Post
          Amazing. Great work Hevedy!
          You here! Thanks you ^^
          Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
          Hevedy - Image Tools: https://hevedy.itch.io/imagetools

          Comment


            #6
            Hey Hevedy, trying it out, but was getting a compile error for the RASL_LightActor and a whole bunch of stuff not connected.
            Is that the correct link? I'm using 4.11, attempted to make the blueprint again, but something isn't linked

            when i load the RASL_LightActor BP it throws a message, saying I have invalid type, Light color.
            This breaks the link to the struct inside the calculate Parameters.
            Error Default value 'NewEnumerator2' for Index is invalid: 'Expected a valid unsigned number for a byte property'
            Material function was unlinked too, but that was easy to fix.

            Is it just me? Does anyone else have any issues?


            Thanks for the good work, keen to test it out.

            Comment


              #7
              Looking forward to trying in a few weeks once I check off a few more tutorial learnings.
              The results looks great and make sense artistically.
              www.valkrysa.com
              A proud and noble software developer

              Comment


                #8
                Originally posted by mserena View Post
                Hey Hevedy, trying it out, but was getting a compile error for the RASL_LightActor and a whole bunch of stuff not connected.
                Is that the correct link? I'm using 4.11, attempted to make the blueprint again, but something isn't linked

                when i load the RASL_LightActor BP it throws a message, saying I have invalid type, Light color.
                This breaks the link to the struct inside the calculate Parameters.
                Error Default value 'NewEnumerator2' for Index is invalid: 'Expected a valid unsigned number for a byte property'
                Material function was unlinked too, but that was easy to fix.

                Is it just me? Does anyone else have any issues?


                Thanks for the good work, keen to test it out.
                The BP are made for the 4.11.1, said this make sure you place the 2 folders in the Content Folder, need to be in the root of the Content Folder or will return problems.
                *Your problem sound like the Struct in the Core folder is not there.
                Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
                Hevedy - Image Tools: https://hevedy.itch.io/imagetools

                Comment


                  #9
                  Originally posted by Hevedy View Post
                  The BP are made for the 4.11.1, said this make sure you place the 2 folders in the Content Folder, need to be in the root of the Content Folder or will return problems.
                  *Your problem sound like the Struct in the Core folder is not there.
                  Thank you Hevedy, I'll update and give it a burl. Cheers mate

                  Comment


                    #10
                    Originally posted by Hevedy View Post
                    The BP are made for the 4.11.1, said this make sure you place the 2 folders in the Content Folder, need to be in the root of the Content Folder or will return problems.
                    *Your problem sound like the Struct in the Core folder is not there.
                    Yep you were right, working correctly now, on 4.11.0, but i'm only getting one light actor at a time. what else am i missing?

                    Comment


                      #11
                      Originally posted by mserena View Post
                      Yep you were right, working correctly now, on 4.11.0, but i'm only getting one light actor at a time. what else am i missing?
                      Correct you can have max one Box light and One Sphere light at time, as this post say is a free sample presentation of the RASL system (This is a demo post of how the base system works, the complete solution is not here and is paid.), the complete system will come to the Marketplace allow to manage the light you want with 16 render at time.

                      *Note you can use the engine code and do the same effect with the normal lights, and you can place until the max supported by the engine. (The engine code will be added this week)

                      This post is more a demo to developers of how I managed the light system, you can upgrade or buy my package later.
                      Last edited by Hevedy; 04-12-2016, 03:23 AM.
                      Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
                      Hevedy - Image Tools: https://hevedy.itch.io/imagetools

                      Comment


                        #12
                        ah. fantastic concept then. Great idea and good work. look forward to seeing it out in the open.

                        Comment


                          #13
                          Amazing Hevedy, I will definitely try this for my VR game and share the results.

                          Comment


                            #14
                            Muy interesante, buen trabajo...

                            Comment


                              #15
                              Originally posted by cruz.guinho View Post
                              Muy interesante, buen trabajo...
                              Muchas gracias ^^
                              Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
                              Hevedy - Image Tools: https://hevedy.itch.io/imagetools

                              Comment

                              Working...
                              X