Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93

    Question UDK Lightsaber (Geometry/Material Based)

    For kicks and giggles, I've been dreaming of a Lightsaber like effect in UDK using cylinder for the blade and then maybe using some clever material manipulation for the colored glow effect.

    I figure the emissive channel in the material editor holds the key to this effect but for the life of me, I can't seem to figure out how to even get started.

    If this is the case I remember seeing how the Emissive channel can be set to actually emit light which would make the effect all the more cool if it work.

    I'm looking through tutorials about making Materials in UDK/UT3 and have so far gotten my self very confused.

    Please note, I'm not looking to make this into a weapon, yet if at all, I just want a prop that I can place somewhere in the level for the time being.

    Anyone have any ideas?

    I guess the same effect can be done with a beam emitter but I'd like to try this with Geometry and materials first.

    Oh and one last thing, I did read the other threads that had the word Lightsaber in them and no usable info could be found in any of these.
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

  2. #2
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93
    Grrrr. I tried a lot of things to try and get this to work via material and getting to know the material editor a little bit better. Still no joy.

    Bummer...

    Still trying however, and Willing to try anyone else suggestions if anyone has any. It's helpful for my general material understanding to try working with materials as must as possible.

    Anyways, take care y'all.
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

  3. #3
    Join Date
    May 2008
    Location
    Ely, UK
    Posts
    2,547
    To do the material you need to get something like a constant 3 vector and plug that directly into the emissive channel. Alternatively you could use something like a vector parameter to set the colour and a constant 1 vector to set the brightness, both plugged into a multiply which is in turn plugged into the emissive channel; this will give you more control, especially if you want to use matinee to change the colour over time.

    The trick in getting something to emit light in game is to use a static mesh, under Static Mesh Component: Lightmass: Lightmass Settings, you need to turn on “Use Emissive For Static Lighting?” When you build the lighting again it will be emitting light. There are some videos covering the exact details of Static Mesh Lightmass Settings but basically you want to fiddle with the “Emissive Boost” as your brightness, and your “Emissive Lighting Falloff Exponent” as your falloff stuff.

    Hope that helps! Remember it only works on static meshes (It may work on other meshes as well, I am unsure)

  4. #4
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    To get any sort of glow effect (bloom), you need to overdrive the value passed to the emissive channel. That means the color values should be well over 1.0. The further over 1.0 the more bloom. Then adjusting the Bloom scale in the post processing settings will give you the ability to further adjust the amount of bloom. Also, be aware that any light emitted through using lightmass is completely static, i.e. baked into the level, and will not update should the object move...but then if it is a static mesh it wouldn't be able to move anyway.

  5. #5
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93
    @NATO:
    I actually thought that too. Went with the Vector Parameter Version so that I could control it later for color. I Would hope (Maybe misplaced hope) that I can use the "Use Emissive" for lighting, but looks like it's for static lighting only which wouldn't work if I actually turned this into a weapon for a Gundam Cinematic Scene or something. OOPS... Forget I said that last bit...

    When I plugged in the Vector Parameter into the Emissive channel It at first did nothing. I also set it to be unlit, but the Emissive color totally took over and no soft glow around it.

    I'll give what you said a try however.

    @Jeff, Errr, I mean ffej =):

    Bummer, hmm, Is there a way to attach a dynamic Light to a Skeletal Mesh which is then socket to a character for a cinematic and get the same result?

    Also How adversely both visually and performance wise would it effect the rest of the level? Would I be able to notice it much? Actually I guess not notice it much, but it may be something I would want to try and keep minimal if it effects performance adversely.

    I'll give both of these a try and see what happens.

    Thank both of you for some ideas to work with.

    I'll keep you posted. Then again I may never really get around to using this anyways seeing how I have such a short attention...



    What was I talking about again?
    Last edited by ninjabuntu; 03-30-2010 at 02:56 PM. Reason: too same taps of the spacebar it seems
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

  6. #6
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93
    Okay, Well Here is an update. It seems that I wont see any sort of glow in the material editor no matter how high I crank the values up. I can deal with that I guess.

    After Taking into mind the suggestion that NATO said, I got this basic start material made.

    I'm comfortable with my Sith side so for this test I'm using red as it's easier for me to see.



    I cranked the Value up using the Constant like he said which should in theory overdrive the color via the Multiply

    As I said before. The Emissive Color totally takes over the color, but then I also have nothing in the Diffuse anyways. That may be an issue.

    So after i discovered that this glow effect wont show up in the Material editor, I then put it on a testing Item I made for this test. In the Spirit of the effect I am going for I made my self a really basic Lightsaber Hilt+Blade. It's not for the Final effect and it took me all of 5 minutes to make.

    Here is what I got in game...



    I didn't try Jeff's Suggestion about the Post Proccessing for a bloom effect, but as you can see, sure enough the blade is glowing...

    ...ISH

    Now I see two issues with this effect. one you can plainly see in the image above and one I didn't grab a screen shot of.

    The First is that the Color totally takes over the effect. There is no white (Or close to white which ever the case may be) hot spot inside the glow. This is only half the battle, and I'm guessing it's going to take more then just overdriving the color in the Emissive Channel to achieve it.

    It is however a good start.

    The Second issue is. While we are close like this the effect is fine. However From a distance, The Glow seems to scale up the further away you are. at one of the corners of my testbed level. The glow also encompasses the entire hilt as well.

    Hmmmm....

    My question is now, mostly how to get that Hot Spot effect in the material. the next would be how to reduse the scaling up the further away you are issue I'm having.

    The more important would be the Hot Spot however.

    I'm wondering is giving the Material a Constant White for the Diffues would help with this effect. also I don't think I set this to unlit yet. Would that also help? Hmmm...

    I'll keep you all posted...
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

  7. #7
    Join Date
    May 2008
    Location
    Ely, UK
    Posts
    2,547
    Try lowering your colour variables to more like (RGB) and 0.5, 0.1, 0.1 making the constant 3 vector more gray red. Then crank up the constant 1 vector to get the heat.

    That or try a LERP.

    Jeff will tell you how those work, because I have no clue. I just know they can be used to get that kind of gradient affect.

  8. #8
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    I would probably try using fresnel expression as the input to a Linear Interp expression with the white (or lighter color) as one input and the red (or whatever color you need) as the other (these would be the A & B inputs, but I can never remember which one is which). That should blend between them based on whether the normals of the mesh are facing the camera.

  9. #9
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93
    @NATO:
    What you just said doesn't make a Pastel Red but rather a Very pale blue. with the effect cranked up x25, it almost washes out the blue close up and it hardly blue from a distance. However it is a hot spot. here I'll show you...




    Please forgive my ignorance on this one but whats a LERP? I looked through the expressions list that you get via Right Clicking and in the Area Below the Node workspace for anything with those letters and can't seem to find anything like that.

    Maybe Jeff could be so kind as to drop by and enlighten me which in turn make my Material light up properly.

    Anyways it looks Like I'm getting closer to the goal in any case, and I really want to thank you for your help...

    Hmmm...This gives me an Idea...
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

  10. #10
    Join Date
    Jul 2009
    Location
    Salt Lake City, Utah
    Posts
    93
    HAHAHA. I was thinking Fresnel too. However I am not too sure just how to make use of this properly yet. Oh well guess theres no time Like the present to learn how to use this expression. After all wasn't that my goal all along anyways?
    When all else fails... Keep Shooting at it...

    Pipesfranco's Awesome Maya/Mudbox/Photoshop/UDK Videos
    [ Vid01 | Vid02 | Vid03 | Vid04 | Vid05 | Vid06 | Vid07 | Vid08 | Vid09 | Vid10 | Vid11 | Vid12 ]
    (And more on the way...)

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •