Search Unity

A different perspective on Unity development.!

Discussion in 'General Discussion' started by Deleted User, Jun 7, 2016.

  1. Deleted User

    Deleted User

    Guest

    Using engine statistics, you will get editor overhead whilst doing that so it'll generally be slower than it would be in a build. As for fraps, well not a clue what it does but it doesn't seem very accurate..

    @GarBenjamin

    In terms of graphics, Unity doesn't worry me.. There's plenty of asset store stuff, I only need it to look as good as Witcher 3 for example which I can't think of a good enough reason why I couldn't. Secondly it has middleware like Umbra which in games like these is invaluable. I could easily make the game in Unity and have relatively no issues at all (even if it would be 10X the amount of work)...

    Although I'll be open about it for once, the reason I'm trying to do everything else under the sun is because I'm angry at Unity. They strung me along for about eight months at the time of Unity 5.X's release promising it would fix all the issues, so I was like sure.. Keep working with the editor crashing every ten minutes or so until they get it out the door. I'm the muppet for believing them I guess?

    By the time it actually got it's half baked debut, I'd had enough.. Reason I don't use Unity is out of principle and nothing else, I didn't even get anything in the way of an apology. I might have to swallow my pride, but it's not something I'll forget any time soon.

    Again, I've not a problem with the engine.. But I do have a problem with Unity themselves.! Every piece of news I hear from them lately just compounds that feeling, they want to charge more but they can't justify it in relation to their competition. It's one silly decision after the next.. What I should pay more for an inferior product?

    In terms of rendering performance, UE is better at it "generally" but you're stuck with the inherent issues with some of the choices they made. Which makes specific games slightly problematic dependant on your target group..! Yes on medium settings it does look far worse than Unity does.
     
    Last edited by a moderator: Jun 16, 2016
  2. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I made a stress test also, the scene dropped from some 90fps to quickly qround 50fps with one character above a terrain and many trees, foliage.The engine is slow until you can optimize it yourself with tools, good practices, and source code, this is not out of the box and not for a beginner.
    This is hard work but i don't knwo if it is possible to really push UE4, perhaps the base rendering is too slow ?

    CobaltUDK did a great job optimizing UDK

    His work is just impressive
    https://www.youtube.com/user/cobaltudk/videos?view=0&shelf_id=1&sort=dd

    Why didn't you picked up CryEngine ? C# access, new optimized redering, GPU particles, volumetric clouds and fog , big outdoors at blazing speed with SVOGI "on" :rolleyes:. It is the number one optimized engine available for indies.
     
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    15,349
    It may be the best optimized, but it's still CryEngine. A terrible community, poor documentation, etc.
     
    tatoforever and Martin_H like this.
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,796
    It also scales absolutely terribly. With Unity and even UE4, I can actually scale down my games so they can run on integrated graphics cards. With CryEngine that's basically an impossibility.
     
    Martin_H and Ryiah like this.
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    What I found really slow in Unity is the culling/occlusion system. Take a look at the profiler and see how much it takes to cull a scene with dense foliage. Most of the time 50% of rendering time, specially on terrain. Has anyone tried the new instance rendering? I'm putting out a heavy testing scene right now and would like to give it a go.
     
    Deleted User likes this.
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,975
    Is it possible to disable terrain culling or do it manually? Or limit it to frustrum culling? In my usecase I think frustrum culling would be more than enough, because I've got an almost topdown perspective and every other culling calculation seems like a waste of CPU time to me.
     
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    Nop, you can't disable it. Basically it's a "deal with it" situation. :\
    Unity is quite flexible in some parts but very rigid and archaic on other parts.
     
    Martin_H and Deleted User like this.
  8. Deleted User

    Deleted User

    Guest

    I told them what the exact issue was about six months ago, they really need something like a forward + path attached to their deferred grid system or even just a forward + path would do.. This is also why it's not exactly ideal either for some mobile games and other stuff like water looks rubbish and is quite heavy.!

    I've not had a proper look but I'd gather quite a few "pro's" the engine has is attached to the renderer like the shader framework.. It's of course been made specifically for it..! There are other "inherent flaws" with the engine, as there is with every engine but this starts to become a very slippy slope if you're not careful.

    We already run a slightly "customised" version of UE, if we were to fix / change some of the major systems and replace the renderer then all of a sudden most of those inherent issues shift from Epic to ourselves in which we find we're spending most of our time fixing issues because we can't upgrade, or we suffer a month or two fixing issues whenever we upgrade.

    This is the downside of all pre-made engines, you seriously push against it as an indie and you can find yourself in a world of pain. It's not about being a beginner or a pro, it's about time really...

    I'm not complaining, after all I was just testing and I could just avoid most of these scenario's by just "doing something else" or using something else but engines can sway what you do with them unless you're prepared to suck it up.

    I've known this all along and the engine at the moment is still kind of irrelevant (just working on art), the only other engine that interests me besides Unity is Lumberyard. Not only do Amazon have a great sense of what needs to be done (instead of just tackling "graphics"), they added a full .FBX import pipeline / Component based scripting / Substance materials and they are adding speedtree.
     
    Martin_H likes this.
  9. Deleted User

    Deleted User

    Guest

    I'll take it that's the waitfor thingy that pops up in the profiler? I know @hippocoder has tried the new instancing system, he was mumbling something about changing shaders? It's something I need to look at too.
     
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    Culling is a different problem. With culling you can either use instancing to avoid culling ie draw a bunch of them manually or use culling groups to swap a combined mesh in for distance, that's what most games do. I dunno why Unity's culling is so slow. I do know it redoes it for every camera though.

    It's threaded now so culling should be better. If you're still getting too much time spent in culling I guess it's either a bug, poor cpu or some other issue like having too many objects.
     
  11. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,051
    On my new project, I know the instancing has been tested and worked with quite a bit, and everything I have heard has been very positive, but I personally haven't looked at it yet. ( Don't even have the project checked out yet. ;) )
     
    Deleted User likes this.
  12. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    Is there any document about instancing out there? I want to check it out.
     
  13. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    You have any good links for info on this (other than like the manual)? I also get craploads of time in culling.

    Would really like to learn more about how to address this.
     
    Martin_H and tatoforever like this.
  14. Deleted User

    Deleted User

    Guest

    What happens in the profiler once you've baked occlusion via umbra? I'd of thought it should alleviate this somewhat? Sorry, not used it in a while and this is something I need to check out again.
     
  15. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    It definitely helps. But it's still a non trivial cost. I could just be doing a crap job at giving it hints? I'm pretty green on the subject honestly.

    Is there any guidance on how much time should generally be expected for culling? My scenes tend to be fairly simple in terms of desktop games. My hardware is also -- complete garbage -- so there's that.
     
    Deleted User likes this.
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    I assumed everyone was talking about the normal culling unity does for the camera. If you're talking about umbra then I have no clue as I haven't used umbra for a couple of years, just doing my own portal based culling. I should check it out again.

    Regarding how long culling should take I would like it to be sub 0.5ms on a decent console but that's far from what I get. I'm going to have to do some more work there later.
     
  17. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    Why would you roll your own occlusion culling?

    Umbra is still built in no? As in like "occlusion tab" and click bake - or am I super misinformed?
     
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    Cos it costs perf, it's far from free. I will be checking it out again later, when I get there though. Maybe it got improved.
     
  19. Deleted User

    Deleted User

    Guest

    The HZBOcclusion I wrote (not for Unity) takes 2.1ms on densely populated areas, if your experiencing anything 5+ then I'd report that as a bug to Unity..
     
    frosted likes this.
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    CryEngine is better and have better advanced graphics effects, Lumberyard is based on an older CryEngine version that don't have the new speed improvment, GPU particles, better SVOGI and all other stuff.
    Or the new sky system
     
  21. Deleted User

    Deleted User

    Guest

    That's great and all, but have you ever built a game end to end in CryEngine? What about speed of use etc.? It comes down to more than slight optimisations and graphics. Also LY has GPU particles now AFAIK.!
     
    Martin_H likes this.
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    2.1ms for culling is way beyond what is sane for any game. You need culling to be <1ms, you only have 16 of them!
     
    Martin_H and McMayhem like this.
  23. Deleted User

    Deleted User

    Guest

    It's around 2ms in Unreal and I don't have any issues, although in a full scene the total render cost is 9ms which is lower than Unity.! So it kind of depends, would love to have your OC solution though master hippo ;)..

    Not saying it shouldn't be better though.. It's a work in progress :)..
     
  24. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    Right now, I have a scene that costs about 5ms in culling.

    There are no objects aside from terrain and grass. Admittedly, I am using quite a lot of grass. The main chunk of the cost is in SceneCulling, with spikes of up to 2.5ms purely under CullPerObjectLights.

    This is in deferred. There are no trees. Terrain is 500x500.

    I assume this is 100% due to heavy grass coverage - given that ... all there is in the scene is grass.

    (this is baked although, I don't think that would actually do anything in this case)
     
    Martin_H likes this.
  25. Deleted User

    Deleted User

    Guest

    That's still a ridiculous amount, I'll test it out as well.. I'd get Unity to look into it definatley.! BTW, what version of Unity are you using?
     
  26. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    I'm running 5.3.4.1f

    Interestingly, I think most of it is because of the skybox I'm using. It's an asset store item and it clearly has some issues with the culling system. If I turn off the terrain, I still get culling times of over 1ms (as in like an empty scene, just skybox).

    Very weird stuff... I'll dig into this later.
     
    Martin_H and Deleted User like this.
  27. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,070
    What do you guys think about the idea of not updating or changing anything about the engine once you begin production? Sure, you might miss out on a few goodies down the line, but basically you can be sure that no new bugs are going to make it in. You can plan at the beginning what you can or can't do without and decide then which engine to use, and not be replanning due to, e.g. a big new feature coming in, but turning out to be unuseable for some reason (but you only find out once you've updated the whole engine, introduced a whole host of new bugs and reworked the game around this new feature).

    Good games were made last year and the year before, so it's not like it's impossible to just do without new stuff and it might give extra peace of mind and speed things up a fair bit.

    For Windows, I use this approach. Maybe it's not a good idea for a few reasons but I don't update Windows really once I have it going well.
     
    Martin_H likes this.
  28. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    @ShadowK and @hippocoder hey guys - thanks for bringing up the culling subject.

    I saw those culling numbers being expensive but I never really had any idea about what they should be. So I didn't realize something was terribly wrong. I thought it was par for the course. Knowing that I can potentially get back 2-5ms by figuring this out is a huge deal.

    Thanks!
     
    Martin_H and Deleted User like this.
  29. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    They should be sub 1ms or close around the 1ms mark. This just seems bugged as hell in profiler if it's taking a few ms on a blank scene.

    I had hundreds of objects in my old platform game and that ran 60fps on mobile with <1ms culling. That is a good culling cost.

    Are you using umbra by any chance? also: static batching still performs culling. You're better off merging all the little objects and culling that one chunk.
     
    kB11 and Deleted User like this.
  30. Deleted User

    Deleted User

    Guest

    It depends on how many bugs in the version your using at the time and / or if the feature sets are a must have for your game. Like GPU instancing is pretty much a must for me so I'd be inclined to use 5.4+..

    I don't often upgrade though, we were on UE 4.5 for a long time..

    @zenGarden

    I checked out the CE forums to see what's the crack, apart from the fact that hardly anyone seems to be using it (questions section pretty much empty with no replies from CryTek, forums pretty much deserted).. The only things I really saw were people asking to go back to CE3 because CE5 is so bugged out they don't want to deal with it..

    Doesn't exactly make me want to run in their direction.
     
    Last edited by a moderator: Jun 17, 2016
    Martin_H and Billy4184 like this.
  31. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    Ok - I just did a test.

    - Empty fresh scene.
    - Add stock terrain (no settings adjusted, pure stock).
    - Sit the camera so it can view a good portion of the terrain (3.2k tris, 10 batch).

    I get culling spikes at 2.2ms w/ 1.9ms in "CullPerObjectLights".

    If I turn occlusion culling off on the camera I can still get culling spikes up to around .7ms.

    The terrain itself has around 6 steps under culling even when the camera culling is off. The terrain details render takes .1ms alone - this is when the terrain has no details at all!

    Terrain is clearly very expensive and adds a ton of overhead to the culling system. Also worth noting - switching to forward drops the culling costs really dramatically.

    Is this like bug report stuff - or is this just me having terrible hardware?
     
    Last edited: Jun 17, 2016
    Martin_H and Deleted User like this.
  32. Deleted User

    Deleted User

    Guest

    How terrible is this hardware? I definatley think it's bug report scenario, you gotta remember this isn't just for PC's / Desktop it's supposed to run well on mobile. Nothing but a terrain shouldn't have that sort of overhead..
     
  33. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,807
    Its a low end AMD from 2014. FX7500.

    I originally bought it because I was targeting integrated graphics (and keeping the mobile door open), so I figured it made sense to work on something close to target. Since then, I've gotten a wee bit more ambitious.

    I'm going to chalk the 'empty scene' stuff up to crap hardware. The skybox otoh is causing real problems and I need to dig into it. I wish I knew what the "CullPerObjectLights" was doing.
     
    Martin_H likes this.
  34. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,051
    We generally try to use this approach, and generally stick to it with regards to features. But we always have to update at some point. Our dev cycle is usually about a year and half, and our target platforms are the 3 mobile ones. With platform hardware and software changes upgrades aren't optional.
     
    Ony, Martin_H and Billy4184 like this.
  35. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    If I remember correctly CE does HW Occlusion Queries on the GPU. Unity on the other hand doesn't do that, it must be pre-baked. One of the many reasons it sux so hard with large open worlds. Plus the fact that, it needs to be pre-baked which is a nono for large dense terrains as it takes a huge amount of time. HW Occlusion Queries works totally dynamic.
    Add on top of that Enlighteen horrible tedious long crapo yacko bakes which doesn't work on dynamic scenes and I won't start on the navigation system thingy.
    Long story short, right now, Unity is not made for dynamic large populated scenes.
     
    darkhog, Martin_H and Deleted User like this.
  36. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,070
    Yeah for mobile that definitely makes sense, considering how fast things change in that ecosystem.
     
  37. Deleted User

    Deleted User

    Guest

    I was too curious not to test this out.. Ok.!

    Nothing but terrain: 1.6 ms in frustrum culling.
    Terrain + 11 Million tris worth of trees (@ 3,000 tris a piece that's around 3666 trees): 1.6ms frustrum culling.

    Version 5.3

    All ran at 60+ FPS, if nothing else that's light years better than UE.. It can't even come near for dense foliage.!

    When I used the profiler to check the same stats, it dropped to 30FPS.. So it's pretty much useless.!

    Edit: When I mean dense, I mean DENSE.!

    Dense.jpg
     
    Last edited by a moderator: Jun 17, 2016
    Martin_H, Adam-Sowinski and frosted like this.
  38. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,975
    For me it entirely depends on my past experiences. Windows: hands off once it's working. GPU drivers: twice a year maybe. Wacom driver: never because for me only one of them wasn't crap so far. Blender: almost always use newest version or the one before that if I'm lazy or mid project - never any issues. Unity: just had to go back to 5.3.5 because 5.4 was too bad. But 5.3.5 doesn't feel stable and fast enough to really stay there for a serious project. I'd be all for sticking with an old version, if it does what you need and is stable. But I don't get the impression there is such a version in the 5.x cycle yet.

    You mean the profiler itself dropped you from 60fps to 30?
     
    Billy4184 likes this.
  39. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,508
    Profiler, is good for seeing differences, it's useless as an actual measurement for what something really takes. So you can use it to figure out if your optimisation's delta is better or worse and get a decent idea of what costs more, you can't use it for accurate numbers due to it's own overhead.
     
    Martin_H likes this.
  40. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,297
    Why do you need to render dense foliage?



    No dense foliage rendering here and I don't see any real-time forests with real-time shadows rendered at 80 FPS. Holy mother of God, Doom 4 is not AAA quality.

    upload_2016-6-16_19-26-58.png

    Look. I can see pixels. Tsk tsk. And those clouds in the distance... they aren't made of actual simulated water molecules.



    No real-time foliage. Probably using normal maps and height maps rather than using geometry for every crack and crevice. Pathetic.



    Real-time rendered trees? 0. Fail. Ooh I look celestial and awesome... fk off Bungie. Learn to develop games.



    Apparently only this game has good graphics.....?

    upload_2016-6-16_19-31-55.png

    Wait a minute. That looks like a terrain engine and not like actual mountains. Compare:



    I don't know what to believe any more.



    NOW THAT IS WHAT I CALL A GAME.

    There's tons more great game graphics right here: http://www.naturephotographers.net/
     
    Last edited: Jun 17, 2016
    GarBenjamin and frosted like this.
  41. Deleted User

    Deleted User

    Guest

    What are you rambling on about now?
     
  42. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,796
    It seems that he's being willfully ignorant about the different needs that developers have while working on a project and how shortcomings in engines can affect them.

    So, you know, the usual.
     
  43. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,070
    Those who post more than one image not in a thumbnail should be exiled from the forums for the rest of eternity, especially when the comment is so utterly irrelevant. It's like scrolling down three pages of spam ads and there's not even anything to buy.
     
    McMayhem, AcidArrow and orb like this.
  44. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,297
    If you're gonna swing your dick around like an epic AAA developer...

    Don't give me any S***. Post your bomb ass game or quit acting like some kind of God,
     
  45. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,297
    You have led multi-page flame wars that even I couldn't follow.
     
    frosted likes this.
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,070
    I haven't flamed anyone or anything, I'm only interested in making things improve by giving specific and relevant criticism, and I'm always quick to praise things I like. Do you have a point or are you just trying to wreck this thread?
     
    AcidArrow and frosted like this.
  47. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,297
    I have a mental list of the worst posters in terms of going off the rails and just getting a little crazy:

    1. Yours Truly
    2. @CarterG81
    3. @AcidArrow
    4. @ippdev
    5. @Billy4184

    Everybody else doesn't even make the list, are generally alright folks.

    You can call it "wrecking" a thread if you want, to disagree with the main theme which is "Unity is the reason why nobody makes games in Unity". Which is F***ing balls-out insane considering that a lot of people DO make games in Unity. Maybe you guys should email those people and ask them exactly how the hell they're doing it.

    Whatever. No stake in the outcome. I thought I'd comment but apparently bad F***ing idea, pretty sensitive issue for a lot of people. Jesus christ.
     
    Acissathar and ZJP like this.
  48. Deleted User

    Deleted User

    Guest

    @Master Frog

    Yeah, the examples you show don't have dense foliage and they look absolutely awesome.. But it's simply not the type of game I want to make (well it kinda is / isn't).. It'll be a mix for example this is a WIP interior of a ship below, but the start of the game is based upon a human colony that got shunted when they lost the last war (the open world bit).. So I'm just looking at how to proceed with it the best I can, nothing more..

     
    frosted and tatoforever like this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,070
    It's one thing to go off the rails, quite another to troll. I never do the latter and I don't like it when people do.
     
    tatoforever likes this.
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,969
    @Master Frog
    Why I need dense foliage? Because I need it. :cool:
     
    darkhog, Ryiah and Deleted User like this.
unityunity