Search Unity

[External Lightmap Tool] Problem with materials

Discussion in 'Formats & External Tools' started by Roundhouse, Sep 1, 2010.

  1. Roundhouse

    Roundhouse

    Joined:
    Aug 29, 2010
    Posts:
    17
    Hi guys,

    I have been trying to light map a BSP converted level mesh (converted using Harry's BSP2OBJ tool) but I'm getting weird results. I think since some material were used as tiles, some textures don't have power-of-two sizes, and some are even used redundantly that's why my lightmapped shadows are also repeated on the level.

    Is there a way around this? I can see that in the demos of the lightmap tool that some models were duplicated within the level and they were lightmapped independently from each other's textures. Why can't I get the same behavior?

    The level:
    http://rapidshare.com/files/416410331/mapDunwich.unitypackage
     
  2. ranza

    ranza

    Joined:
    May 8, 2009
    Posts:
    44
    I cannot exactly say what can be the problem, but certainly textures which use the 1st UV channel can be tiled without any influence on lightmapping.
    In fact you should use the 2nd UV for lightmapping. The 2nd UV map should be unwrapped, but from what I see your model (map_DunwichPrefab) isn't unwrapped at all.

    You can talk to me on skype if you feel confused about this stuff. The username is the same.
     
  3. Roundhouse

    Roundhouse

    Joined:
    Aug 29, 2010
    Posts:
    17
    Thanks for the reply. I'm still figuring out the workflow.

    Hmmm... I'm aware that BSP maps use "brushes" instead of actual static meshes. So the converter was the one who created the static meshes most probably.

    Will copying over the UV map from channel 1 to channel 2 solve it? I was just not entertaining the idea since there are tons of elements in the model since it is a level, but if that's what it takes, i'll just have to bite the bullet and work on copying over the UVs.
     
  4. Roundhouse

    Roundhouse

    Joined:
    Aug 29, 2010
    Posts:
    17
    Sorry ranza, my bad...

    You are right. I changed my workflow. After I convert to OBJ, I import directly to 3ds max and add in 2 Unwrap UVW modifiers, 1 for channel 1 and the other for channel 2. Then flatten the UVs on channel 2 then save.

    I then import the max scene to Unity then use your tool. Works like a charm!

    Great tool!