Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Lightmapping system. Three things Unity has to fix to get it efficient in real life.

Discussion in 'Editor & General Support' started by Domino-Studios, Apr 21, 2013.

  1. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
    I am in plain lightmaps phase. I have a project with 6 maps with 600+ objects each.
    I have to say it is not as smooth as I have thought.

    My main complaints :

    - Instability !!! Nice when you have a test scene. But when you have a scene with 200+ objects, the process becomes very unstable with several crashes at the step "Filter dilation" (after GI calculation). This crash is not consistant. When you are selecting a bunch of objects to "bake only selected" : one time crashes, another time all is fine...

    - Switching between plateform when you have baked your objects. DON'T !!! On my iMac (24 go RAM) It takes 8 hours to convert 100+ lightmaps from PC plateform to iOS plateform... The workaround ? Making to projetc : one for PC, one for iOS. Very efficient...

    - Ground quality. It is Beast based lighting system. So, as the wonderfull (sarcasmes) lightracer of 3DSMax, exposure is crappy. Grounds and objects perpendicular to the sun are totally over exposed, and it is very tricky to get a good exposure.

    Do you are aware of this bugs/improvment ?
     
  2. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    Hi,

    The first complaint, we may not be aware of it, please submit a bug report from the effected machine and include your project.

    The second compliant is more of a low priority workflow issue, how about you switch to iOS before baking your lightmaps, or setup and use our cache server product, it's sole purpose is to dramatically decrease asset import times. :)

    The third complaint, I'm not sure about, feel free to send that feedback in the form of a support ticket or bug report.

    Thanks,
    Chris
     
  3. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
    Hi Chris,

    and thx for your interesting reply.

    I) I have already sent 2 or 3 bug reports. The last one is 538680 but no response. Maybe they need the project. But 500mo+...

    II) I have 6 medieval scene with a lot 500+ objects. My app works on iOS and Windows. I am totally open mind on a new workflow. But your proposition seems to be the same as me. In both case I have to switch with lightmaps because very often I have to move or change a house, street, etc... so :

    In my case (before the weird workaround with two projects...)
    1) I do "Bake Selected Objects"
    2) I build all my scenes
    3) I switch to IOS/Win
    4) I build

    The big problem is that it takes so looooong to switch that it would be shorter in time to :
    1) Bake selected
    2) Build
    3) Flush the lightmaps
    4) Switch
    5) Bake
    6) Build

    0_o

    But !...
    Since the baking crashes when there are a lot of objects and lightmaps (100+ LM 1024 and 500+ game objects) it is not possible at all... So I have now two projects : one for PC, one for iOS. >_<

    I'll take a look to the asset cache server. It seems to be a good solution for me. Thx.

    [EDIT] Ok, it is not free. I have to say I can't understand why. I am not a team, I am on my own on this project. And I don't think I am the only person who needs to switch plateform with a lot of objects and lightmaps. Which is a cool feature on paper of Unity by the way. I can't get that costs 500$ to "just" accelerate (in my words, "set as normal") the import time. Is it a luxury to not wait a day for switching ?[/EDIT]

    III) I don't think they could do anything. It is the same in 3DSmax since the first release of the lightracer.
     
    Last edited: Apr 26, 2013
  4. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
    If I could add one, my big beef with the lightmapping system is the 255 map limit. I don't know if that's a Beast issue or a Unity issue, but it needs to be removed (or at least increased). Would it be so hard to use two bytes to index the lightmap rather than one?

    If, for whatever reason, it cannot be removed (or increased), we need some indication of when our settings will go over that limit. I did a bake which took over 24 hours[1], only to find I ended up with 800+ lightmaps, which means they are unusable, which means I lost a day of work with nothing to show for it. It would be really nice if, before I had to give up my computer for 24+ hours, Beast or Unity would let me know, "Hey, with those settings and that number of meshes, you are going to be beyond the 255 lightmap limit". That way I could adjust my settings beforehand.

    What really concerns me is that to get under that limit, I'm going to have to reduce my resolution by quite a lot. That bake was with a resolution of 50. Assuming I drop that by half to 25, I presume that would drop the number of maps by ~4x, so that would get me under the limit. However, I haven't even dressed my levels yet, and that will add a lot of objects to the maps once I do that. I'm worried I will be under 10 or something, and get really crappy lightmaps because of this arbitrary size limit.

    As a second option, perhaps allow us to set the size of the lightmaps before the bake. If instead of 1024x1024 I could set it to 4096x4096, that would again reduce the number baked by a factor of 4 (or so).

    Anyway, I'm pretty new to lighmapping, so if what I've said is bogus, my apologies (and do let me know if I'm off base, because I do need to learn).

    [1] I have a fairly large scene, although I don't think it's all THAT unreasonable. It's about 40 rooms, plus adjoining corridors, maybe around 1,000 objects or so.
     
  5. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    @Domino-Studios I've took a look at the bug reports you sent in and indeed they haven't been looked at yet, apologies for that. I'm going to assign them directly to a QA engineer now for further investigation, the reason it may not have been picked up yet is because of no project attached, please do upload to an FTP and reply to the case (538680) providing details of how to grab your project and reproduction steps. You should receive a reply soon

    It seems like the bug effects the workflow suggestion, hopefully the bug can be fixed asap to improve your experience with Lightmapping.

    Yes, the cache server comes at a cost, you can contact our sales team to see if they can assist you: http://unity3d.com/company/sales?type=sales

    @RonHiler you can reduce the texels-per-world-unit value on the Bake tab to reduce the number of lightmaps generated, something that packs below 256, yes that will decrease the quality but then as I mentioned in the other forum post here, you can then increase the base texture resolution from 1024x1024 to 2048x2048 or higher which increases quality.

    Thanks,
    Chris
     
  6. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
    Yes, Chris, I'm aware. If you read my post, I said the exact same thing. I will reduce my resolution until I get below 256 maps. Even if that means I have to go down to 10 or whatever.

    Let me be more succinct. What I am asking for is feedback from the lightmapping system, prior to baking, that tells us we will go beyond that limit so that I don't end up wasting an entire day burning maps that I can't use. Without that feedback, I can only guess at what resolution to use. Which means experimenting with the resolution value. Which would be fine, except each experiment takes 24 hours to run. I can't afford that sort of downtime. See what I mean?

    Maybe it's not possible to do. Perhaps Beast doesn't know how many lightmaps it would take to before it actually bakes them. But if there is any possibility of this (perhaps just a text field on the bake panel that says "Approximate number of lightmaps: X"), it would be a huge help to me.
     
  7. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    Oh totally understand that, please file that suggestion as a bug report, send me the case id and I'll forward it to the right people. Thanks for your feedback.

    Thanks,
    Chris
     
  8. RonHiler

    RonHiler

    Joined:
    Nov 3, 2011
    Posts:
    207
    Cool, thanks Chris. I send in the suggestion/bug report. As soon as I get the case id back I'll post it here.

    [EDIT: Here it is: Case 539704]
     
    Last edited: Apr 26, 2013
  9. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    I've assigned it to our developer.

    Thanks,
    Chris
     
  10. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
  11. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    this is mainly due to compressing to PVRTC (which is "best quality" for lightmaps by default). I can feel your pain, yes. You can try setting normal quality. And, as a side note, we finally got the reason for trying out fast quality, so yeah. I'll look into latter ;-)
     
  12. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
    Friend :)

    Ok I ll try to set to normal quality.

    Alexey, do you know how to reply to my bug report for the crash pb ? (I sent you a MP with the tag number).[EDIT: can't send you MP. Can I write down the case number here ?]
     
    Last edited: May 3, 2013
  13. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    @Domino-Studios you received a confirmation email after submitting your bug report? This email should contain the 6-digit case id, if you just reply to the confirmation email, that's how you reply ;).

    Thanks,
    Chris
     
  14. Domino-Studios

    Domino-Studios

    Joined:
    Oct 26, 2012
    Posts:
    31
    Ouch, simplicity has just slapped me in my face... :) Thx Chris, may I abuse and ask you to "push" my report ? :)
     
  15. CreativeChris

    CreativeChris

    Unity Technologies

    Joined:
    Jun 7, 2010
    Posts:
    456
    :).

    I see your reply, I already assigned your report to the tester owning this area, hopefully he can now test this and get back to you.

    Thanks,
    Chris