Home Technical Talk

Grass texture and texture blurring in UDK

Hey all,

I'm just trying to put together a decent texture for an environment I'm working on.

I've basically created a number of diffuse textures which I'm happy with, the spec is ok I think but it still doesn't look as good as I'd like. This may be down to the normals but I'm open to suggestion.

I've just CrazyBumped the normals, I figured there's no better way really for grass, the only other way I could think was to bake something created in Hair/Fur in Max but I don't think that would work as well as just running it through CB.

The problem is, the normal map doesn't come out like grass, even with a sharpened diffuse plugged into CB, it comes out like kinda bumpy all over with no real grass definition.

If you could take a look at what I've got in the screenshot and advise on how to improve that would be much appreciated.

Secondly, anyone know how to stop the texture blurring up close to the player? It looks nice slightly further in the distance but blurry up close, or is that as good as I'm gonna get?

GrassExample.jpg

I'll post the material setup if necessary but it's basically just 3 grass textures, one with some Lerp'd mud patches. The normals are literally just CB'd diffuse.

Note the skybox is UDK default and placeholder for now.

Thanks!

Replies

  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    put the grass in a low mip-map level and let the higher mip-maps just be dirt. then add billboard grass matching the other grass for close distance. or something like that!
  • Adam L. Gray
    Options
    Offline / Send Message
    Well, I had this problem for a previous contract as well, the grass just looks muddy and bumpy. I had to paint it by hand, hundreds if not thousands for grass straws, all over a 2048, took me days.. so except from that horribly painful procedure, I don't think there's much you can do texture-wise.. unless you do the hair and fur thing or find some sort of grass height map :p
  • Tom Ellis
    Options
    Offline / Send Message
    Thanks guys.

    Divi - I'm not sure it's down to mip-mapping. I've got the engine.ini edited to force high quality textures, could it be texture res? I'm using 1024s. The billboard thing is a nice tip, thanks!

    Tiros - Hand painting realistic grass on a 2048??!! I'm not sure I have the skill, or patience to attempt such a thing. But you're totally right, it's difficult to get something that doesn't look lumpy and crap.

    Honestly though, is what I've got currently acceptable? I'm looking back at it and thinking it's not that bad and I just went and played a couple FPS' and the ground texture always looks blurry under close inspection.

    I'm thinking it may not be as much of an issue once some more textures (pathway, mud etc) and foliage, ground clutter are in there.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    what i was saying is that you could use only dirt for the foreground and have grass meshes on there and when you get further away you fade out the grass meshes and replace the dirt with the flat grass texture you currently have that works in the distance.
    that way you won't have to deal with the blurry grass in the foreground that looks more like moss if anything.
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    so how would you go on editing the mipmaps in udk? does it support dds yet? i somewhat doubt it as epic stated often that they have no interest in doign so :O
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Neox wrote: »
    so how would you go on editing the mipmaps in udk? does it support dds yet? i somewhat doubt it as epic stated often that they have no interest in doign so :O

    nope. I was interested in something snowfly mentioned in P&P regarding UV size and using texture size as mip maps embedded in a DDS. No dice...

    @Creation: I would go with what divi has. You could paint grass as a foliage layer and just have it disappear on distance. Actually wait hold up, take a look at this link:

    http://udn.epicgames.com/Three/TerrainAdvancedTextures.html

    Might help make the textures look less blurry.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    Neox wrote: »
    so how would you go on editing the mipmaps in udk? does it support dds yet? i somewhat doubt it as epic stated often that they have no interest in doign so :O

    arr! damn it :D

    he could probably blend between different textures based on the distance from the camera though.
    slightly more expensive, but it might look better too.
  • Tom Ellis
    Options
    Offline / Send Message
    Thanks all!

    Ok that link was awesome thanks Haiddasalami. I probably shoulda checked UDN before posting :D

    Here's where I'm at now, better dya think?

    This is using a single grass texture rotating/overlaying on itself as well as a 128x128 detail map. Same setup for the normals.


    GrassWIP.jpg

    Here's the shader network:

    GrassShader.jpg
  • Tom Ellis
    Options
    Offline / Send Message
    Still messing with this :D Determined to get a decent looking grass before I get too far into this project.

    Ok, question for you UnrealEngine masters. Which is more expensive; 2 terrain materials with a lot of instructions or 4 terrain materials with fewer instructions.

    The reason I ask is that currently I'm using 2 terrain materials, each has 2 different diffuse textures which are rotated/repeated back over themselves and then blended together using a Lerp/Mask. Would it be cheaper to just have the materials rotate/tile over themselves but without the blend built into the materials... ie so I could blend them on the terrain as 4 materials.

    I would have more control that way but it's working ok as it is, so if it's cheaper to use fewer terrain mats with more instructions then I'll keep it that way. Also I will have a few more terrain materials to add yet (paths/rock) and it's already at 4 with the mud textures.

    Also, how it this looking? There's a desaturate node on each material so colour/saturation can be easily tweaked. The terrain itself, sky, and terrain painting is all just there for the sake of example, but how do you think the grass itself is looking? There will be foliage / grass meshes too, but I thought I'd get a decent base down before I move onto that.

    Here's the shader -

    GrassMatExample.jpg

    Here's the material in the editor on the terrain -

    GrassMatUDK.jpg
  • fearian
    Options
    Offline / Send Message
    fearian greentooth
    iirc having alot of instructions on a terrain material can be quite bad and UDK will actually stop rendering it if the material gets to complex.

    It would probably be better to use more materials, but you won't have quite the same level of control and options. I'd wait for someone else to weigh in before trusting this though :)
  • sampson
    Options
    Offline / Send Message
    sampson polycounter lvl 9
    remember you are pretty much NEVER going to get grass looking good on its own, usually if its blended with dirt, sand as well ass adding foilage iy starts to look good
  • Tom Ellis
    Options
    Offline / Send Message
    Cheers Fearian! It's not really an issue for me to switch it out to 4 materials instead of 2 complex ones. It'll mean more manual blending on the terrain painting but I should still have plenty of control on how the textures are blending, if not more so.
    sampson wrote: »
    remember you are pretty much NEVER going to get grass looking good on its own, usually if its blended with dirt, sand as well ass adding foilage iy starts to look good

    I hear ya man, and that's actually some advice I've given to others in the past.

    I'm just really kicking my own ass on this project trying to make every aspect simply as good as I can. One pet hate for me in games (kinda sad really lol) is when I see beautiful environment work, lush foliage etc, then I look down at the ground and see this blurry attempt at grass under my feet. Really detracts from it in my opinion.

    But you're totally right, I should probably move on now :D
Sign In or Register to comment.