Announcement

Collapse
No announcement yet.

Lightsaber

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

    Lightsaber

    I saw the new Star Wars movie and played some Jedi Knight 2 again and thought I'd try to make a lightsaber in UE4 as just a bit of fun.



    It's got:
    * a glowing retractable blade
    * animTrail emitter for more impressive visuals in motion
    * attached light
    * changeable colour with 1 variable
    * emissive burn marks on walls that fade away
    * particles of burnt stuff when hitting something

    I used a placeholder character I'd done previously for something else that already had some sword animations and put a couple in just to show off motion. But I guess the only non-obvious part of how it's done is the wall decals part, for which I don't just put in the decals at every line trace location per frame, but I add the locations to an array and then calculate how far apart two successive points are and split the difference several times and add in additional decals if the points are far enough apart. That creates a more consistent line at lower framerates, although still not the ideal solution. Originally I wanted to use much fewer decals and stretch them between two successive line trace hit locations, but I couldn't figure out the right vector math to rotate them correctly. (I really don't like 3 dimensional vector math.)

    Oh and the material for the decals looks a bit like this:
    Click image for larger version

Name:	28f7139e43a8975dc961b76a0e64ee1e.png
Views:	1
Size:	182.8 KB
ID:	1169121

    The top half gives it a breathing effect (although it's hard to notice with the relatively fast fade away) and the bottom half makes it fade out over time, so there's no instant disappearing. Also I noticed that small decals fade away really quick when you move away from them, so I used a small white circle on a big black background for the opacity so it would be "bigger" and be visible from further away.

    #2
    hahaha nice one XD, you could make some emmision of particles on contact with surfaces (well I mean it could be tweeked some more and the sound xD could make it more TADA)
    Last edited by tyoc213; 12-24-2015, 12:27 AM.

    Comment


      #3
      liking your lightsaber too I am.

      Comment


        #4
        Do want
        Storyteller - An immersive VR audiobook player

        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

        Comment


          #5
          Ok now that is cool!
          Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

          Comment


            #6
            That is just awesome on every level. Reminds me of the effect they used in Jedi Outcast II I believe it was but way better. Awesome work man.
            Demented owner and founder of NeoSpawn Games
            Current Project: Project Yami (place holder title) Next-Gen Fighter using UE4
            FanPage: www.facebook.com/NeoSpawnGames
            Official(under construction): www.neospawngames.net
            Personal FB: http://www.facebook.com/Keiyentai
            LinkedIn Profile: http://www.linkedin.com/in/Keiyentai

            Comment


              #7
              This is awesome. I enjoyed that in the JK games as well. Nice work. =)

              Simulacrum Game | Play The Alpha | Caldera Entertainment | Twitter | ArtStation

              Comment


                #8
                Nice!
                Definitely reminds me effect from JK
                SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
                Level design and prototyping for newbies

                Comment


                  #9
                  Someone asked if I could share this and I have no plans for it, so I figured why not.
                  The project is done in 4.10 and the files are zipped up with 7zip. Here's a link to it: https://drive.google.com/file/d/0B1T...ew?usp=sharing
                  It's messy and partially commented, but it shouldn't be too hard to figure out.

                  I think the only controls are these, if you can't find them in the character BP: Left mouse + ctrl/alt/shift for attacks. Spacebar and hold for jump. 1 for turning on the blade. 2 for changing colour. 9 for options, 0 for show fps.

                  Comment


                    #10
                    How did you Animate the retractable Blade? I cant find it in the project.

                    Comment

                    Working...
                    X