Home Unreal Engine

LandScape material (Normal-detail blending)

decorix
polycounter lvl 11
Offline / Send Message
decorix polycounter lvl 11
Hi all,

I'm working on a LandScape material.

I have a colormap_texture in my diffuse. Also a BlendOverlay which connects to my Layers (materials Landscape).
-Grass,Dirt,Rock,Soil.

But I would also like to have a LandScape_Normal_map_texture to blend with detail_normals!!

can I use the same approach?

How can I have one single large normal map (of Landscape) and then connect the detail normal
layers at the same time.

-LandScape_normal-
terrainmaterial.jpg
detail normals:

>Grass_normal
>Dirt_normal
>Rock_normal
>Soil_normal

Thanks

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I haven't done this in awhile, but it should be as simple as blending the large normal map with the output from your Layer Blend node.

    Use this setup, except replace the detail normal map with your Layer Blend node:
    http://udn.epicgames.com/Three/MaterialBasics.html#Detail%20Normal%20Map
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    It's a lot easier to use the landscape layer blend for this, it has a built in blend by alpha height you can stick on any normal.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Thanks for replying!!

    I am using LayerBlend, but I want to mix both my Base_normal and
    my detail normal maps (Grass,Rock,Soil,Dirt)

    add is running to normal input!!

    Did you mean something like this?

    terrainmaterial2.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    No, that's the old Terrain method. The new Landscape method uses the Layer Blend node. Here's an example
    http://www.polycount.com/forum/showthread.php?p=1598641#post1598641
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi Eric,

    Thanks for helping out!!! So the LayerBlend node is newer node?
    I thought all those new blend_node such as color_burn / Blend_screen / Blend_Softlight were
    new!!! But I just checked it out and you can add layers and change blend type.

    I have been doing research regarding tutorials Wenda made (Landscape Tutorial) but for the
    Rock texture he was getting alot of streching. Unfortunate he didn't show this in his
    great tutorial.

    I was wondering if you perhaps know in which direction you can solve this? I have found
    information that he was using a WorldAllignTexture and you have to sample textureobject.
    I'm not sure how to connect it futher on. So I hope someone might have solved this problem.

    Thanks again for everything.

    worldalligntexture.jpg
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi Eric,

    Today I tried reconstructing your Landscape material, but I'm getting
    this error. Even when noting is plugged-in.

    I'm wondering if I setup my LayerBlend Correctly.


    With the LayerBlend node

    Layer (0) is set to AlphaBlend, but when I set this to LB-HeightBlend
    it makes a new layer.

    I have noticed that all the heightLayers in the Layerblend such
    as GrassHeight= set to LB_HeightBlend.

    UDK build may2012 (latest)


    errorio.jpg




    No, that's the old Terrain method. The new Landscape method uses the Layer Blend node. Here's an example
    http://www.polycount.com/forum/showthread.php?p=1598641#post1598641
  • Eric Chadwick
    Options
    Offline / Send Message
    Sorry, I haven't touched UDK since last December. Have you created the layers in the Landscape itself? The layer names in the Layer Blend node need to match the layer names in the Landscape itself.

    yRlJ8.jpg
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    No problem Eric,

    Yes I know all of this!! naming and stuff I have already created some landscapes, but I'm trying to refine my material for the landscape.

    Basicly the material gives and compile error at the moment with may 2012 udk build. Perhaps, Ive made some mistake. Will retry again later on.
    Just wondering why.. when you plugin a LayerBlend node and plugin into the normal slot (input) why does it give an error?


    landscapeom.jpg
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    The error thing is 'normal'. For what ever reason it bugs you just need to go back into your package and double click on the landscape material instance constants.

    That will refresh the material and get rid of the error message as long as you have the material setup correctly.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi,

    Thanks for replying to my problem.

    Do you perhaps know if my layerblend setup is correct, before I start
    linking my nodes. Basicly I still have my ColorMap. Does this also
    need to go into the LayerBlend. If so were? I also read that the
    first layer doesn't do anything..
    Does the ColorMap have to be set LB_AlphaBlend?

    Its not clear to me when you add a new layer and set it to LB_HeightBlend it makes 2 layers!!


    Thanks in advanced,

    layerblend.jpg
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    If you aren't using height maps then you shouldn't have it set to height blend, leave it set to alpha blend.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi DeadlyFreeze,

    What about the ColorMap, were does it go?
    Does that go on top of the stack in the LayerBlend too?
  • Eric Chadwick
    Options
    Offline / Send Message
    Depends on what you want. You probably want to blend it with the output of the diffuse LayerBlend, if you have a bunch of detail diffuse maps.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hello Eric,

    I re-done the material as you send me an example. The strange thing is that i'm still getting that red compile error. The material shows up ok in the Landscape editor. I can paint the texture on my landscape. I have assigned the right names to each material.

    I have build in BlendOverlay for my color map. But i'm not sure if this is the correct way. Its doesn't really look correct.


    diftocolormap.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    Sorry, don't know what's causing it. Have you posted this on Epic's UDK forum? Have you tried searching for the error codes? If everything works OK, I would just ignore the error, could just be a programmer's bug.
  • Pampers
    Options
    Offline / Send Message
    you could try and use a texture object instead of a texture sample for that slot
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    My error is gone!! but still not sure if this setup really works.
    As you can see my rock materials is very bright and I'm not sure what's causing this.

    Also not sure if this is the correct way to blend a colormap with other detail textures.

    textureblending.jpg
Sign In or Register to comment.