Home Unreal Engine

Simple question about materials; not sure how to search for it

Qwiggalo
polycounter lvl 8
Offline / Send Message
Qwiggalo polycounter lvl 8
I'm making simple rain for my level, that's not really important, but I have a panning texture sample, it's great, I'm happy with how it is. My material is translucent and I want to add an opacity mask onto the entire material as a gradient ramp from 0 to 1 in V, how would this be done?

The reason for this is so when you look up the end of the planes that the rain is panning on isn't easy to see. I've made it easier to see in this image.

rainfadeout.jpg

Replies

  • Visceral
    Make a gradiant in photoshop, multiply that with the current mask and plug into Opacity?
  • Qwiggalo
    Offline / Send Message
    Qwiggalo polycounter lvl 8
    Is there a way to make a gradient without making a texture? That's what was getting me stuck, something as simple as that seems like a waste of resources to import a texture for it.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    Qwiggalo wrote: »
    Is there a way to make a gradient without making a texture? That's what was getting me stuck, something as simple as that seems like a waste of resources to import a texture for it.

    mask out 1 channel of a texture coordinate.

    either red or green depending on the direction you want the gradient, than you can flip the gradient if needed by useing the -1 node, and if you need to tighten the gradient use the power node.

    hope that helps.

    screens_20111102140910.jpg

    screens_20111102140947.jpg


    you may want to also constant clamp the result between 0 and 1 i think there might be some above 1 and beloew 0 values in there depending on how the texture coordinate is set.
    screens_20111102141047.jpg


    vectors in UDK, and images are interchangeable only difference is some vectors will be above 1 or below 0 with some of there values so they will need to be clamped if you want to use them in a non standard way.
  • Qwiggalo
    Offline / Send Message
    Qwiggalo polycounter lvl 8
    Yeah that helps, thanks!
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    you call also change the values in the texture coord to move the gradient up so it goes from white to black to white again, just change the V tiling value to above 1.

    V is the green channel and U and the red.
  • Qwiggalo
    Offline / Send Message
    Qwiggalo polycounter lvl 8
    I was really close to figuring it out, I just didn't know that G on a mask is V and R is U.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    Qwiggalo wrote: »
    I was really close to figuring it out, I just didn't know that G on a mask is V and R is U.

    well just think of the order

    UVW to RGB or in the case of the texture coordnate just UV and Red and green

    the same goes for vectors in of world coordinates

    XYZ RGB

    expect in that case it is more obvious since if you look in the bottom corner of any 3d viewport in udk you can see the XYZ using RGB for it's color coding.
Sign In or Register to comment.