Home Unreal Engine

Best tool/settings for displacement maps

ngon master
Offline / Send Message
almighty_gir ngon master
just wondering what tools other people use, and the settings therein to generate their displacement maps for the UDK DX11 features.

also, what changes need to be made within the material editor (multiplication nodes etc) to make the map more functional.

Replies

  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    well there are 2 ways of going about displacement. you can use a bump offset and plug in either the r g or b channel to your height in the bumpoffset (not the RGB, has to be only 1), and that works............................................or for dx11

    here's a pic of what i did to use tessellation and subsurface scattering in dx11
    SSS-ex2.jpg

    for the world displacement, plug the blue channel of your normal map to a lerp between 4 and -4 of a 3vector and then transform it. then the tessellation factor should determines your outer and inner triangles of the dx11 tessellation, based off of the 2vector. this method does not require a displacement map at all.. just a normal map, however there are ways to do it with displacement(height)maps too.

    havent done it this way but seems it works
    http://www.mypicx.com/uploadimg/1396652404_03122011_1.png

    generally i would assume to use the normal map method for something extremely organic like a character, but anything like rock/stone/anythingotherthanacharacteriwouldthink is probably best to use a normalmap, but i guess just play around with it and see what looks best
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    for some reason the link you posted doesn't work. i actually made a shader network that makes the mesh tesselate depending on camera distance, and it worked really well. i'm just curious about other peoples "best practices" since this is relatively new to people who aren't working in studios, i'd guess.

    i'll post my network shortly.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    okay, so i baked my test hightmap with xNormal, and it turned out okay, except that it seems to show some of the low resolution triangulation in the map.
    dragon_hightmap.jpg

    i don't know if this is a normal thing, as this is my first real try with displacement/hightmaps.
    anyway, i placed that in the alpha channel of the normalmap. and then made my shader network, as you can see the tesselation result is really nice, i wish i could record it because it's so smooth in realtime it's great!

    dragon_test_1.jpg

    dragon_test_2.jpg

    dragon_test_3.jpg

    dragon_test_4.jpg
  • Visceral
    Options
    Offline / Send Message
    Your bake looks really weird, i would look into that before going any further.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Turbo smooth your model at least 2 times, and use the interactive height map option.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    oh wow thats a pretty cool method of doing the tessellation factor.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Ace-Angel wrote: »
    Turbo smooth your model at least 2 times, and use the interactive height map option.

    that's given me a muuuuch nicer result, thanks a lot man!

    looking forward to playing around with this more :D
  • darthwilson
    Options
    Offline / Send Message
    @Oniram - Loving your DX11 stuff here, just a few questions..

    In UDK is this Flat Tessellation or PNTriangle Tessellation that your using?

    If it's flat tessellation then how are you not getting the horrible seams bug?

    Keep up the awesome work.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    @darthwilson: to be quite honest im not sure if its flat or triangles. regardless of that i dont think there was too much of a difference because i know i tested both just to see what they did.

    in regards to the seams.. it could be that since my seams in the UVs are welded it doesnt split them when tessellating, but i cant be 100% positive about that. im pretty sure the splitting has to do with some mix of smoothing groups and UVs but i havent played with tessellation enough to figure it out to that extent.
  • darthwilson
    Options
    Offline / Send Message
    Fair enough, I have tested both PN and flat tessellation. Another question actually. When you used a displacement for your character, did you get a blobbing effect? When I applied mine, my mesh expanded big time.. The only way to fix this was to use TINY values for the vectors that were plugged into my lerp node.

    Thanks for the reply =)
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    yeah that has to do with the scale of your model. scale it down and you'll be able to use not so tiny values.

    the same thing happened when i first tried it out. you'll notice that as you scale the model you'll see it moves along its normals like the push modifier in 3ds max.
  • darthwilson
    Options
    Offline / Send Message
    Thanks! I've scaled my mesh to the standard size of a character for Unreal (96 units) however not much help.. Do I need to re-render the displacement?

    Capture-9.jpg

    A few questions on Displacement mapping as I've only used normal maps for details. Does Unreal render black as height or the other way around? and would it be possible to see a large render of your displacement?

    Many Thanks.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    ah. i didnt use a heightmap as you can see from the picture. i just used the blue channel from my normal map.

    if you do prefer to use a heightmap try out this material setup

    http://www.mypicx.com/uploadimg/1396652404_03122011_1.png

    also udk renders white as height. just like any other renderer. i dont know where youve rendered your heightmap from but you may need to take it into photoshop and tweak the levels.

    first try just plugging the blue channel of your normal into the alpha for the lerp. if that doesnt give you a good result try out the method in the pic above.
  • darthwilson
    Options
    Offline / Send Message
    Hey! sorry for bumping an old thread but I has some progress if you could take a look!

    Here is the model that I'm using which is pretty much finished, feel free to throw crit back at me about it

    trexdiffusenear.jpg

    Here it is presented in the engine

    trexengineshotplain.jpg

    Here is DX11 Tessellation in effect

    rexcrackfree.jpg

    Lastly here is the displacement map.. (I have got 50% grey now where the solid black is because it was effecting the eyes and teeth)

    displacement.jpg

    I'm having issues in many places! especially with the arms and claws being crushed in on itself.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    what did you use to render the displacement map? and can we see the material.

    and just a general note. it looks like you use maya. i dont have experience with baking in maya but i tend to generally do all my heightmap baking in xNormal. that gives really great results.
  • darthwilson
    Options
    Offline / Send Message
    I'm also using xNormals to render the displacement map. I bring in a turbosmoothed model as the low poly so that the displacement map isn't as jagged looking.

    Here is the shader I'm using.. I tried your other displacement one but it didn't turn out soo good.

    tesseshader.jpg

    Any Ideas?
Sign In or Register to comment.