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

Hallway scene

Discussion in 'Works In Progress - Archive' started by Alabatross, Jan 7, 2014.

  1. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    A scene inspired by one of the hallways in the bf4 campaign, just messing around. I didn't make any of the props(but I have tweaked their maps) im mostly just toying with lighting. I don't see unity pushed too often so I enjoy trying to make it look like the other better engines out there :)

    I'm on a GTX 770 so originally I made this scene with everything render-wise as good as I could get it while still maintaining a minimum of 60 fps (but it ran at 110) but as youll see in the comments below people quickly fixated on the performance even though I warned them it would run slow. So I've uploaded a normal demo and the original ultra demo.



    It isn't done yet, I'm going to clean it up a bit so it looks prettier and can showcase just how powerful unity can be




     
    Last edited: Jan 2, 2015
  2. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    why does it run so crappy. Looks like a very simple scene.
     
  3. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    I'm on a GTX 770 so I maxed everything out and it works well for me. My personal limit was the same FPS I got on BF4 in the scene on ultra (70 fps)

    EDIT: Mind you it was an empty scene at the start of a campaign level, no AI or vehicles nearby. Plus if you remember frostbite was built to run on 2007 hardware for years so I'm sure they have some crazy occlusion going on, if you factor this in the scene in BF4 was also really simple.

    Of course stuff can be turned down but I didn't really build that functionality for this little scene.
     
    Last edited: Jan 8, 2014
  4. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    The scene looks gorgeous, but @kurylo3d is right, it runs horribly, even if the idea is for high end machines.
     
  5. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Is there anything wrong with targeting higher end machines like many other games do? Just because a game uses Unity doesn't automatically mean its targeting low-end machines (even though it pretty much dominates the mobile market)
     
    Last edited: Jan 8, 2014
  6. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    even the low end version has some heavy delay on the mouse.

    Nothing wrong with targerting higher end machines... when the game looks like crisis 3. But I could make this scene and make it look better... running on an ipad. No disrespect to the art, im just saying there is nothing there that warrants such huge performance drops.
     
  7. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    It doesn't matter if you're "targeting high end machines." Your scene is incredibly simple and should not be running at 70fps on a GTX 770. It should be running at more than twice that, in fact. I can not even begin to comprehend what this scene is doing to be running so poorly.
     
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    Alright, thoughts while comparing screenshots of all three scenes:

    1. Your scene is entirely static, yet it seems you're using realtime ambient occlusion instead of baking it. Why?
    2. In fact, it seems all the lights in your scene are dynamic. Why? This scene is almost entirely static. You could bake it and get the same effect with less overhead. You could probably use light probes for far greater effect.
    3. If I had to guess, you're just using the Unity Pro effects like bloom and whatnot and cranking them up to 11. Most of the Unity effects included by default are kinda slow as hell. You should look into custom solutions.
    4. Ask yourself this important question: "why does the scene need this?" for everything you add. I think you'll find that the answer is "it doesn't" more often than not.
     
  9. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    I think the really 'heavy' mouse look script is making it pretty hard to judge the performance accurately. Is it some custom script or just the one from the standard assets with the sensitivity dialed down??
     
  10. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Ok so yea I realized the mouse script I used is too heavy and feels like lag, because theres really no way the low should be lagging because its absolutely nothing.

    I havent baked a scene in a very long time (last project had to do with boats so you can't really bake anything there lol) and couldn't figure out why the lightmaps were wrong even though I've done it before. Figured it out and will bake it.



    Only post effect im using is ambient occlusion and bloom, but the bloom is so light if I turn it off theres hardly a difference (less is more believe me)

    EDIT: Apparently bloom hardly has a hit with my gpu but on other peoples it can be rough. And it doesn't help that I had it on its highest quality blur.


    I actually made a mistake, when I run it standalone I get about 110 on my 770 without the editor overhead. On battlefield 4 my 770 only gets 69 fps in a similar scene on ultra. Very few of you probably have gaming pcs right?

    Can you please do that (no sarcasm) I'm interested, would you just bake it and be done?


    Ill bake it and post back
     
    Last edited: Jan 8, 2014
  11. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Are you using deferred rendering? Forward rendering decimates realtime light performance, meanwhile I'm getting about 100FPS with dozens of lights with deferred rendering. Also, ambient occlusion is a real performance killer. :)
     
  12. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Isn't deferred rendering incompatible with MSAA?

    I've been playing with baking it for a little while now and this is the best I can get it to look, which isn't as good as when it was fully dynamic:


    Not to mention every friend of mine who plays high-end games gets well over 60 when running this scene un baked, how many of you would actually consider your pcs to be gaming rigs?
     
    Last edited: Jan 8, 2014
  13. gsokol

    gsokol

    Joined:
    Oct 5, 2010
    Posts:
    76
    Looks cool. Couple things:

    The spec on the walls seems a little strong. It almost looks like its white paint marks instead of just being specular response. It looks like its only affecting the middle area of the wall too, instead of the whole wall.

    The base specular value of the lockers seems kinda low. The surfaces don't read like metal to me.

    The dust particles you have from the windows are moving really fast. They look less like floating particles and more like a swarm of gnats. (unless thats what your going for)


    I feel like the hallway is a little cramped. Maybe it could be like 25 percent wider?


    I think your doing a good job so far of building an atmosphere. Definitely feels like a run down, derelict building. Keep it up!
     
  14. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    Runs fine on my PC, or is it already baked?
     
  15. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Nope I haven't baked anything yet, but this is good to hear. Those saying it runs horribly would probably run high-end games horribly also (shouldn't be any surprise there)
     
  16. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    you're not seriously comparing a hallway to a chunk of map in bf4, where there is no doubt a tonne of other stuff going on...



    looks well done though. Might try it later on my gaming rig...
     
  17. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Haha no of course not, but once you factor in the culling going on in a top of the line engine like Frostbite you're also dealing with a very simple scene. It was actually the very beginning also, no ai or anything. Most of the 'game' overhead would be taxing the cpu anyway would it not? Obviously I wouldn't use a large firefight scene to gauge the performance.


    I'm just getting mixed signals here. Some saying it runs terribly and some (confirmed gamers) saying it runs well. I know Unity has alot of mobile devs, perhaps they were expecting a 100% baked scene? With that logic couldn't DICE have just baked their entire multiplayer maps into giant lightmaps and had it run at 60fps on the 360/ps3? Even though you were lucky to even get 30 fps in battlefield 3 on consoles...? Sure I could bake the maps for this small little demo area but what if it was a much bigger scene?
     
    Last edited: Jan 8, 2014
  18. Kridian

    Kridian

    Joined:
    Jan 24, 2012
    Posts:
    55
    Smooth here. It only stutters when you're going forward (W) and then pan with your mouse, so yeah, something wrong with the mouse controls. When sitting still, then pan with the mouse–it's smooth.
     
  19. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223

    Going to look for a better mouse script now


     
    Last edited: Jan 8, 2014
  20. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I already have done that... here is something running on android tegra 2 processor.. (PC version looks way better with all the glow and sunshafts and windows..) At the end of the day.. if you use post process effects.. you find the correct settings.. you don't crank them up to ridiculous amounts. That is more then likely your biggest issue. 2nd issue is draw calls... combine things... Though like I said your scene is like empty... and don't even try to compare yourself to battlefield 3... your not in line with battlefield lol... You have a hugely powerful graphcis card... I should be getting 100 fps in your scene on my laptop with is running an NVidia 9800gtx .. instead im lagging to hell.. the high settings one gives me like 2-5 frames per second. I run the original crisis on this thing fine, but I cant run your hallway. TRUST ME ... that's a problem. Oh and if your not using deferred rendering.. if your using forward rendering.. every time an additional light hits an object it has to rerender that object.

    $debree1.jpg
    $debree2.jpg
    $debree3.jpg
    $debree4.jpg
     
    Last edited: Jan 8, 2014
  21. rsoares

    rsoares

    Joined:
    Mar 19, 2013
    Posts:
    35
    dude get real, just the amount of code atached to one model they made, is more than you will ever write in your intire life so put that on top of your "pretty" graphics and tell me how it runs, or keep being an ignorant im just LMAO here ^^
     
  22. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Most of the game architecture would be taxing the cpu would it not?

    I'm surprised many of you think I have tons of stuff going on, when in reality its most likely the 8x MSAA/SSAO thats slowing you guys down. I just like my smooth lines lol.

    I turned everything up because I wanted it to look as good as I could get it for my card, thats all I'm saying. Many of you are surprised its running slow and I don't know why. Obviously I'd turn settings down if I was making a real game and keep everything balanced.
     
    Last edited: Jan 24, 2015
  23. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Guys let's keep it polite in here shall we? Otherwise I won't hesitate to close it and give out infractions.
     
  24. rsoares

    rsoares

    Joined:
    Mar 19, 2013
    Posts:
    35
    yes, im pretty sure u went the ignorant way..

    Since when code doesnt affect frames per second ?

    Also you know BF4 uses less GPU power than BF3, while still looking better?

    btw no one would bash here if you ware real and didnt compare the most simplistic of the scenes to a full 3xA game... that still has tons of logic behind to process other than fancy graphics.

    Word of advice, go read about optimization and reply back when you do, instead of keeping hiding behind ignorance.
     
  25. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Actually many people agree 3 and 4 run pretty much the same, and some agree BF4 runs worse because of microstuttering on some cards.

    I'm confused here, because the campaign scene was also very simple and like I said had no AI or vehicles. Even if it did AI logic/physics simulations usually tax the cpu right? The only thing thatd slow it down is the triangle count for the scene going up when marines are in view (which there werent any)


    You mean turning some settings down? Sure I could do that but why do that when my card can handle it?
     
    Last edited: Jan 24, 2015
  26. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    Odds are, that scene is going to be making use of multiple materials, DICE's translucency approximations, semi-realtime radiosity, and any other number of effects that are core to the Frostbite engine. There might even be some tessellation at play. Your scene, however, is comparatively nothing but barely seeing any significant performance gains. There's some serious optimisation issues at play in your scene and it has nothing to do with targeting high-end hardware.
     
  27. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    How come if I duplicate my hallway 11 times I still get 95 fps?

    edit: just tried 22 hallways and I get 94 fps


    What is there left to optimize? Its a directional light, 2 point lights, and 0.2 of bloom + SSAO
     
    Last edited: Jan 8, 2014
  28. rsoares

    rsoares

    Joined:
    Mar 19, 2013
    Posts:
    35
    as i said LMAO over here :)

    if u are up for a chalange, do a complete building and the needed game logic and post the results here, im sure everyone here would like to see the outcome of it.

    also what sort's of optimization did you do ? ahh that´s rigth none. so wy u so blatant to defend state of the art unity render ?
     
  29. rsoares

    rsoares

    Joined:
    Mar 19, 2013
    Posts:
    35
    when u have no arguments, correct their gramar.

    i would also like to see you write in my native language to see how that would work for you, probably it would need the same sort of optimization you scene needs..

    everyone is pointing you the obvius, after this point when you dont want feedback or dont even try to understand whats wrong, dont even bother to post in here again, ppl will just flame you for days..
     
  30. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    Because Unity is going to be batching almost all of that.
     
  31. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,386
    Childishness level in here is over 9000.
     
  32. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    What if I put a 60k triangle model ship in the middle of the hallway and add 6 more point lights? And still get 91?

    I thought Unity does not batch dynamic shadow casters?
     
    Last edited: Jan 24, 2015
  33. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    I'm starting to wonder if you read my post where I pointed out all those other things the Frostbite engine actually does other than just pushing polygons.
     
  34. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Obviously unity isn't frostbite, but whats the problem with this scene running slow for users without gaming rigs? Seems perfectly normal. Even if it is simple adding that model ship would surely make it count as complex right?
     
  35. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    No. It wouldn't. This isn't "for gaming rigs" unless your entire game takes place in a hallway with three lights and, what, five materials? If you want to make a game that's "for gaming rigs" then it actually has to be making use of the advantages of a modern engine. What you're doing is just incredibly poor optimisation.
     
  36. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    So you're saying don't use unity since it caters to mobile and low-level PC?

    Like I said it was mostly the 8x MSAA I had enabled in the web player, as one directional light and 2 point lights should be nothing slow. And there is nothing else happening in the scene at all
     
  37. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,764
    No, I'm saying that you need to optimise your S***. If you want to push Unity like that, you're going to need to work for it. But whatever, I'm out. You're clearly not listening to any of the advice given to you.
     
  38. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    How does this run for you? https://dl.dropboxusercontent.com/u/51734341/lighting/lighting.html

    By optimizing you must mean turning stuff down? Sure I could do that but if it runs fine on my hardware why do that unless I have to (like when making an actual game with quality settings)

    Why do I get 35 fps on my crappy $300 laptop with integrated graphics then?
     
    Last edited: Jan 8, 2014
  39. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    There really is no reason to debate with this guy... hes so dead set on saying he did everything right and battlefield quality.. that logic and reason go out the window. For your information my 9800 gtx run crisis on all high with somethings on very high at 30 fps. so your things is 5 fps on its highest.. and judging about the other replies in here.. im not the only one getting terrible performance on your thing. That alone is proof enough.

    As for my scene I told you the platform. It was tegra 2 Android. The PC version is comparable to yours with all the pretty effects lol, but I don't have that with me so I cant take screen grabs at that one. But it was just proving a point that with optimization you can make a room full of stuff run on the crappiest hardware. You cant even make yours run on something that is 3 generations past the playstation 3 hardware wise.

    And to be helpful, it may very well be a cpu bottleneck and not a gpu bottleneck. If you have a script in there taking up the processors time because its so crappy, then that means the cpu has no time to handle the draw calls to send to the GPU.. hence why you limit your draw calls in the first place. To eliminate the cpu bottle neck.

    As for your latest upload, runs fine. Though I have no idea of the fps count on this one. Im just eyeballing it.
     
    Last edited: Jan 8, 2014
  40. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    On a low resolution I'm sure because I was lucky to even get 22 fps in crysis when I had the 9800gtx on 1600x900


    Thank you. My laptop runs the new upload at 30 fps and it has integrated graphics, so I know you guys can run it.

    All I did was turn off the x8 MSAA and the SSAO which are usually memory hogs
     
  41. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Dude batman arkham city requires an NVidia 8800 GT... Believe me, you can do a lot with very little. And your wrong about crisis. Maybe you had your water set to very high, you had to play with it. But still crisis ran better then your scene which is still the same point that you cant refute lol. Dude stop taking criticism so personally, and instead of trying to justify why your scene ran bad you should have been trying to learn how to fix it so it runs good.

    You probably also had the SSAO settings cranked way up to ridiculous amounts, and did you have a different camera script on this one?
     
    Last edited: Jan 8, 2014
  42. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Albatross, the scene doesn't run smooth on my end either and others reported sluggishness as well. I suggest you take that as an indication for further optimization. Getting involved in arguments doesn't help your "scene/game" or credibility. This isn't the Frostbite engine. Regardless, how about you turn off all FullscreenFX for starters and upload that as build. Nobody here is after you but you have to take critique in a professional manner otherwise you will quickly end up as "the guy who just blows up" and nobody will care anymore.

    PostFX are usually pretty expensive on the hardware. Keep that in mind.
     
  43. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    This is most likely what I did, on my 770 I didn't notice much of a performance hit from the SSAO so I just cranked it up till it looked smooth and completely forgot it can affect other cards differently. Newer GPUs handle AO very well

    This one has no other camera scripts other than a light glaze of bloom which I should also double check its blur quality and also FXAA which I left at default

    The only other thing I can think of is the decals but I doubt those have much of an impact

    Hows https://dl.dropboxusercontent.com/u/51734341/lighting/lighting.html
     
    Last edited: Jan 8, 2014
  44. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Well there ya go. That already runs so much better! No easy with the PostFX! ;)
     
  45. gsokol

    gsokol

    Joined:
    Oct 5, 2010
    Posts:
    76
    Yeah, if your cranking anti aliasing up a bunch that will drop framerate for peeps for sure. I'm not in the camp that you need to make a super efficient, game res scene if your kinda pushing this to make something pretty. Not sure why some people are getting such bad framerates, ive tried the webplayer on two different machines...one with a 560ti and another with a 460 and got very steady framerate the whole time. Maybe its the browser? I was using IE...chrome kinda sucks for webplayers for me.


    I think people posting things like "here is my work its better than yours, and I bet you can't do this" are just toxic. And your derailing the thread.

    @Alabatross - hopefully you can figure out why the webplayer is running slow for people. Seems like a simple hallway with 3 lights souldn't be this bad....so like others said...it may largely have to do with AA/post processing.

    (ninja edit: sounds like Thomas Pasieka confirmed that in his previous post :))

    Also running through it again...it seems odd that the right side of the hallway has no doorways...and only a handful of lockers...if the rest were ripped from the wall/fell...where did they go?
     
    Last edited: Jan 8, 2014
  46. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    It was a misunderstanding, when people said I should optimize the scene I thought they meant objects/decals/lightrays. I knew I could turn settings down but didn't want to because it ran well on my card and I wanted it to be as pretty as possible while still being 60fps minimum (for me it ran at 110). I got defensive because I even put a warning over the link that said it would run slow yet people still focused on that

    Eh don't worry about the design itself lol. I made this mostly to fool with lighting, ill slowly recreate the props and hopefully the scene will make more sense.


    In his defense I did ask him to post pictures because he said he could make my scene look better and have it run on an ipad. Needed some proof there lol


    I've re-uploaded the maxed out one just so people with higher end systems can see it in its glory
     
    Last edited: Jan 8, 2014
  47. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Back to art updates now that performance is out of the way
     
    Last edited: May 20, 2015
  48. Cynikal

    Cynikal

    Joined:
    Oct 29, 2012
    Posts:
    122
    AMD FX 8150
    12 Gig Ram
    GeForce GTX 570

    The ultra demo runs smooth as silk.
     
  49. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Great to hear!
     
  50. NomadKing

    NomadKing

    Joined:
    Feb 11, 2010
    Posts:
    1,461
    As a test, just had the ultra demo running my old machine (2Ghz dual core Athlon, 2GB ram, GeForce GT240) - runs smooth and is much nicer to play with the mouse script changes. Not bad looking for just a corridor ;)