Announcement

Collapse
No announcement yet.

LightHunter MegaJam Project breakdown

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

    [GAME] LightHunter MegaJam Project breakdown

    It took some time for me to get back to the forum and Unreal community. I was already on my way to quit on this idea, but since I have a follower (YAY!) there is no way back!
    I promised to post a project breakdown and here it is!

    First of all here is a complete walkthrough for the project:



    Packaged game download link:

    https://www.dropbox.com/s/sfjcin6dqi...unter.zip?dl=0

    And some artstation screenshots:

    https://www.artstation.com/artwork/3WJlE



    Now let's get right to it!

    Light platforms:



    This effect is a combination of 2 materials and some BP programming:

    Button Sphere material




    Opacity masking makes the most work here. The mask consists of two multiplied pieces: distance to nearest surface node lights up surface intersections and animated by panner and sine noise adds life to the effect:



    Also I added opacity multiplier (just masking was not enough) and camera depth fade, so the effect will not interrupt gameplay:



    I used the same material for the reverse time effect, so I added a static switch parameter for the color:




    Platforms material




    And again masking! First there is a primary sphere mask and a secondary sphere mask with a smaller radius. Secondary mask is inverted and cutted out from the primary by multiplication, the result is we have a sphere edge with controlled thickness as a mask. This edge is used for burning emissive in the places where button sphere intersects with platform. The primary sphere is used to cut off the platform. If the button sphere intersects the platform, it starts to send parameters to the platform dynamic material - SphereCenter and SphereRadius:



    There is a second masking group here. As soon as button sphere overlaps a platform, timeline animation for the dynamic material starts. "If" node is looking for which pixels of the noise texture are lighter then 1.1. With ShowAmount = 0 all pixels in a noise texture are in 0 - 1 range. With ShowAmount = 0.11 some pixels will become 1.11 wich means they are visible for the "If" node! And there is additional "If" mask which moves with 0.1 delay and is multiplied by main mask that gives more burning emissive edge lines:



    Final mask multiplier is camera depth fade. Platforms should not block the view:



    Sphere mask edge is also used as input for world position offset, so it looks like platforms are building from outside world and not just appearing:



    Base color and emissive. Unlike opacity masks, emissive masks have to be added to work together:





    That's it for today, will continue tomorrow. Thank you and have a nice masking!

    This is a game made by me in 6 days (about 38 hours) for Unreal Engine game jam. Game jam theme was "However vast the darkness, we must supply our own light". Most of the time I spent on leveldesign and shaders. It was a really fun experience. I

    #2
    Once again, hi all!

    Jumping platforms is fun. Jumping disappearing platforms is pain in the ***, especially at start. I was building room connections, so the player could always get back where he was before, but this backtracking was very frustrating. I had to solve this problem somehow and the ability to reverse time was the answer!

    Reverse time mechanics


    Since only player pawn is affected by time manipulations, all the logic is inside the character. Base for this effect is "poseable mesh" component:



    Cool thing about the "poseable mesh" is that all bones transforms(but we need only rotations) can be written and read. If poseable mesh have master pose component set - it mimics master bones transforms. I use action input as an indicator of what we are doing now - writing or reading transforms info:



    ReadWriteCue function is executed every tick:



    I store transforms info for every tick in structure array:



    The structure itself consists of the next parameters: actor transform, all bones rotations and all bones names. All other stuff is left overs from the plan to make time affect everything in the world and not just character. I didn't find a way to get all bones, so I had to write all names manually - I changed the mannequin to Owen the last day of gamejam and forget to include his belt bones, so they are just frosen when the time is reversed



    When the time is in normal state ReadWriteCue function adds new AllCues array element with info about all bones rotations and actor position. If AllCues array is longer then 2000, first index of the array is removed. Everyone who played the game asked for how long we can reverse time? the answer is for 2000 frames!



    When player press R button, ReadWriteCue function starts to read AllCues array, moving player character back in time!



    The sphere around the player uses the same material as spheres from the previous post.

    That's it for today, will continue tomorrow. Thank you and have a nice Time Shifting!

    Comment


      #3
      New day and new post!

      The whole level is constructed from X oriented cubes of diferent scale and from the begining of project I knew: If I deside to use some textures I'll try to make them Triplanar, so I can texture everything at once.

      Automatic walls and floor material!



      I took cool metal textures from substance share and feed them to my custom material function that uses vertex normals to decide is this a floor or a wall:



      Two "if" nodes to find the plane this side of cube aligned to and a bit of math to scale UVs to world scale:



      Walls can be aligned to XZ or YZ plane:



      And floor is always aligned to XY plane:



      The next trick took me some time to figure out - if you use a texture input for the material function It doesn't have a UV input in it. So texture input and UV can be combined in "Texture Sample" node:



      Second "If" to find is it wall or is it floor based on Vertex Normals blue(z) channel:



      That's it for today, will continue tomorrow. Thank you and have a nice World Aligning!

      Comment


        #4
        Hi, forum! Today the post is about post..Post Process!

        Post process!

        Here is a screen with PP enabled:



        And with PP disabled:



        Huge difference! But all I did was just some depth of field, small auto exposure tweak and simple post process material:



        Post process material darkens objects based on the scene depth. I wanted to start darken the scene from 1000 units away from camera (the camera is 700 units away from the char, so we could see the char and some objects under him), so i substracted 1000 from the scene depth and then clamped - lerp input will stay 0 untill scen depth is less than 1000. Then I devided clamp by 1000 - scene depth is now mapped from 1000 to 2000 as 0 to 1 for the lerp :



        That's it for today, there is not much left, so will probably continue tomorrow. Thank you and have a nice post processing!

        Comment


          #5
          Sorry I didn't mention it sooner, but thanks so much for this!

          Comment


            #6
            JuniperRane , nice to know that somebody learn something from my post!

            Comment

            Working...
            X