View Full Version : Random Flickering
10-15-2010, 01:56 PM
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.
Adam L. Gray
10-15-2010, 02:08 PM
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 :)
10-15-2010, 03:01 PM
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.
10-15-2010, 03:29 PM
Sounds like you got what you want, but I happened to have an example already uploaded. so here it is:
10-15-2010, 05:27 PM
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
10-15-2010, 06:57 PM
Ah, when you said random I figured you meant something more like so:
and not a fast and constant flicker :p
10-15-2010, 11:04 PM
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
10-16-2010, 07:42 AM
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 < (http://i55.tinypic.com/rh96pk.jpg)
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 :)
10-22-2010, 05:50 AM
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
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.