Announcement

Collapse
No announcement yet.

Advanced Daylight System with Colour Grading.

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

    Advanced Daylight System with Colour Grading.

    HI Guys ,

    I am currently working on Colour grading based on time of day. The plan is to make a complete blueprint based day light system that will keep changing the colour grading texture based on the game time of day and in given interval. So far I have created 15 main LUTs according to different times of day, and I have a plan to create 10-15 LUTs for every pair of adjacent primary LUTs , so that when the LUTs are changing during gameplay , the blend will look more realistic.

    Here are few screenshots of the main LUTs -

    Click image for larger version

Name:	Dawn.jpg
Views:	1
Size:	471.0 KB
ID:	1148728 Click image for larger version

Name:	Early Sunrise.jpg
Views:	1
Size:	585.5 KB
ID:	1148729 Click image for larger version

Name:	Sunrise.jpg
Views:	1
Size:	707.2 KB
ID:	1148748
    Click image for larger version

Name:	GoldenHour.jpg
Views:	1
Size:	712.6 KB
ID:	1148730 Click image for larger version

Name:	One Hour After Sunrise.jpg
Views:	1
Size:	637.1 KB
ID:	1148731 Click image for larger version

Name:	Morning.jpg
Views:	1
Size:	674.9 KB
ID:	1148732
    Click image for larger version

Name:	Midday.jpg
Views:	1
Size:	703.1 KB
ID:	1148733 Click image for larger version

Name:	Afternoon.jpg
Views:	1
Size:	638.0 KB
ID:	1148734 Click image for larger version

Name:	LateAfternoon.jpg
Views:	1
Size:	616.1 KB
ID:	1148735
    Click image for larger version

Name:	Early Sunset.jpg
Views:	1
Size:	712.4 KB
ID:	1148736 Click image for larger version

Name:	LateSunset.jpg
Views:	1
Size:	711.0 KB
ID:	1148738 Click image for larger version

Name:	Evening.jpg
Views:	1
Size:	594.3 KB
ID:	1148739
    Click image for larger version

Name:	EarlyNight.jpg
Views:	1
Size:	457.1 KB
ID:	1148742 Click image for larger version

Name:	Night.jpg
Views:	1
Size:	425.2 KB
ID:	1148740



    Few Blending LUTs from Night to Dawn



    Click image for larger version

Name:	BeforeDawn1.jpg
Views:	1
Size:	369.0 KB
ID:	1148743 Click image for larger version

Name:	BeforeDawn2.jpg
Views:	1
Size:	395.3 KB
ID:	1148744 Click image for larger version

Name:	BeforeDawn3.jpg
Views:	1
Size:	446.9 KB
ID:	1148745



    Couple of Blending LUTs from Dawn to Early Sunlight



    Click image for larger version

Name:	AfterDawn1.jpg
Views:	1
Size:	544.7 KB
ID:	1148746 Click image for larger version

