Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

New Prefab System and Lightmapping

Discussion in 'Prefabs' started by Laurens-Paladin-Studios, Sep 7, 2018.

  1. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    44
    Hi there Unity,

    Im very excited that in 2018.3 the new prefab system will be available for production! Im already setting up the pipeline for one of our next games to make heavy use of this. One thing that I currently do is assigning a lightmap to the prefabs that we instantiate with our inhouse version of a Prefab Lightmap Data script:

    upload_2018-9-7_13-35-28.png

    My question is, will there be support to direcly bake lightmaps into the new prefab system? Or do we have to bake the prefebs in unique scenes to maintain all the lightmap data? Im thinking of something similar as the new navigation system that is now setup to work with prefabs instead of scenes.

    If we are on this topic anyway, embedding Light probes and Reflection probes would be the next obvious step :)

    Thank you in advance!
    Laurens
     
  2. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    There have been no features implemented that relate to Prefabs with lightmapping. Our focus has been nested Prefabs, Prefab Mode and Prefab Variants. Hopefully your existing script will continue to work or can be made to with a few tweaks.
     
  3. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    44
    Allright! Thanks for letting us know. We can definitely work arround this and the new prefab system is great anyway.
     
  4. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,143
    btw @runevision that original script came from @Joachim_Ante in the official prefab lightmap thread. Probably a good idea to actually build it in, rather than have users in a commercial environment continue to have to navigate a mess of forum posts to discover this "fix".

    At least include this script inside a package manager package for the love of god!
     
  5. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    We have much higher standards for what we require of built-in shipped features than for what we can provide in a quick example script. Built-in features require significant time and resources to complete. While it would be great to have lightmap baking into Prefabs be a built-in feature, there are lots of other things it would be great to have as well, and we can't do everything at once. Everything is a prioritization of time and resources. We are basing this prioritization based on many things. What you're all telling us you need the most being a primary one.
     
  6. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,143
    Ok, but if you have such high standards, why is the only "official" solution this example script? It seems a silly thing to not cater for, prefabbed lightmaps. I could maybe understand during 2014 when it originally happened but it is nearly 2019 now, I dont think in the modern world this is acceptable.

    Yes, it would be great to have X and Y and Z feature. But im not saying that. I am saying, you have a lightmapping system since 2014, im saying proc gen is a common thing, and i am saying it makes it difficult to do that properly with lightmapping unless you resort to these as you quite rightly say, low quality hacks.

    So brush it under whatever table, its still coming up to 5 years this hasnt really been dealt with other than the original example lightmap offset script and multiple community additions.

    It seems a sensible thing to bring up now because the current workflow, using that script, in a commercial setting is not very viable when you have a large scale project. And its frustrating to see that despite the many many many posts from many users on it, its never getting dealt with.

    Well, we have a new prefab workflow being authored. I ask you, when if not now is the time?

    Or do procedurally generated games (and sim-vis as we are at work) not deserve lightmapping after 5 years in waiting?
     
  7. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,432
    I said we have high standards for shipped built-in features. This is not a built-in feature, not because it wouldn't be desirable, but because we can't do everything.

    Your feedback that this feature should be prioritized is noted and will be taken into consideration by our product managers along with all the other requests we get.
     
    dadude123, Lurking-Ninja and optimise like this.
  8. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    44
    I'm glad to tell you that we had to do little to no refactoring of the script to make it work for the new prefab system.

    We now also included into the script being able to bake multiple prefabs in a single scene where it writes away a unique lightmap to a dedicated folder for all the prefabs. It also overwrites the previous lightmaps so we can inherit any texture import settings that we altered (like ASTC compression for mobile, disabling mipmaps etc) .

    So for now we are okay, but as GameDevCouple is saying it would be great feature to be more integrated into the prefab workflow. I can understand though that it ties into many departments and that realtime raytracing is now higher on the list to be tackled to keep up with where the industry is going ;)
     
    runevision likes this.
  9. hwizard

    hwizard

    Joined:
    Jun 30, 2016
    Posts:
    3
    Is there a chance to share this updated script?