Home Unreal Engine

UDK Foliage Mode LOD Baking Problem

I've been struggling with UDK's Foliage Mode, because when I paint my trees and bake with lightmass, it doesn't bake my tree's LOD's correctly.
(As shown in the image)

--- Things I did and notes ---
> Manually placing trees works with baking, but not my Foliage Mode trees
> The base mesh of the LOD always bakes correctly no matter what
> Each LOD, including base mesh, share the same lightmap space with no overlapping
> I used 3Ds Max to embed my LOD's into my FBX file, but didn't help
> I also exported my LOD's seperateley and imported them manually in UDK, and didn't help either
> In the static mesh viewer, toggling the 'Per LODStatic Lighting For Instancing' doesn't help
> In the static mesh viewer, toggling the 'Used For Instancing' doesn't help
> Playing with the Lighting Settings within the Foliage Mode didn't help either
> Tested in the July 2013 Beta and February 2013 Beta builds, and no luck

I'm stumped, and I have no idea how to get my tree's LOD's to bake correctly when I use the Foliage Mode :(

Thanks in advance for any replies! :D

http://i.imgur.com/E1QeUUY.jpg

Replies

  • Zerdex
    Options
    Offline / Send Message
    I friend of mine figured out the problem for me...

    The problem was: I had each LOD sharing the same, all in one, UV space and no overlapping

    LOD's NEED to have overlapping between each LOD, but can't be overlapping in it's own UV space, if that makes sense

    LOD's then use the same base mesh lightmap and that lightmap is then projected on each individual LOD... This is why my objects were turning black and why the first base mesh LOD wasn't black

    I hope this helps out anyone else in the future! :)
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    edit: same time post. But yeah obviously don't place them all in the same UV space. Must indeed be overlapping.

    That said what is the lightmap resolution of one tree? And how many trees do you have? The lightmaps of all foliage trees in one bwatch added together may not exceed the total lightmap space available (1024 or 2048) or it will go wrong. Most people forget to do this correctly.
  • mAlkAv!An
    Options
    Offline / Send Message
    mAlkAv!An polycounter lvl 5
    True, although I thought the added max. was 4096²px?
    On a related note, try to keep the amount of instances per cluster at a power of 2 value. With the foliage tool default of 100 people might think they should go with similar values (e.g. 25,50,200) but in fact it's a waste of lightmap memory. This will also fix a bug where wrong shadows tend to appear on meshes with multiple materials.
Sign In or Register to comment.