Home Unreal Engine

UDK layer masking?

Hi all, I have recently downloaded UDK and I'm loving it so far. Although I can't work out how to do one thing...

I need to apply a detail texture to a terrain using a mask, so it will paint in the rock layer texture automatically based on a grayscale map generated by worldmachine.

I have been able to apply a general colour texture to the whole terrain, I had no problem with this, I just don't want to have to paint by hand all the detail layers.

I know there will be a way to do this as UDK has by far the best material editor out there, google searches came back with nothing.

If this IS possible, can it also be used to apply vegetation?

Hope you all can help.

EDIT: I realise that I mistakenly double posted, this is because I didn't think my thread yesterday was successfully submitted as I was a new member, sorry.

Replies

  • Rekmar
    Options
    Offline / Send Message
    Rekmar polycounter lvl 19
    just use a LinearInterpolate node in your material. read the UDN materials compendium page to find out more about it

    that method cannot be used to apply vegetation though, but neither can the "painted layers" method.
    to apply vegetation it must be placed using the Foliage tool, and all relation there is to the landscape layers, is that you can tell it to only place vegetation per layer when you do place foliage meshes
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi, I'm also been looking for a way. I still think you would need to paint away with a large brush (Landscape Editor) large brush settings. My idea was to have a mask for the rock parts ( and then use the mask from worldmachine to mask off the area's you don't want to affect.

    So basicly you paint Rock on your landscape with large brush, but you don't need to worry were you paint as the mask takes care of everything.

    How would set to up? Is this possible?

    If you find a solution can you let me know. thanks

    If you need a Lerp? how would I connect it.


    lerp.jpg
  • Rekmar
    Options
    Offline / Send Message
    Rekmar polycounter lvl 19
    decorix wrote: »
    So basicly you paint Rock on your landscape with large brush, but you don't need to worry were you paint as the mask takes care of everything.
    Again, that will only work if what you've painted is purely done using the landscape layer painting. Using a texture as a mask will not affect the Foliage Tool's per-layer filter painting
    decorix wrote: »
    If you need a Lerp? how would I connect it.
    as I said read the page UDN - Materials Compendium to learn how to use it
  • DonCornholio
    Options
    Offline / Send Message
    DonCornholio polycounter lvl 9
    Lol i just wondered where my post on this is, then i saw that you openede two threads for the same question ? Anyways here's what i posted on your other thread, in case you have technical problems seeing it.

    LazyTerrainMaterial.jpg
    And as promised this is my World Machine Preset:
    You'll need the Coastal Overlay Plugin to make it work !
    https://dl.dropbox.com/u/17204989/Island%20Preset.tmd

    I dont know how placing foliage via mask would be possible, but doing this by hand via the foliage tool is really quick and easy and you have a lot of control on instancing and culling distances, which will be an important issue with big and open terrains.
    Also be warned that very big landscapes will eat up your memory like crazy while running lightmass !
    For Example i used a 4096² heightmap and when i applied foliage etc. , lightmass would have needed something in between of 512 Gig to 1024 Gig of Memory ! Only solution was to Export the Landscape to Obj. , use Meshlab to down res, then reimport as a Mesh.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Hi, ok thanks for the info.

    So when you have a big landscape you could export it as OBJ and then use meslab to optimize it.. then re-import it back. Can you then still edit the landscape. Guess its mesh then. So it speeds upo render time using lightmass? Is there any info on this online? How did you workout how much ligtmass would use? thanks
  • DonCornholio
    Options
    Offline / Send Message
    DonCornholio polycounter lvl 9
    As it is a mesh then you wont be able to edit it with the landscape tool, but if you finished all youre editing in landscape mode before, that won't be necessary. The only thing you could do is edit the mesh in 3dsmax(or similiar apllication), or maybe export from udk as heightmap(not 100% sure thats possible) to a sculpturing program --> apply heightmap to a plane and then edit it.

    Also a good thing to know is, that if you're using a standard Landscape Material and Paint in the Detail Layers by hand, that you can export this as greyscale masks to be used like in my material example and then use it for the mesh version of you're terrain.

    And yeah it speeds up render time tremendously when you convert it to a mesh and it also helped me to gain more performance ingame.

    I just started the lightmass calculations and then checked the log files after it crashed. Also some other guy on this forum has had similar problems and even had two 32gig pcs on this task and still failed. The Numbers where rather guesses, but it still boils down to you wont be able to render lightmass on a huge landscape without a render farm.
  • decorix
    Options
    Offline / Send Message
    decorix polycounter lvl 11
    Today i tried getting my landscape heightmap out of udk.
    I now have a plane with my heightmap assigned to it. (using displacement)

    The mesh (fbx) was very high, but i got it under 50K poly. I'm wondering if that's
    still to highpoly for 1009x1009 landscape map. It looked fine to me.

    I did noticed that it was very small in max,, so i needed to scale it up.

    As you said if its a mesh I can't paint on any detail textures. I also
    have a colormap (4096x4096) for my 1009x1009 (worldmachine). I still find it alot of work if you need
    to paint in all your detail textures by hand. Escpecially if you have a large map.
    I was hoping you could use a very large brush and then paint away on your landscape
    just painting in detail you want (using a mask methode) so when you paint rock for
    example it only affects the regions you have defined in your mask.

    But I understand this is not possible.

    If i understand correctly you can't really use lightmass on a large landscape with foliage (unless you have renderfarm).
    as it require alot of memory. So what other options are there?
    landscapecoloring.jpg
  • DonCornholio
    Options
    Offline / Send Message
    DonCornholio polycounter lvl 9
    Checkout my Worldmachine Preset and my Material. I'm rendering out the Masks for the detail layers with Worldmachine and the Coastal Overlay Plugin, which i modified slightly.
    So with my Setup you dont need to paint any detail textures per hand at all. But you could still edit the Masks in Photoshop or something similiar.

    Also keep in mind that the Material i posted is to be used with landscape but you only have to change a few nodes like the terrain coordinates nodes to make it work with a mesh.

    A 1009x1009 Landscape might be useable as it is, as i was talking about a 4k landscape in my case. Just make a quick lightmass test with some props in etc. and see if your computer can handle it.

    I'm no Pro with UDK and there might be better ways to deal with big landscapes, but for my project this works just fine.
Sign In or Register to comment.