Name:	AfterDawn2.jpg
Views:	1
Size:	608.8 KB
ID:	1148747


    Being a programmer , I do not have the proficiency of creating outstanding textures. So if you find any of the textures not so good , let me know , I will try my best to improve the quality.
    I also have a plan to create few location based LUTs, that can be used along with time based LUTs to get more realistic look.
    Attached Files
    Last edited by sameek4; 06-29-2015, 12:52 PM.
    DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
    Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
    Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
    MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
    Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

    #2
    sweet

    Comment


      #3
      Looks good, nicely done.

      Comment


        #4
        This looks great, great use of the color grading system, may I ask how you are achieving the blend between grading images?
        Portfolio: https://www.artstation.com/artist/paulroach

        Comment


          #5
          Originally posted by Chillybody View Post
          This looks great, great use of the color grading system, may I ask how you are achieving the blend between grading images?
          For now , I am manually creating a blend one by one , but I am trying to dynamically create adjustments for the textures so that the blends will look more realistic over time. I thought this method might be helping me but apparently it throws runtime error

          UTexture2D* AGlobalPostProcess::CreateBlendTextures(UMaterial* Material)
          {
          FColor color = Material->BaseColor.Constant;
          TArray<FColor> Colors;
          Colors.Add(color);
          UTexture2D* FinalTexture = FImageUtils::CreateTexture2D(256, 16, Colors, this, "ResultTexture", EObjectFlags::RF_Public | EObjectFlags::RF_Transient, FCreateTexture2DParameters());
          return FinalTexture;

          }
          DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
          Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
          Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
          MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
          Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

          Comment


            #6
            I like Early Night and One Hour After sunrise the most. Some of them feel a bit too strongly tinted to me (like Early Sunset) Interested to see your system motion!
            Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

            Comment


              #7
              You could also make 15 unbound postprocess volumes and blend them programmatically or using blueprints using the blend parameter

              Comment


                #8
                I was thinking about how to do this just the other day, nice job so far!

                Comment


                  #9
                  Originally posted by Tom Looman View Post
                  I like Early Night and One Hour After sunrise the most. Some of them feel a bit too strongly tinted to me (like Early Sunset) Interested to see your system motion!
                  Thanks Tom for your feedback. I will merge this with location based daylight system so that clouds and sunlight are in pace with the LUTs , and then will make a video of this.
                  DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
                  Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
                  Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
                  MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
                  Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

                  Comment


                    #10
                    Systems like this for me are almost a must. I am not color blind but I might as well be as I seem to have no attention depth regarding colors. So for me, having pre-made color based systems is really important.
                    But what I am wondering, is if I could use this system for a 2D project that runs on emissive lighting? I do not have much experience in the lighting department or texturing so forgive me if this is unrelated.

                    Otherwise, great work, looks good, and useful!
                    David Hache aka Mortusnyte - Youtube
                    Content Creator
                    -Match-3 Blueprint
                    -Simple Checkpoint System
                    -2D Character Engine - WIP

                    "Give me your best shot... If you're prepared for the void!" -Magus, 600 A.D.

                    Comment


                      #11
                      This is cool looking forward to seeing video in action.

                      Comment


                        #12
                        By the way sameek4, how exactly are you going about this? ... if you don't mind my asking. I imagined doing it with simple matinee and blueprint and making the individual "steps" manually in photoshop, starting off with several major "steps" and then just blending the resulting color tables a set number of "steps" between each major step, maybe making them total a new LUT each hour or every 2 hours or something. If you have any ideas you'd be willing to share, I'd love to hear them. I don't have much experience programming so my approach is fairly limited. Definitely going to follow this thread, very interested in seeing your results!

                        Comment


                          #13
                          Originally posted by StrokeMeGoat View Post
                          By the way sameek4, how exactly are you going about this? ... if you don't mind my asking. I imagined doing it with simple matinee and blueprint and making the individual "steps" manually in photoshop, starting off with several major "steps" and then just blending the resulting color tables a set number of "steps" between each major step, maybe making them total a new LUT each hour or every 2 hours or something. If you have any ideas you'd be willing to share, I'd love to hear them. I don't have much experience programming so my approach is fairly limited. Definitely going to follow this thread, very interested in seeing your results!
                          Well, that is exactly what I did minus the matinee thing. These are the three ways I can think of -

                          1>Creating approx 300 LUTs , the one you suggested, with 15 main LUTs and 10-20 different LUTs between each two main adjacent LUTs. Now how will I create those blend LUT textures? Simple - Create a material with two adjacent LUTs , create a Lerp with the Alpha as a scalar param and connect to basecolor. Create a material instance and increase the parameter by ,say .1 if you want to have 10 blend LUTs between every two main ones , and .05 if you want to have 20. See the instance preview in plane form , crop the picture of the plane using snipping tool, go to photoshop and resize the pic by 256 x 16, import the pic in LUT. Repeat this by increasing the parameter by .1 or .05, until you get all LUts you want. Considering the step as 1 min per LUT , you can pretty well create 10 LUTs in a bit over 10 minutes.

                          2>Create the material as mentioned above , only the textures are parameters this time. Create instances dynamically and pass the material in C++ code , from there you can take the material basecolor value, convert it into array of FColors(if only you know how to split a material basecolor into pixels and read those pixel values in RGB format. I couldn't do this), and create a new texture using the below code -
                          Code:
                          UTexture2D* FinalTexture = FImageUtils::CreateTexture2D(256, 16, Colors, this, "ResultTexture", EObjectFlags::RF_Public | EObjectFlags::RF_Transient, FCreateTexture2DParameters())
                          Return this texture and connect the texture with the post process element's color grading factor. Do this at every tick, adjust the scalar param value according to your game time, and you might get pretty decent blends.

                          3>What I think a more feasible option and inspired from max.pareschi's suggestion above, but am yet to try out - Create the post process elements dynamically as unbound , in begin play. Store them in an array. And then in tick event, based on the current time , bind the current post process element, and in the next tick , you can bind the next post process element, and increase the blend weight slightly above 0 and decrease the bend weight of the previous post process element slightly below 1. Repeat this every tick , and at one point the previous post process element will have 0 weight and current element will have 1 weight. This is the time when you unbind the previous element and bind the next element in the same way. This should create nice realistic blend , but I am yet to try it out , so can't be sure of the results.
                          Last edited by sameek4; 04-29-2015, 01:00 PM.
                          DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
                          Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
                          Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
                          MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
                          Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

                          Comment


                            #14
                            Originally posted by Mortusnyte View Post
                            Systems like this for me are almost a must. I am not color blind but I might as well be as I seem to have no attention depth regarding colors. So for me, having pre-made color based systems is really important.
                            But what I am wondering, is if I could use this system for a 2D project that runs on emissive lighting? I do not have much experience in the lighting department or texturing so forgive me if this is unrelated.

                            Otherwise, great work, looks good, and useful!
                            I can see what you meant based on your other post. I cannot be sure , but you can very easily try this out. Just drop one post process element in your scene and scale it to fill entire scene area , add any texture you have as colour grading texture , and increase the grading intensity. If you notice any difference , you can very easily use this system for your project as well.
                            DayNight Cycle - https://www.unrealengine.com/marketplace/daynight-cycle
                            Jigsaw Puzzle Template - https://www.unrealengine.com/marketp...uzzle-template
                            Post Process Blendables Volume 1 - https://www.unrealengine.com/marketp...ndables-volume
                            MSSQL Integration for UE4 - https://www.unrealengine.com/marketp...ql-integration
                            Radar System with Minimap - https://www.unrealengine.com/marketp...m-with-minimap

                            Comment


                              #15
                              Can't you just blend different post process volumes over top each other? I don't see the need for all the in between LUTs.
                              --
                              Joshua
                              Multimedia Artist, Druid Gameworks
                              www.joshuaezzell.com
                              www.druidgameworks.com

                              Comment

                              Working...
                              X