Search Unity

lightmaps from 3dsmax don´t come over to unity4 like said in unity docs...

Discussion in 'Editor & General Support' started by thomes, Dec 6, 2012.

  1. thomes

    thomes

    Joined:
    Dec 6, 2012
    Posts:
    8
    hello

    i´m new to unity4, so i do some tests for the production pipeline in our office.

    like in the unity docs (http://docs.unity3d.com/Documentation/Manual/HOWTO-ImportObjectMax.html)
    i have made a standard-3dsmax material that is mapped diffuseslot uv1 and selfilluslot uv2 with maps.
    if i import it to unity, i get a diffuse shader / base material with no lightmap. i have to convert the shader manually to lightmapped-diffuse shader and pick up the lightmap manually.

    the script of Wildpepper ( lighmap batch assigner) is no more to buy and nowhere to find
    it seems THE tool for everyone with this workflow.

    is there a method in unity4 to get this done in a second if i have a hundred of lightmaps?

    big thanks for help

    thomes
     
    Last edited: Dec 6, 2012
  2. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    The lightmap will not come into 3DS max attached, you aren't doing anything wrong. The documentation is only talking about getting the lightmap UV's into unity, not the actual lightmap texture hooked up.

    To make a system to automatically connect the light maps I wrote something that parses the name of objects and the names of the light maps, and hooks them up like that.

    So you name your objects something like:
    L010_Chair
    L009_Lamp

    and then name your light maps something like
    L001_FrontRoom

    and then based on the L### tag on the object name, or lightmap name, write a script to automatically plug the right information in to where it needs to go.
     
  3. thomes

    thomes

    Joined:
    Dec 6, 2012
    Posts:
    8
    thanks techmage

    am i the first one that asks for this?

    is there no working script around like this from wildpepper (lighmap batch assigner) ?

    i think there are hundrets of people who work with lightmaps from 3dsmax...

    unity techs , no idea ???

    thomes
     
  4. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    Yes, you're probably the first to ask for it. There are two reasons for that:
    1) Most people find Unity lightmap baking system faster / more simple
    2) The others write the necessary script themselves, since it's really simple (as long as you can script). Look at overriding this method: <http://docs.unity3d.com/Documentation/ScriptReference/AssetPostprocessor.OnAssignMaterialModel.html>. All you need to do is replace shader on the material based on names (as @techmage explained).
     
  5. thomes

    thomes

    Joined:
    Dec 6, 2012
    Posts:
    8
    thanks a lot for your help paulius

    i give it a try