Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Combine Children script and Light Mapped objects

Discussion in 'Editor & General Support' started by nathanp812, May 18, 2010.

  1. nathanp812

    nathanp812

    Joined:
    Nov 23, 2009
    Posts:
    27
    Hi all,

    I am trying to light map my level using the external lightmapping tool.

    Everything works as expected, however some objects that I have used the combine children script on only render black when the level loads.

    If I remove the script all the light mapped information displays correctly but my draw calls goes up a lot (500+ draw calls). Ideally I would like to combine these objects as they are all identical and packed into a close area.

    I feel that I may have overlooked something. The shader I am using on the combined objects is the ExternalLightMappingTool/LightMappedDiffuse.

    Has anyone else encountered this issue?
    :?
     
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,356
    I haven't tried the external light mapping tool, but are your objects sharing a light map or not? If they aren't, then their meshes can't be combined without using the wrong light map for most of them.
     
  3. nathanp812

    nathanp812

    Joined:
    Nov 23, 2009
    Posts:
    27
    Hi Daniel,

    Thanks for the reply. Yes, all my combined objects are sharing the same light map. This is why I am a little confused about what could be causing the problem.
     
  4. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,325
    The ELT assigns light maps based on unique IDs which are probably getting overwritten when they are combined using the Combine Children script. Not sure if there is any way around this.
     
  5. nathanp812

    nathanp812

    Joined:
    Nov 23, 2009
    Posts:
    27
    Thanks for the information. I guess my only alternative is to implement my own LOD system for these objects.
     
  6. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    To solve this problem you have to assign an extra uv-set to your objects in your 3d-application.

    If you´re using maya, I have a mel-script that speeds up this process if you have a lot of objects. Send me a pm if interested.
     
  7. BuGjAE

    BuGjAE

    Joined:
    Sep 9, 2010
    Posts:
    2
    I have the same problem . every time I create Lightmap when apply combine children the object disappears. anyone know how to fix this?
     
  8. immFX

    immFX

    Joined:
    Mar 20, 2010
    Posts:
    109
    Me too!
    Any ideas?
     
  9. immFX

    immFX

    Joined:
    Mar 20, 2010
    Posts:
    109
    To be more precise, Beast lightmapping does work with CombineChildren script.
    The thing that doesn't work is CombineChildren script on Static objects.

    Therefore, are we to assume that we must first test thoroughly our level with Umbra culling and then test it with (scripted) Mesh Merging, and pick the one that delivers the more fps?
     
  10. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
    Bump~

    Any more thoughts on this?
     
unityunity