Home Technical Talk

Reflective metal in UDK / Alpha backfacing question

Hey all, I've got a couple questions regarding material setup in Unreal.

Firstly, what would be the best way to approach a decent metal texture. Specifically a wheel rim / bike frame. Obviously I don't want mirror-chrome but some subtle reflections would be cool.

Secondly, Is it possible to get an alpha'd texture to be visible as double sided?

For example, I've got some wheel spokes on an alpha'd plane, one each side of the wheel and I'd like the back of one visible through the other if you see what I mean so you kinda see the back of the other spokes through the front of the facing spokes.

I'm guessing it's just down to being a double sided material?

Thanks

EDIT: Sorry, this really should've been posted in the UDK thread.

Replies

  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    Regarding the double sided question, it's best to use masked material (ie 1 bit alpha) if you plan on making the material double sided. As transparency causes sorting problems with double sided. At least that's what I've noticed.
  • Tom Ellis
    Options
    Offline / Send Message
    Cheers Xendance,

    Yeah I'm using a 1bit alpha but I'm pretty sure I've got the channels set up wrong.

    I'm plugging the alpha of my diffuse into the opacity mask mat channel and then the blend mode is set to masked.

    The alpha comes out fine but it's not showing as double sided.

    I'm not sure if that's down to alpha sorting or whether I've got it wrong.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    there should be a tick somewhere in the material setting for 2-sided material, if i remember correctly.
  • Tom Ellis
    Options
    Offline / Send Message
    there should be a tick somewhere in the material setting for 2-sided material, if i remember correctly.

    I hope you facepalmed while you typed that :D

    Can't believe I missed that, it's right below the drop-down I had to change for blend mode.

    Thanks man!
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    for the reflection you should start thinking in mathematical terms. you will most likely combine it with your diffuse or specular texture in some simple mathematical way.
    if you use add the reflection will be more like chrome the brighter the reflection pixels are. if you darken the reflection by multiplying it with a value below 1 the reflection will become less prominent since you are adding less of it to the final diffuse or specular term. it will still reflect things like a mirror, just be less visible.

    if you want i can post a simple network once i get back.
  • Tom Ellis
    Options
    Offline / Send Message
    Thanks divi, yeah an example would be much appreciated.

    I'm totally lost, apologies!

    So what nodes should I be using for reflections? Presumably I can use that along with my spec?
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    2010-09-21_2145.png

    this would be your basic setup for a reflection. if you were using a cubemap you would skip the component mask, but since i want a 2d texture to be reflected it's needed.

    by multiplying it with the spec map we're determining where things should be more or less reflective - just like the normal use of a spec map is mimicking.

    you could then multiply it with a constant for tweaking and a) plug it into the spec slot - that way it only shows up when the camera is somewhat facing the light or b) add it to the diffuse texture and plug the result into the diffuse slot. that way there will always be somewhat of a reflection ( you can tweak that as well by using a fresnel to lerp between the diffuse with reflection and the diffuse without to get some of that "more reflective at an angle" back).

    experiment with what gives you the specific surface type you want. if necessary clamp the network before plugging it in in case you got out of the 0-1 range somewhere which will give you ugly artifacts.
  • Tom Ellis
    Options
    Offline / Send Message
    Awesome Divi thanks man, I'll post my results when I get my scene set up in UDK.

    Thanks again.
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    Select the plane with the spokes on it, duplicate it and flip it. From what I've heard (from reliable sources), double sided rendering is more expensive than just duplicating the polygon and flipping it, plus it doesn't light correctly.
  • Tom Ellis
    Options
    Offline / Send Message
    Thanks Justin, I wasn't aware that was the case.

    Unfortunately the asset in question is for a competition with a limited tri-count and I'm right on budget as it is.

    Although if as you say the lighting looks wrong then I may have to cut some polys somewhere so I can make room for the duplicated spoke planes.
Sign In or Register to comment.