Results 1 to 35 of 35
  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Location
    Hampshire, IL
    Posts
    56

    Default Terrain Grass Deco Layer

    I have searched and searched, but can't find a tutorial on terrain deco layer grass.

    What I have learned from the forums:

    Grass can be a terrain texture material.
    (I would like 3d grass if possible)

    or

    Grass can be made using a foilage volume
    (this requires a simple mesh with a grass texture?)

    or

    Grass can be made using a deco layer
    (this requires a simple mesh with a grass texture?)

    looking at some screen shots of the great looking grass I have seen
    http://img.photobucket.com/albums/v2...p/UDK3WIP4.png

    was that made with the deco layer style or foilage volume?

    Any tips or help appreciated

  2. #2
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    You shouldn't use deco layers for grass for obvious performance reasons. (Decos are meant to switch into a lod actor something you don't need with grass).

    Create a new terrain material if you haven't already (manually by double clicking the terrain actor!) and check the option for foliage layers. You just need a simple grass mesh for it.
    Once you're done you can also add a wind source somewhere in your scene and animate wind effects just like you wouldbe able to do with "speed-grass".

  3. #3
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Location
    Hampshire, IL
    Posts
    56

    Default

    Thanks for the reply.

    I'm gonna start working on it tonight. I'm making the mesh in 3dsmax, should I model a low poly grass blade, or a small patch of low poly grass?

  4. #4
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Just in case you find it useful, I posted a couple of sample-shots below.

    I applied a wood material on the basic mesh I made in order to be better visible.
    It's just a simple example. Most people just use 2 simple planes crossing each other. In my opinion thought it doesn't look very realistic and especially from the top view, this is why I made something more complex but at the same time I keep the polycount as low as possible. Grass is always a game frame-rate killer.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    ----

    This is an example of a grass material. The alpha channel has been used as a mask.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    ----

    And last, this is an in game shot of grass created the same way. Note that it's still a WIP and requires some more tweaking but, I'd say that it's representative.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    I hope this helps.

  5. #5
    Prisoner 849
    Join Date
    Dec 2008
    Location
    Guildford, UK
    Posts
    935
    Gamer IDs

    Gamertag: prophet64

    Default

    Where do you get your grass textures from ThePriest, Google always lets me down or I'm typing the wrong phrases into the search box.
    Twitter
    Portfolio

    Level Designer at Lionhead Studios

  6. #6
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    Can you please post your grass mesh? I am not so good at max, I would really appreciate that. Or at least screens from left/front and top views so i can try to repeat it
    Last edited by InhexSTER; 04-06-2010 at 09:56 AM.

  7. #7
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Location
    UK
    Posts
    49

    Default

    yeah can we have the grass mesh?

  8. #8
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    I uploaded the grass mesh here: http://www.filefront.com/16044331/grass_01.ASE
    It's in ASE format.

    @Piranhi, I found links to grass textures from a post somewhere around the UDK forums. I can't find the original post but I kept a link: http://www.loopix-project.com/
    There are a couple of free textures there including the one from my example.
    The in game shot thought shows a custom made texture. It may sound funny but... I used a hi-Q scanner to scan real grass plants that I used as a base to make the texture in photoshop lol. In my opinion it looks much more realistic than the usual "painted" textures.

  9. #9
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    @ThePriest909 thank you very much

  10. #10
    MSgt. Shooter Person
    Join Date
    Feb 2009
    Posts
    479

    Default

    Well I tried this method and it works well, but I have run in very, very strnage problem.
    When I look in one direction grass look normal. When I start look in opposite direction grass getting darker, and darker, nearly black at the end.

    Material setup is pretty simple. Single texture with OpacityMask, TwoSided and Mask.

  11. #11
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Quote Originally Posted by iniside View Post
    Well I tried this method and it works well, but I have run in very, very strnage problem.
    When I look in one direction grass look normal. When I start look in opposite direction grass getting darker, and darker, nearly black at the end.

    Material setup is pretty simple. Single texture with OpacityMask, TwoSided and Mask.
    Have you tried building the lighting? And if yes maybe try to turn shadows off for that specific actor.
    It looks the same way here when the lighting is not built.

  12. #12
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    @inside maybe try one sided? for me it works, i didnt calculate lighting yet, but seems ok

  13. #13
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Location
    UK
    Posts
    49

    Default

    cheers priest for the texture

  14. #14
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    Actually after building light have same problem with back of the grass, it almost black

  15. #15
    Prisoner 849
    Join Date
    Dec 2008
    Location
    Guildford, UK
    Posts
    935
    Gamer IDs

    Gamertag: prophet64

    Default

    haha great idea ThePriest, and thanks for the link
    Twitter
    Portfolio

    Level Designer at Lionhead Studios

  16. #16
    MSgt. Shooter Person
    Join Date
    Feb 2009
    Posts
    479

    Default

    Quote Originally Posted by ThePriest909 View Post
    Have you tried building the lighting? And if yes maybe try to turn shadows off for that specific actor.
    It looks the same way here when the lighting is not built.
    How to turn off shadows for Foliage Layer ? Due I can only disable shadows for terrain but this is not a way I want to do it (nor it work anyway for that matter).

    When I place this mesh in level normally it works fine, just when I put it on foliage it starts to behave strange.

  17. #17
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Quote Originally Posted by InhexSTER View Post
    @inside maybe try one sided? for me it works, i didnt calculate lighting yet, but seems ok
    As one sided you won't be able to see the back side of those planes at all. Not recommended. "Two Sided" and "Two sided seperate pass" should be checked.

  18. #18
    Prisoner 849
    Join Date
    Dec 2008
    Location
    Guildford, UK
    Posts
    935
    Gamer IDs

    Gamertag: prophet64

    Default

    I also found this package if anyone wants it. http://www.obsidiandawn.com/grass-transparent-pngs
    Twitter
    Portfolio

    Level Designer at Lionhead Studios

  19. #19
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Quote Originally Posted by Piranhi View Post
    I also found this package if anyone wants it. http://www.obsidiandawn.com/grass-transparent-pngs
    Thanks Piranhi, and btw thanks for the feedback on my previous grass material (WIP thread). I 'm so used to the looks of that map that I barely can see the difference between the "forest and the trees".

    Quote Originally Posted by iniside View Post
    How to turn off shadows for Foliage Layer ? Due I can only disable shadows for terrain but this is not a way I want to do it (nor it work anyway for that matter).

    When I place this mesh in level normally it works fine, just when I put it on foliage it starts to behave strange.
    My bad, I forgot that there's no option for editing lighting channels for foliage layers but only for decos. I suppose foliage is set as self shadowed only.
    Any difference with anisotropic ligting model material?

  20. #20
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    What about FoliageFactory volumes? does they work ok?

  21. #21
    MSgt. Shooter Person
    Join Date
    Feb 2009
    Posts
    479

    Default

    Quote Originally Posted by ThePriest909 View Post
    My bad, I forgot that there's no option for editing lighting channels for foliage layers but only for decos. I suppose foliage is set as self shadowed only.
    Any difference with anisotropic ligting model material?
    Yes. Texture look like a paint mess. But old problem remains.

    EDIT:

    FoliageFactory have exatly same problem.
    Last edited by iniside; 04-06-2010 at 01:56 PM.

  22. #22
    MSgt. Shooter Person
    Join Date
    Mar 2010
    Location
    Hampshire, IL
    Posts
    56

    Default

    thanks Piranhi and Priest for the help and downloads!

  23. #23
    MSgt. Shooter Person
    Join Date
    Feb 2009
    Posts
    479

    Default

    Ok I found solution for it. In material settings you have to use lighting type NonDirectional. Well, it might look quite brith then, but dont have strange shadows anymore.

  24. #24
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    @inside NonDirectional property kind of works, but it makes grass very bright and unrealistic, hope to find another solution for that

  25. #25
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Guys... have you really tried building the lighting properly, with lightmass on and a proper enviromental color that is not pit black?
    If the lighting is not built, it's quite expected to be black from the back side since there's no enviromental light to support it. I'd be surprised if you have problems after the lighting is built.
    Last edited by ThePriest909; 04-07-2010 at 12:27 AM.

  26. #26
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    I have dominant directional light + skylight, everything looks well except grass. Its not completely black from other side its just much darker


    and here is backwards (facing light)

    Last edited by InhexSTER; 04-07-2010 at 12:45 AM.

  27. #27
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Posts
    309

    Default

    actually it looks like it can be fixed by adjusting brightness of both dominant directional light + skylight, i it lowered brightness of Directional Light by 2 and increased by Skylight's by 2

    @iniside try using skylight looks like it fixed everything for me. without it back of my trees were also black.


    facing away from directional light:



    facing light:



    I know it does look well yet, but i still need to play with light brightnesss, might need to increase skylight a bit more to make it seem there is more bounced light
    Last edited by InhexSTER; 04-07-2010 at 01:03 AM.

  28. #28
    Redeemer
    Join Date
    Nov 2009
    Location
    Crete
    Posts
    1,040

    Default

    Note that the mesh I attached has no secondary UVs. Have you tried generating it?
    Not sure if that will make any difference for foliage actors but... Just in case.

    Unfortunately I'm at work and I can't test it myself.
    Last edited by ThePriest909; 04-07-2010 at 01:09 AM.

  29. #29
    MSgt. Shooter Person
    Join Date
    Feb 2009
    Posts
    479

    Default

    Ok. Changing Enc Color to White (with Alpha channel also to 255), solved problem ;o.
    Thanks.

  30. #30

    Default

    Not sure how old this thread is, but I've run into some problems trying to get my grass to work.

    Using a combination of tutorials out there (I plan to write one good one that encompasses everything I have learned) I've used Maya 2010 and ActorX to output my grass mesh and then in Photoshop CS3 I created the texture for it.

    But I can't seem to get my alpha channels right =/
    the Grass I have now has a white outline around all the blades of grass...


    My brain hurts from trying to figure this out.. anyone have any advice?
    How should I make my PSD file in Photoshop?
    Thanks in advance

  31. #31
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Posts
    68
    Gamer IDs

    Gamertag: mai1box

    Default

    Your grass texture probably has a white background. Change it to the color closest to the edge of the grass texture.

  32. #32
    Redeemer
    Join Date
    Sep 2007
    Location
    Finland
    Posts
    1,288

    Default

    That, or shrink the opacity mask by few pixels. Both work.

  33. #33
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Posts
    240

    Default

    I kind-of solved (well, faked it) the lighting issues on my grass material by multiplying the diffuse by a constant and running that into the Emissive channel of the Material.

    You have to basically mess with the Constants (and possibly multiply your diffuse by a Constant3Vector as well) until your grass has no parts that are either too dark or too bright against the terrain to best make use of the grass blending into the distance.

    I recommend adding grass to a designated Grass TerrainMaterial (In the Terrain Material's properties, you will see an Option that says "FoliageMeshes." You can add your grass to this material instead of using that extra texture sample on a seperate Foliage or DecoLayer mask... though if you still want to use a Foliage Layer in Tandem with this technique, you could get some pretty cool results.), but that's just my preference.

    Here's a snippet from the material editor (not that it's difficult, but sometimes it's faster to just see an example):



    And here is the result:



    As you can see no harsh shadowing, whereas, if I removed the emissive channel, I would get much harsher shading, especially if my meshes were shading themselves somehow (as I am only using very low-poly grass it would be much less apparent with this model).

    On the previous mesh, where all the lighting seems to be facing one way, you could offset this a few ways.

    One of which is making sure you have an ambient light (SkyLight) set up on a very dim setting (0.125 brightness works well) and typically, your light color should be a cross between the dominant color of your skydome and the dominant color within the map itself.

    Alternatively (or additionally, as I have used both these techniques in a map before), you could create a Directional Light that is the (dominant) color of your sky and set it to face an opposing direction from your dominant light source (sun, moon, etc) to simulate light bouncing back from the sky itself and this will help light those back faces a bit.

    I'd say just mess around with each of these and find a technique and style you like. Running through all of this only took me about 20 minutes, so it's not time consuming at all to give each one a whirl.

    EDIT: To that last guy with the white border, there's a property you can adjust here:



    That MIGHT help, but even if it doesn't the above posters' ideas should also work just fine.
    Last edited by BloodReyvyn; 04-19-2010 at 08:12 PM.

  34. #34
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Melbourne, Australia
    Posts
    71
    Gamer IDs

    Gamertag: Mordt

    Default

    Guys, just read through this post and you've all helped me with a similar issue. Thanks again. Great community this one!

  35. #35
    MSgt. Shooter Person
    Join Date
    Apr 2010
    Posts
    89

    Default

    hey, the link of the grass mesh doesnt work, it says the file isnt avaible.
    Please upload it again, i need this grass mesh.
    Thank you


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.