Home Unreal Engine

Noise Texture with time node

TheMetaMorphe
polycounter lvl 12
Offline / Send Message
TheMetaMorphe polycounter lvl 12
Hi there,

This my fisrt post here so I'll introduce my self :)

My name is Charles Greivelding, I'm working in the game industry for almost 3 years now. I'm posting here because I need some technical help on UDK.

I'm trying to add variation to a TIME node combined with a noise Texture.

But the result is really bad as you can see here :

image_time_linear_01.jpg

And if I try with a nearest filter instead of the linear I've got this :

image_time_nearest_01.jpg

So the time is varying as i want but the resulting image still creepy.

Is Anyone know how to fix this issue ?

Thanks by advance

P.S sorry for my bad english.

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    what are you trying to accomplish? i never really seen a need to multiply time directly by my image.
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    I want to create a water shader using a flow map ( like l4D2 and portal 2 http://dl.dropbox.com/u/1812933/divers/gdc_2011_grimes_nonstandard_textures.pdf ). But in my process there's a popup when my two layers of nomal map intersect. Using a noise texture as a time input will make some varyation to avoid the popy thing.
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    What format did you use when importing the greyscale texture? Try greyscale, it basically allows you to import 8 bit (think of one channel from RGB) textures uncompressed.
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    It's already a greyscale texture but thanks for your help.
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Maybe Is shouldn't use a multiply, but what can I use to achieve that ?
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    you will need more than a greyscale for a flowmap since you want to offset on both x and y axis on the texture.

    check out this thread

    http://www.polycount.com/forum/showthread.php?t=91566

    lots of discussion on valves flow maps and how to create the map it;s self and the shader in udk.
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    No it's not about the flow map. I've got my flow map. Everything works fine except that pop up when my layer intersect each other. I want to offset the time with a noise texture like they did for portal 2 to avoid the popping. My problem is that I don't know how to use a texture as a time input. For now I'm using a time node multiply with a texture noise but the result is messy.

    P.S thanks for the link btw.
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    i think i see what you're trying to accomplish - you want to add some randomness into your time function so that it doesnt just go up linearly? if so then i dont think there's any way of doing that with a texture. time is just a single value and a texture is a 2d map of values.

    try combining other types of inputs with your time node - sin cos perinstancerandom etc. for example if you just add 2 sin waves of varying wavelengths to your time node it will appear to go up by inconsistent amounts - it helps if you visualise the graph of the values you're drawing - time is just a straight line going up at a constant rate.

    if, for example, you wanted to multiply a noise texture over your material and have the intensity of the noise vary randomly with time then you'd probably want to multiply 2 different sin waves together and then multiply your texture by that - by using waves you ensure the values remain in the 0-1 range and you wont get anything overblown etc. end result is a noise texture that varys intensity with time in a random (or what appears to be random) fashion - add a panner so it's not always in the same place and i think you should get what you want.

    hope that helps
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    try taking a look at the M_FilmGrain material that is included with UDK there is a example of editing time wit ha texture there
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    In fact I want to offset the time by a noise texture. As you said time is linear that is a fact that I don't want to change but I'm sure it's possible to offset the time like this exemple : http://www.chrisalbeluhn.com/UDK_Mesh_Paint_Tutorial.html.

    As you can see the time is multiply by a vertex color for offsetting the time so each arrow starts in a different moment.

    If I do the same with texture ( whith red channel only ) it works but only if the texture use the nearest filter.

    Thank you guys for your answers ! I'll let you know If I found the solution ;) .
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Wow, something strange append ! It appears to fully works if try it by pushing the play button.

    udk_03.jpg
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Well in fact It become ugly as the time is running out...
  • Drew++
    Options
    Offline / Send Message
    Drew++ polycounter lvl 14
    Your problem is you're multiplying on a texture map, not the coordinates. If you want to just have moving and noisey texture coords, you can do something like this. You can use that "New Texture Coords" on a diffuse texture, normal map or use it to refract. Whatever you want really...
    You can use 1 noise texture, or as many as you want...
    Hope this helps some. :P
    noiseShader.jpg

    Here is how to simply move some texture coords...
    movingCoords.jpg
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    right - i've had a look through the portal2 document and i think i see what you want to do - add the noise texture to the time node then plug into a sin. then use the output of that to control the uvs of the flow map. the flow map can only distort the uvs so far before they become stretched so they have to pop back to the start of their cycle - the noise texture helps break this up so that the popping doesnt happen everywhere at once.

    the second bit the noise map is used for is as a soft edge mask to break up the hard edge where the texture is popping. not sure i could tell you how they did that without having a play and doing it myself though...
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Thanks Drew++ ! But it's just panning :p.Here's what i want : [ame="http://www.youtube.com/watch?v=oRBhbNks67U"]UDK time offset with noise texture - YouTube[/ame]

    But as time goes on the texture become ugly like my first shot.

    tharle : Yes it's exactly what I want !

    So i've try this and that is work fine. It can be an alternative solution until we found the best way to do it like valve did it.

    udk_04.jpg

    P.S sorry for my bad explanation and my bad english.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    You could use the same basis of the transition or dissolve method to achieve what you want.

    http://udkc.info/index.php?title=Tutorials:Dissolve_Material_Effect

    The original use of this effect is for a dissolve effect, but if you mix around stuff (instead of fading to black/white, you fade it into another texture) you should get what you're looking for.

    The only problem I could imagine is trying to get the textures/channels to loop properly at correct intervals.

    I'm not sure how you would do that, the best bet I have that you could make a copy of the said setup and make it so that they're controlled by a Sin node, so that while one setup is playing, as soon as it reaches it's half life point, the second setup will merge over, and once the first material goes back to the start, the second will merge out again, so that it looks like it's looping.

    However, it can get pretty messy, and most likely, it's extremely grindy work, so someone might have a better, much more streamlines approach to this method.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    basically anything you connect to a time node that uses the raw time value into an output, (ie not taking the sine of time or some other bound limited function) will start to look like crap very quickly. Due to how the time node's value increases without bound.

    before you ask, udk's panner and rotator nodes have the bounded behaviour built in.
  • LoTekK
    Options
    Offline / Send Message
    LoTekK polycounter lvl 17
    Yeah, what Vailias said. You'll need something like Sine, Cosine (even Frac, depending on what you're going for). Otherwise after a short while you're multiplying by 100, 200, 1000, etc, instead of the desired 0-1 (or -1 to 1).
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Thank you all of you for your help. For now I didn't really get what I wanted but I think i'm close.

    Here it is : [ame]www.youtube.com/watch?v=mMDSEN_PAns[/ame]
Sign In or Register to comment.