Home Unity

How do I get rid of these lighting artifacts? Unity 5

polycounter
Offline / Send Message
pixelpatron polycounter
See image: 



Unity 5

These are individual instanced pieces. So the pillar for example that is one mesh stacked on top of a another mesh.

And the roof panels....same thing, about 6 of those side by side to make up the roof. Instanced/cloned/duplicated...whatever you want to call it. All the meshes are pre-fabs and have generate Lightmap UV's and they are set to static. Also using the same material. 

So what gives people? HALP ME!!!?

Thanks.

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Is this pre-computed real-time GI, or static baked lightmap?

    What's the lightmap resolution look like in the Scene view?

    Are you using light probes and/or reflection probes?
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    pre-computed realtime GI 

    I don't have any light probes or reflection probes in the scene. (I thought those were only needed to show correct lighting on dynamic objects or character models?)
  • Eric Chadwick
    Options
    Offline / Send Message
    Light probes for dynamic objects, yeah, just checking. Though you can use reflection probes for static reflective surfaces, IIRC.

    Precomputed GI depends on resolution. If your resolution is low, that could cause the shading differences. What's the preview checker look like?
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    I'm not using "baked" I assume your referring to the lightmap resolution checkerboard?
  • Eric Chadwick
    Options
    Offline / Send Message
    Yes. Pre-computed GI uses resolution too. You can preview the checker in the Scene view. See if the checkers are too large for your meshes.

    BTW pre-computed GI is all kinds of screwed up in Unity. You're in for a world of hurt.
    http://polycount.com/discussion/177837/real-time-gi-problems-in-architectural-vr
    http://polycount.com/discussion/168236/realtime-gi-enlighten-problem/
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    Yes, I have gathered that....lol. So baked the way to go then? 
  • Eric Chadwick
    Options
    Offline / Send Message
    Unfortunately baked is also really messed up. Just a bit less so. Lighting is pretty crappy in Unity these days. :(
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    The scene view your talking about is "Scene/Global Illumination/UV Charts" - in the main working 3D viewport?
  • gsokol
    Options
    Offline / Send Message
    Hmmmm

    Have you messed with the lightmap resolution?  Maybe everything is so low res that only a few pixels are representing those pieces?  If you didn't change them, that shouldn't be an issue, though.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    Maybe merge them in your 3d editor and hence give them unified lightmap UVs? It's what I'd try.
  • Lt_Commander
    Options
    Offline / Send Message
    Lt_Commander polycounter lvl 10
    We've been dealing with the same issue, it is generally the worst when adjacent objects are assigned to different lightmap clusters. We're seeing the worst of it with with enlighten realtime GI, but the issue does occasionally crop up with the static baked lighting too. Since we're doing procedural generation pre-bake, we found that a decent solution was to use a mesh baker to force all of the submeshes into a single mesh - if you're doing static baking, make sure you get one that preserves/generates new lightmap UVs. The less unique static mesh renderers Unity has to deal with at bake, the better job it does with lightmap clustering.

    The (visually) best/most controllable solution is to just combine them in max/maya/whatever and bring them back in as a single mesh.
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    We've been dealing with the same issue, it is generally the worst when adjacent objects are assigned to different lightmap clusters. We're seeing the worst of it with with enlighten realtime GI, but the issue does occasionally crop up with the static baked lighting too. Since we're doing procedural generation pre-bake, we found that a decent solution was to use a mesh baker to force all of the submeshes into a single mesh - if you're doing static baking, make sure you get one that preserves/generates new lightmap UVs. The less unique static mesh renderers Unity has to deal with at bake, the better job it does with lightmap clustering.

    The (visually) best/most controllable solution is to just combine them in max/maya/whatever and bring them back in as a single mesh.
    So Unity has no solution for this built in? Seems really dumb. Grouping objects under one node and adding some sort of component that would tell child nested meshes to use the same atlas/cluster would be a no brainer. There anything like that built in/asset store? What is a mesh baker? Got a link?
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    Anybody use this one? Any good? Wish there was a try before you buy option sometimes.....

    https://www.assetstore.unity3d.com/en/#!/content/5017
  • SelwynPhillips
    Options
    Offline / Send Message
    SelwynPhillips polycounter lvl 11
    I have never used Mesh Baker but I have used this...
    https://www.assetstore.unity3d.com/en/#!/content/8748

    Also do you have any reflection probes in the scene? and does the box cover all the assets in that area? I sometimes find that some assets are outside the reflection probes area and are lit slightly different.


  • Lt_Commander
    Options
    Offline / Send Message
    Lt_Commander polycounter lvl 10
    It's not that unity doesn't have a solution built in, it's just kind of bad at it. It'll still batch meshes at runtime to reduce draw calls, but that doesn't do much at bake.

    We ended up getting that and one or two others - that particular one is the most powerful but really needs a script to handle selection and combining, plus it does some weird stuff with texture generation and atlasing.

    This one is less powerful but it is brain dead simple and has served us well so far. It pretty much does what you were saying Unity should do anyway.  https://www.assetstore.unity3d.com/en/#!/content/8748
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    So I'm a little confused about Unity 5's new lighting setup. I have pre-calculated real time GI set to "on" and things light when added to the scene, and most of my lights are realtime and not set to "baked" as I'm not generating visible directional light maps (the ones that used to show up in the lighting tab after hitting the light scene command)....yet the global illumination is baked reguardless of being realtime? and that's the lighting calculations you wait on when moving assets around in the scene? If true (global illumination is baked information) then- light batching/clusters and UVS and lightmap resolution become a factor?
  • jRocket
    Options
    Offline / Send Message
    jRocket polycounter lvl 18
    Try making a new LightmapParameter for your problem meshes and make sure they are in a unique "system tag".
  • pixelpatron
    Options
    Offline / Send Message
    pixelpatron polycounter
    JRocket. care to detail that out for a noob. I know Unity pretty well but not to depth needed to do what your describing. Youtube vids on process are fine too if it's general knowledge stuff most people know.....but I haven't had exposure to any those things yet.
  • jRocket
    Options
    Offline / Send Message
    jRocket polycounter lvl 18
    Select your objects and in the Lighting window select the Object tab. Then in the Advanced Parameters dropdown, choose Create New... You should then have a whole bunch of new options to choose from including baked tag and system tag.
  • Eric Chadwick
    Options
    Offline / Send Message
    So I'm a little confused about Unity 5's new lighting setup. I have pre-calculated real time GI set to "on" and things light when added to the scene, and most of my lights are realtime and not set to "baked" as I'm not generating visible directional light maps (the ones that used to show up in the lighting tab after hitting the light scene command)....yet the global illumination is baked reguardless of being realtime? and that's the lighting calculations you wait on when moving assets around in the scene? If true (global illumination is baked information) then- light batching/clusters and UVS and lightmap resolution become a factor?
    Precomputed Realtime GI only works on static meshes. For dynamic meshes, you add light probes and/or reflection probes.

    Also, I'm merging the two threads you made on the same topic. So some replies might appear a little out of sequence.
Sign In or Register to comment.