Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Standard shader: How to add lightmap from 3dsmax on UV2?

Discussion in 'Unity 5 Pre-order Beta' started by Cascho01, Nov 4, 2014.

  1. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    I can't figure out, how to add a lightmap coming from an external package (3dsmax) usually baked to UV-Channel 2.
    Any ideas?
     
  2. ArteyS

    ArteyS

    Joined:
    Dec 15, 2014
    Posts:
    16
    I am having the exact same problem. I had hoped I could plug it in the emission channel, but I can't because i can't specify the emission channel to use UV set 2.

    Have you found a solution to this yet?
     
    JamesArndt likes this.
  3. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    No, let´s hope UT will fix this.
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    JamesArndt likes this.
  5. GabeF

    GabeF

    Joined:
    Sep 28, 2012
    Posts:
    38
    Kuba could you supply more info please? For example I have 1 lightmap atlas uv baked on 3 seperate objects from another application. It's a tga texture file. How do I apply that lightmap to uv slot 2 on the standard shader in unity? Sorry I can't find this specific info anywhere.
     
  6. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Yes, please give us at least a short list of steps on how to add a lightmap coming from Max or whatever to a standard material.
     
    JamesArndt likes this.
  7. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    I think he means something like this. Add this script to the mesh you want to assign the lightmap to.

    The process is...
    - Add your bespoke lightmap (or lightmaps) in to the lightmaps array
    - Hit 'Set Lightmap Array'
    - Set the lightmap index and tiling/offset values you want for the mesh
    - Hit 'Set Lightmap Values'
     

    Attached Files:

  8. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Thanks, but doesn´t work for me.
    No matter, however - UT guys have to implement a workflow for this.
     
    JamesArndt likes this.
  9. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Oh weird. Did you set the Lightmap Index to 0?
     
  10. Jde

    Jde

    Joined:
    Oct 2, 2011
    Posts:
    139
    Actually, you might need to turn off Continuous Baking in the lighting tab, and set lightmap mode to Non Directional too.
     
    qerrrrr likes this.