Home Unreal Engine

material editor and object work position

ngon master
Offline / Send Message
ZacD ngon master
8kMyA.jpg

I want the plane and the grass to have the same color in the same areas. Basically the material is just 2 noise textures layered on top of each other, I tried to factor in the world position but I am confused how to use it properly, I'm trying to emulate the foliage in Airborn

http://www.polycount.com/forum/showpost.php?p=1719444&postcount=558
+ shader that blends in grass depending on normal and vertexcolor
+ worldspace "lines" for consistent rock feel
+ worldspace grass texture for color variations
+ ground and 3d grass get the same light + color
+ more

Replies

  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    Grab a worldspace coordinate node, mask out the R and G values. Divide that by the tile size of the texture (Around 1024 or 512 is usually good). Use that for the UVs of your texture maps that you plug in to your grass and the terrain.

    Should work.
  • Santewi
    Options
    Offline / Send Message
    World position -> component mask (R+G) -> Divide by a number depending on how large the noise texture is -> plug in to the UVs of your noise texture.

    http://i.imgur.com/lOY8s.png


    Then just multiply your normal diffuse with the noise texture. Or just use the noise tex as the diffuse.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    BTW, UDK already has this setup as a Material-Function, it's called WorldProjectTexturing I think? It's abit more 'complicated' then the ones Ryan and Sant mentioned (you can define what direction projects what, etc.

    But yeah, this is how you generally do it.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Okay that works, awesome, I was stupid and was using the object work position instead XD
  • Santewi
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    BTW, UDK already has this setup as a Material-Function, it's called WorldProjectTexturing I think? It's abit more 'complicated' then the ones Ryan and Sant mentioned (you can define what direction projects what, etc.

    But yeah, this is how you generally do it.

    Really? I have to check that out then, always interesting to see this kind of stuff :P
Sign In or Register to comment.