Home Technical Talk

Leaves (on roof/ground)

Zocky
greentooth
Offline / Send Message
Zocky greentooth
Hey all!

Well, i'm making this map in UDK, ancient china-based. So i have this reference:
pMSQCnx.jpg

So, anyhow...i want to make leaves, but i kinda don't want to put them just on one plane, cause, at least on the roof, it would look very flat.

So, on roof (area A and F), i would like some more volume to the leaves. Especially when looks from the ground, it will be too obvious that it's plane, if i make it so.

So dunno...maybe make one asset that is basically a group of leaves (planes with alpha test maybe), or two, and i could distribute those two with different rotation and scale.

Then we have ground. So first thing here is, leaves are here not distributing consistently across the ground.

Some are , like D, has somewhat low density on ground (but still not the same everywhere), and areas like C, B, and E are almost completly covered with ground.

What's more, on area like C and E, at the border, they actually stack so much that they actually gain some height. If i was to simply use on ground as decals (make of flat assets), it would be all too obvious again that it's flat. I guess i could make special asset here with leaves texture and make it raise at one side, and tile it.

But, anyhow, i wonder if anyone has any better solution for the leaves?

Tnx and cheers,
Zocky

Replies

  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    I'd create a small texture atlas of about four different leaves to use on the rooftop. At that point I'd use an alpha mask to apply the texture to a plane and shuffle it around on the gutter to break it up. Add in some rotation and a few extra polygons for some of the leaves to curl them.

    For the ground, I'd look into making a tileable alpha map with some bumpiness to the geometry, and possibly use two different alpha maps to break up the tiling so it gives you sparse / heavy coverage. You could wire in some hue variances with Unreal's material editor to further break up the leaves.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    I would use a vertex paint shader for the ground, to give the best control of coverage.
  • Zocky
    Offline / Send Message
    Zocky greentooth
    Tnx both of ya !

    Hm, some intresting ideas here.

    passerby, i was thinking about that, and i did play a bit with advance vertex painting in udk in past, buti i'm not quite sure how i would approach that with leaves.

    Cause, if you have liquid for example, and you want to blend it with ground, you can use height map , and when you painting, you would raise water between the the cracks, and you would use some other channel to control some other parameters.

    But, leaves worked a bit differently. Like, you either see leaf completely, or not at all. I'm not sure how i would achieve that with vertex painting on leaves. I mean, i guess i could make a height map, and heave leaves on several heights, and use that for painting, With that, when i paint, the more i push, the more leaves would be.....but i would still have to be carefull with overlapping leaves...hm this will be tricky for sure....

    But, still, some really nice ideas, so tnx!
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    ya I would make leave shaped brushes for painting the heightmap but your right it might not work.

    maybe a alpha map that is higher res than the diffuse, and that only tiles once for every 2 or 4 tiles of the diffuse.
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    one idea that gives OK results for ground cover is to break your leaf texture into greyscale then enhance the contrast and use a "cutout" filter in photoshop to reduce it to just a few levels.

    You can then use this limited level version in the alpha channel.
    Set an if node to have one input be the alpha version channel and the other be your masking effect, be it vertex paint or whatever. Set the output if less to be zero and output if more or equal to be 1. This results in a hard edged map so you always get as much of a full leaf as you can from your source texture.


    A potentially better option would be to have one texture be 3-4 layers of greyscale leaves. one in each channel. This gives you 3-4 different levels of coverage or types of leaves. You can use a similar technique as described above, making sure the leaf alphas go through a ceil node before being combined, to select each set of leaves in turn and combine their masks to make more or less groundcover.

    You can either have additional textures matching the leaf alphas but with colors, or you could use the alphas as the leaves with some gradient mapping for color.

    then its just masking and combining.

    The height addition could come from tessellation and displacement.
  • Zocky
    Offline / Send Message
    Zocky greentooth
    Vailias,
    Hm, that sounds like a very good idea actually.
    First idea sounds nice, but i think i like second idea even better. I think i'll try second idea and see how it works. Tnx a lot, i really appreciate it!
Sign In or Register to comment.