Home Unreal Engine

[UDK] - DoF on Translucent materials ?

polycounter lvl 14
Offline / Send Message
GoSsS polycounter lvl 14
Hey !

I'm having a problem with DoF and translucent material in the UDK (with DX11).
It seems that translucent materials can't be blurred the right way. I explain with an image :

Problem_DoF_Translucent.jpg


As you can see, when I'm using an opaque material, the object is blurred because out of focus (exactly what I want), but as soon as the material is translucent .... the dof is acting on it exactly like on what's behind the translucent object :(
(it's working on the right side of the translucent pannel because the wall behind is blurred as well).

I tried using the Allow translucency DoF in the material editor but it changes nothing :(
Any clue on what I'm doing wrong ? (if there's a way of doing it :D)

Thanks in advance !

Replies

  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    does it work with a masked material or additive?
  • GoSsS
    Options
    Offline / Send Message
    GoSsS polycounter lvl 14
    It's not working with additive material, but no problem with mask (but I can't use masked material on this one).
  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    the train part looks blurry to me isnt that what you want ?
  • GoSsS
    Options
    Offline / Send Message
    GoSsS polycounter lvl 14
    Nop, because as you can see if I apply an opaque material, all the pannel is blurred (even the text : next .That's what I want).
    But when this material is set to additive or translucent, this part become sharp because what's behind is neat.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    i will try to make a similar material and test it out today, and see if i can figure somehting out.

    what UDK Build? im working on August ATM
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    just dropped a plane with a translucent shader i made into a test scene in the august build and it worked fine with both the additive and translucent modes.

    screens_20111009093921.png

    the "Allow Translucency DOF" option actually had no effect DOF effected it with it on and off. it must be a issue with your UDK build.
  • GoSsS
    Options
    Offline / Send Message
    GoSsS polycounter lvl 14
    Is the translucent plane the blue one ?
    I think it's blurred because what's behind, is blurred as well.
    Just try to put it really close to the camera and try having it neat and the background blurred, or having the background neat and the plane blurred.

    By the way, I'm using the august build as well and thanks for taking time to test it ;)
  • e-freak
    Options
    Offline / Send Message
    yes, try putting a translucent material in the blurred foreground with a focused background behind it won't work (afaik). That is, because the DoF attacks dependend on the zBuffer and translucent materials don't render into the zBuffer.

    If you're doing this for a game, probably not worth the time to fix it. If you're doing this for a cutscene, try making a seperate blur controller for the material and animate it's strength in matinee (using Material Params Track). If you're doing this for an offline rendering, render it in passes :)
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    haven't been able to break it sofar, do you maybe got something else in your post-process chain messing it up.

    maybe try simplify the post-process set-up to just include the DOF.

    here is a other shot of my translucent plane half blurred half not.

    screens_20111009131923.png

    also dont know if it makes a difference but im using a older card so i only got dx9.



    EDIT: NVM what e-freak said.

    if you look at my last shot parts of the translucent material that are in focused also have the contents behind them infocus too which shouldn't be.
  • GoSsS
    Options
    Offline / Send Message
    GoSsS polycounter lvl 14
    @e-freak : :( It is what i was worried about :D
    I think I gonna go for your second method (animating the blur on the material)

    @passerby : On your screenshot what I see is your translucent plane going from neat to blurred ... which is wrong because it's all on the same plane; so it shloud be all neat.

    But the top part of your plane is blurred because all the objects behind this top part are blurred as well =)
  • Condefruit
    Options
    Offline / Send Message
    Gosss, you should try to play with the DOF focus parameters, with good settings you should be abble to fade avay the bloom due to interpolation :D.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    oh hey.. try the checkbox
    "Use Lit Translucency Post Render Depth Pass "

    Specifically says in the tooltip its for making sure DOF and such renders correctly on translucent objects like hair.
Sign In or Register to comment.