Home Unreal Engine

Random Flickering

polycounter lvl 11
Offline / Send Message
jocose polycounter lvl 11
I'm trying to get some random flickering to occur on the opacity of my material. Right now i'm using Sin and time to get a "pulsing" effect but I want it to be random.

Anyone have an idea of how to set this up?

I didn't see a random node.

Replies

  • Adam L. Gray
    Options
    Offline / Send Message
    Well, you can't get it completely random, I think.. But you can use multiple sines with different time increments, then add them together. Should give a more random'ish result.

    And should multiple sine's flash simultaneously, giving a 1+ strenght to your constant output or whatever we should call it be a problem, then a clamp should prolly be able to sort that out :)

    Cheers
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    Thanks man, wasn't exactly what I wanted but I manged to get a pretty cool effect this way. Will post my shader for review when I'm done.
  • cholden
    Options
    Offline / Send Message
    cholden polycounter lvl 18
    Sounds like you got what you want, but I happened to have an example already uploaded. so here it is:
    http://chrisholden.net/udk-simply_neon2.jpg
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    Thanks Chris,

    That's probably a better way to do it. I'll look into re-doing that part of the material. It's almost done, then I'll post in my hallway post as an update.
  • Adam L. Gray
    Options
    Offline / Send Message
    Ah, when you said random I figured you meant something more like so:

    19684206.gif

    and not a fast and constant flicker :p
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    is that from inside unreal tiros, and if so could you post your sin wave setup. I'm curious to see how it compares to mine.
  • Adam L. Gray
    Options
    Offline / Send Message
    Yeah, that's from inside unreal, I didn't save it I'm afraid, but I could give you a quick rundown.

    What I did was basically use the same setup as Chris did there, only, as mentioned in my first post, I used multiple sines instead of one.Each one with their own time interval. Then I used the 'Add' node to add all those sine's output together, and hooked it up to the clamp.

    Actually, I'll just open up udk here and show you, would only take a min I guess.

    > Cleek <

    It seems I weren't able to remember the exact numbers, therefore not getting the exact same results here, but it was more or less something like this. Just try playing a bit with the numbers until you get something that's nice basically :)
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    something ive found a bit "unwanting" with sine nodes is that if you're putting any color into them, they will become inverted. understanding that a sine wave goes from 1 to -1, you'll see the inverted color at the <0 values, or it will end up remaining black or white longer than it should. a bypass for this is to just add 1 or 2 to the node, this way the entire wave will move up to 2-0, or 3-1. generally you just want it to stay within a positive region of the graph. after that then you can clamp it down to whatever values so you dont get any overexposure on the material. just something to keep in mind.

    personally i take sine waves and mult x2 (reducing it to .5 -.5) then add 1.5 or 2.. and continue from there
Sign In or Register to comment.