Search Unity

General annoyance at lighting light mapping and shader mess...

Discussion in 'General Graphics' started by markfrancombe, Feb 16, 2016.

  1. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    I decided to make as mall scene to try out the new workflow/features of light-mapping in U5.
    So I first built my office in maya, and imported it.
    Immediately the light mapper was working, and within minutes it was looking pretty good, so far so good I thought!
    I wanted to crete the exact lighting that existed in the room, complete with shiny desks and shadows falling correctly, from a combination of many small "down-lights" sunlight streaming through the windows and fluorescent strip lights.
    Started adding them... light mapper went to work, looking better and better, bit dark maybe, never mind, Ill just add more lights. I didn't think that adding more lights would be a problem, as I was gonna light map the lot, no (or very few) realtime.
    So then to adding glass in the windows and interconnecting glass doors, and adding shine to them.
    I read about the new reflection probes, looked lovely, and by careful combination of settings on the shaders shininess settings, got what I wanted...
    added a few more lights, suddenly things started going wrong.
    First I got a red error, something about the profiler not having enough something (yes I dont have my project infront of me now) then I noticed all the shadows (not all weirdly, but most) were gone, then teh light mapper started acting weird. If I moved something, it would immediately look fine, really bright (maybe TOO bright, Id been adding some many lights, that I hadn't noticed that they weren't actually doing anything) but then after a few minutes, the light would cut out back to really dark again.
    THEN the big one... ALL the walls suddenly got a really horrible texture all over them, like really low res blotches. This I cant get rid of now.
    If I move a light or re-import the model, it goes back to normal, but after a while light-mapping it F***s up again.

    If I turn off lights it doesn't help if I delete lights it doesnt help... its kind of ruined my scene, which only half a day ago was looking so lovely.

    Now I get a tiny message in the lightmapper about not enough something something...
    Ill come back with the exact errors and stuff later, but..

    Any clues would be fab

    M
     
  2. Jouni-Mannonen

    Jouni-Mannonen

    Joined:
    Nov 23, 2015
    Posts:
    27
    You know, it's the "something something" that counts. You should post the error messages, maybe even as a picture in context with the scene where the error happens. Maybe, perhaps, you should give the lightmapper enough something something? :)
     
  3. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    The thing about the profiler probably means you left it running after using it during play mode, it's harmless and doesn't do anything at all.

    As for your other issues... try posting system specs, as randomly flashing/blurry textures screams GPU driver bugs/issues to me.

    Also... are you perhaps using the -force-opengl flag on windows? that never really worked well on some low-end hardware.
     
  4. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    155
    OK Jouni, thanks for the response, and the polite one at that considering I didnt post any useful info.
    The message I got in the lightmapper was
    Objects size in light map has reached the maximum atlas size.

    Now Ive had this before actually, and although I kind of know what it means (chop the geometry up into smaller bits(???) or decrease the scale in lightmap number, I a) dont know what affect this has, and b) don't know what other people do. I promise this is super simple scene in comparison to... oh I don't know... Dreamfall Chapters?... thats Unity and has huge S*** in it!!!

    AndFuzzyQuills (is that Mr FuzzyQuills or MsFuzzyQuills?) the profiler error is:
    The profiler has run out of samples for this frame. This frame will be skipped. Increase the sample limit using Profiler.maxNumberOfSamplesPerFrame

    No idea what that means at all, probably cos Ive never used the profiler (need to learn I guess)... Is this the message you were guessing it was?

    Anyway... Im not sure what has happened to my scene, I actually don't believe either of these things are to blame. All I know is that one hour it was looking great, and now it looks horrible... I Wish Id screenshot it when it was looking nice.
    I have fixed the blotchey effect,. actually by deleting the office model and re importing from scratch, I figured this has something t do with shader trouble...
    Now Im getting flat dull look, with almost no lighting effects, no shadows (or very few) some objects seem to throw a faint shadow, but most nothing, no light falling across things (Iike light from the window falling onto desks and the floor).
    Now the ONLY hint I may have for you guys is that, at about the stage it went wrong, I also imported some prop models. Computers, chairs, phones etc... now I didnt notice if that EXACTLY was what caused it, but could it be that, as they have materials,a nd sghaders, the somehow over wrote some of the new fancy U5 stuff, and tried to use their NOT VERY UNITY % COMPATIBLE crap instead? Could THAT be it? Cos when I CLOO at their shaders, i cant tell... look all OK to me... Anyway to re-set or over write all but the defaults?

    Mark
     
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Master FuzzyQuills, not exactly a married man yet... :p

    And yep, that's the error/warning I was thinking of, I often get it if I leave the profiler running after exiting play mode. (But it doesn't pop up if play modes started again beforehand)

    And those prop models... how big are they? if they're small, like a phone on a desk, EXCLUDE IT FROM THE LIGHTMAPS! having a tiny object there can actually slow things down quite a bit for no reason. (and there won't be much to show for it)

    And a screenshot could help here... unless doing so violates some NDA I don't know about. ;)