And this is perfect ad of your game, you did a great job sir! P.S. I'd reduce motion blur by half, the car almost completely washed out while driving ;)
Your game concept is outstanding and I really like the performance tricks! The thing that I would love to see in your game is a night enviroment with a dense fog and beam lights from the city and and cops!
Right on, thank you! I'd be happy to hear if some of these techniques help you out, or if you discover additional ways of achieving better performance in your project.
Yes, there's been a lot of trial and error, time spent in the Profiler, and realization that no 1 solution fits all my objects. Glad you found the video interesting!
Crazy Taxi meets The Fifth Element? That's definitely my bag, baby! Also, thanks, this video is super helpful as I'm trying to understand how to make a concept work on the quest 2 and it's limited hardware
Wow nice! As a concept artist, i suggest you to add more fog/ pollution, and more lights and shadows contrast. But depends on the style that you are looking too. Its looking cool!
Thanks. Fog and pollution is still to be worked on. As for the lights/shadows, there isn't really any because the buildings are so damned tall that sunlight doesn't actually reach down to where the player is. It's all ambient light. I've been thinking about cheap (computationally speaking) ways of having some shadows and direct sunlight without it looking silly in the scene - since there wouldn't realistically be any - similar to a very overcast day.
@@CassiusJohnAdams Ah i see nice. I was referring to artificial lights (like the advertising, street lights, etc. And more occluded areas( like under the bridges or narrow streets) About the resources i've no idea, i just suggested what i thought. I'll be looking forward your progress! Good luck!
I love it, ima get the game because this is so inspirational for my own projects, not for public sale, but still none the less a huge project that has many objects. Thanks for making this!
This is pretty cool looking. Thanks for the tips. We are in the early phase of making a game so I think there is a lot to learn from your experience. I guess Ill have to go look on your channel for a game synopsis. Once again thank you.
Yeah, as is always the case, things are taking longer than I'd hoped. Still putting in multiple hours every day though. Glad you're still excited for it!
@@bezoro-personal gave me a laugh, i really do agree, most people would spend years learning unity and making games but still lack some very basic skills and knowledge... too bad ig, this is just too powerful to be missed !
I haven't worked in VR, but I understand you need to hit a minimum framerate of 90, per eye. That's a pretty tough task. But hardware is always getting better, so it's up to artist and developers to make sure to continue to keep things streamlined to take advantage of the better hardware efficiently.
@@CassiusJohnAdams VRChat can be played without VR Headsets and 30 FPS in VR is socially accepted in VRChat for crowded events in worlds made by enthusiasts. If you have time, give VRChat a try and you will see the mess xD. Cheers!
I make vrchat worlds, the game is inherently cumbersome and poorly optimized for a lot of machines because of its players, their avatars and pickupable objects & mirrors. Occlusion culling, baked lights, no reflection probes & texture atlasing help the worlds only a bit
@@CassiusJohnAdams fair enough haha ECS would probably help, because all card and objects would be mostly multithreaded. The downside is that coding takes a lot longer and you gotta start from scratch.
@@DevDunkStudio Fortunately I have very little logic built for the cars and pedestrians so far, so it's not a complete rewrite. Whether I use just the C# Job System by itself, or end up using ECS too I'm not sure yet. For now, I'm investigating Job System on it's own to see if it'll do the trick, and Profile that independently (so I can share those results). Without multithreading/parallelism, the cars are likely going to pose a problem to framerate so I'll definitely have to do something.
I am really impressed with the quality of the game here! It's so cool to see Indie producing this level of quality! I have some constructive critique here: - Motion Blur: As you know already, it is too much, I can't see the subject(Taxi) clearly and just vanishes. Just need to implement it correctly - Textures: There are some scenes in your game where the same texture is repeated over and over again. Also, there isn't much of a variety between textures themselves. When you take a look at GTA V, the texture variety is just amazing! You can almost not find any repeating patterns and the object textures are full of surface imperfections (crack in glass, dust collected on cars(if your game has any scene with static cars as subject), dirty cars, damaged cars). There is just so much potential for this game and so much details can be added to make this game really really good. Liked and subbed. Waiting for another devlog. All the best !
Thanks for the constructive feedback! For most of this you're preaching to the choir, so to speak. There isn't anything you've mentioned that I haven't already considered to some degree or another. For the most part, it's not that I can't do them, it's more that I want to be sure the game gets finished and that I limit the amount of scope creep (I've been very strict on myself about this). On top of that, there's obviously performance impacts I need to take into consideration. It's important that I'm realistic with myself by not holding myself to the standards of AAA games, GTA, etc. They have hundreds, maybe thousands, of people working on those games - I'm just one person. One thing you mentioned, which I hadn't really considered, is decaling the static objects, such as stationary cars (buildings already have some). I don't want to get into the task of changing up mesh/models too much, but decaling to "dirty things up" on those non-building static objects is quick and cheap performance-wise. I think this is do-able in my timeframe. Thanks again for taking the time to offer your feedback! It's very helpful. :)
Do you use job system for car Ai ? Or maybe full ecs stack? Also there are some invisible triangles in middle section of buildings im not sure if removing them will help they are just culled while rendering anyways.
I'm still working through the car AI. Right now there's no logic. I haven't been using any job systems nor ECS up to this point. It's likely I'll need to look beyond the traditional Unity way of doing things and implement some ECS. Regarding the invisible tris, yeah. They're on my list of things to get to a little later in development. Some are invalid backfaces, others just missing, and a few are in texture transparency.
Yooo this looks brilliantly amazing! What a gameeee! Subscribed! Love these kinds of channels :D Wonder how much variety of gameplay there will be. Like a crazy taxi but in the future?
@@CassiusJohnAdams Hey, thanks for considering to add this option, I'm not alone with deciding not to buy a game (AAA or indie) if there is no option to turn off motion blur.
Could you make a tutorial for lighting setup for large scenes please. btw your game looking awesome and thanks for the imposter i love it. but please share your experiences for lighting settings for large scenes
@@CassiusJohnAdams I meant the unity asset called "GPU Instancer". It uses instance indirect, so it would load the objects into the GPU memory only once. That way I was thinking, you maybe would not need atlassing
Many of my objects are static (buildings etc) so I baked the occlusion culling for the entire scene. Then I implemented my custom "view corridor" triggers, so that only GameObjects that would be in view of the player are enabled. That eliminates about 70%+ of GameObjects from being calculated at all at any given time. Since most of my buildings are broken up into smaller segments/mesh/GameObjects, I still see decent results from the original occlusion culling bake on the GOs that are currently enabled.
If you dont have any runtime need for manipulation for those 100k objects, theres no need having them separate as separate GO's. Chunk them into 100k tris-ish and put them through CombineMeshInstance. Also, the meshes of the building are so simple that you could get the same look with a low poly mesh + good normal maps. Occlusion culling also has a CPU cost, and if you put everything there, it can end up costing more that without culling at all. The GPU is a beast, it can handle a bunch of vertices if theyre within the same drawcall. Now the data you represent it is very choppy, you want it to be smooth.
No, it's not. Wish I'd known about that when I started working on this project because I'm sure it would have been helpful. Although I'm not certain that's production-ready yet. Maybe.
this similar with the way i have plan to optimize my own game but i have pland to add extra optimize system 1.the first system to add trigger box in the wean the player enter to have more or lees view distance from dipping for haw closed or open each area are i have others ideas in the order to optimize my games but the problem is the others i ideas i have in mind is omost impassable make by my self 1. texture lood the idea is to have to change the texture depending for the distance if finding i way to do that everything i will looks better with out change the performance 2. the other idea i have is to make the billboard (imposter effects) but with 3D models 3. way that I think to optimize is to make i system that when is in specific tigers box to hide all the objects is not pasble to see this system sounds very easy to implement but the problem is my game have the option to play up to 4 players for the same devise that means that system is very hard to implement 4. to use ecs in my game Sean in the order to run everything faster the proble is i have no idea haw to use ecs (dots)
1. You can kind of do this already with Unity by setting your textures to Mipmapping. Unity will automatically make 1, 1/2, 1/4 and 1/8 scale version of your texture and automatically use the right scale at the right distance. This, however, comes with an increase in memory for the extra textures. 2. Amplify Impostor (mentioned in the video) does that kind of. The one I referred to in the video is here: th-cam.com/video/G0ILW1cwuTc/w-d-xo.html But maybe I'm not sure what you mean. 3. Can you have a parent for all your player's with a rigidbody? That should allow all the players' colliders to register as a single source and then use that to enable/disable areas? Just a thought. 4. I haven't touched ECS yet. There may come a time when I have to, but for now things are ok.
@@CassiusJohnAdams don't worry you i have meny ideas to optimize my to by onest optimization is one of the things im i will not eny i know like fact the i will run with not problem in most computers Because Unlike your project my own project have way less objects not the project and my 3D models have way less polygons from your 3D in most cases But the only thing im not sure if able to implomate is the network system and and if able to optimize the for mobile because i have plan to that game i working on mobile and pc
plz tell me bro how can we make a thing to renderd from far away like my camera far distance is 3oo butt i want a game object to render from 600 distance so what i have suppose to do plz help
Right now, only on their Materials. At the moment I have a pretty even split for resource consumption between CPU and GPU so I'm not sure if I'll end up instancing them further or not.
I love the project, for the edit try matching your voice volume with the music volume more Sometimes the music is way louder than you voice, but this is a small detail ofcourse What are you gonna use for the music in the game? Maybe make a system for uploading or linking you own mp3 file as a sort of radio.
Thanks for the comment. I really need to get a proper microphone (and get the guys that live above me to stop walking like elephants). I will try reducing the background music next time. For music, I'm likely going to go with dynamic music. Something that will match the player's intensities during gameplay (no gameplay objectives shown here).
Would be cool to use box trigger to drop people off vertically on buildings... or even thru the building to like a super supermarket skyscraper type... pop density and verity prob helped with the cost for low-budget pcs ...
Thanks. There are reflections present (Reflection Probes) everywhere in the game, and there's also fog (though not volumetric yet). The reflections aren't for dynamic objects though, so maybe you mean realtime reflections? I gave that a try a few months back and the cost in processing was too high for my liking and because I'd like the game to run on something as low as an i5 and Intel UHD-620 graphics card. My method has mostly been the opposite, with some exceptions. I've tried to start off simpler and increase fidelity over time, rather than high fidelity and then having to cut back on lots of stuff to fit it all in. Not saying that's a better method - just the method I'm trying with this game. There are some exceptions.
My level is created in the editor, it's not dynamically generated. Some of the dynamic objects are generated, but again within the Editor, not at Runtime.
a game where you play as taxi driver on a DYSTOPIAN MEGA CITY? awesome never saw that ideia before. kidding, the game is really cool im going to wishlist it on steam
You could make a chunk system or a variant of it, you can detect the area you are by position. You're surely using a fix for floating point precision and altering the zero position of your map, in that case you'll have to keep that position on a variable and use it as an offset for the chunks PS: I love your game PS2: just noticed this is an old video lol
I know this is a bit of an older comment, but I've read it a few times over the last month or so. I'm not sure I fully understand what you're suggesting. Are you able to rephrase? I'm not repositioning the zero position at all throughout the game. Floating point, from what I've seen, only starts becoming a problem when approaching the 10,000 position x, y, or z. Up until 10k it should still be accurate to 1cm if I recall. Anyways, I'd be curious to know what you mean about the chunk system?
Any tips for the optimization of an open world with lots of trees and vegetation? (Have reduced them as much as possible already). I can't seem to get more than 20-30 FPS on my laptop with a built-in GPU and 16GB ram. Any other tips would be great to see, Thanks. How about audio? streaming vs not etc.....Update. So I noticed I had static and dynamic batching enabled, so I tested with them both disabled and surprisingly got a performance boost immediately, now running 35-53FPS on my laptop. Thanks for the video!
Generally speaking, batching should speed things up but it's really hard to know for sure without seeing the project and knowing the inner-workings. Were the trees and vegetation marked as Static when you had static batching enabled? Have you tried Amplify Impostor? Might be a good candidate for a performance boost. Each project is different and unfortunately there is no performance optimization pipeline that fits all projects. I guess one of the more important things is to first determine if you're CPU bound or GPU bound and work your way back from there. Audio performance is another beast of its own, which I haven't yet found very good ways of fine tuning. Other than some resource pooling and limiting the number of audio clips playing to about 8 or 16 at any given time.
@@CassiusJohnAdams Yep CPU bound. Yes trees etc was marked as static batching enabled. I found that the batching was actually slowing me down (10,000 trees, grasses, plants) Made with Gaia Pro. When I disabled both static and dynamic batching and changed probes to baked instead of real-time I got a 15FPS+ boost. Thanks for your suggestions. Have not used Amplify, will check it out.
@@snakeplisken4278 Hmm. I'm not sure which render pipeline you're on, but are you able to use GPU Instancing for the shader/material for the trees? It _should_ free up a bit of CPU and offload that to the GPU instead (assuming static batching is still disabled). Have you tried enabling SRP Batching as well? Just a couple thoughts.
@@CassiusJohnAdams Standard Render Pipeline with Deferred. PC is 16.0GB Ram CPU is Intel Core i7-8750H CPU @2.20 Ghz with GPU = NVIDIA GeForce GTX 1050 Ti with Max-Q Design with Driver version 472.12.
Would the lighting data problem get better if you separated the level into multiple scenes and loaded/unloaded them additively? That would even help with mesh count!
Honestly, I don't know the answer to that, but it is something I previously thought about. I do know it will increase complexity in a number of other areas of my game's development. The lighting issue isn't just a technical one, aside from the huge number of Lightmaps it would produce and the LOD issue (below). It's problematic that essentially no sun light reaches the play area (with a few minor exceptions) due to the height of the game's skyscrapers. So all I really get is indirect light regardless of whether it's lightmaps or light probes. On top of that, I find Unity doesn't produce the results I want with regards to Lightmap on LOD buildings. Lightmaps apply to LOD0 - anything beyond that depends on Light Probes if I recall correctly. The end result was a "popping" between lightmap and light probe.
What about investing some milliseconds on post production effects like rain and fog. So you can cover a lot of objects and they can be really low quality as you wont see them in detail. And it would add a lot of athmosphere to the experience.
Yeah, they are. In some of my earlier videos you can probably see a lot of fog. So much, in fact, that it produced 100% opacity beyond about 400 units ahead. That let me set the camera's far clip plane to about 450 units, saving me a fair chunk on processing. It more than made up for the expense of the fog and some additional PP I had at the time. But the visuals overall started to feel a little lower than I wanted to go.
It'll still be necessary, both for static and dynamic objects. Once I've implemented a more robust pooling system for the dynamic objects it'll be less helpful (though every bit counts, right?). At that point it'll primarily be just for the static objects. Since my buildings are tiled/repeated in 90 degrees segments, and then replicated vertically as well, I still see significant improvements with the occlusion culling since many side and backs of buildings can then be culled.
I probably should have been more clear in the video. My initial idea was to use Amplify Impostors for the highest-level LOD on my building segments, each of which segment is broken into 4 (ex: north, east, south, west). Then it's tiled vertically to make the building. Impostors were costing me more this way for a few factors. 1 was the additional LOD level, which accounted for about 20k new GameObjects all in. That wasn't as big a deal as the 4 textures per impostor material needed for each building multiplied by dozens of buildings. Since these are large segments, the textures needed to be at least 2k to be passable. That lead to 200+ new 2k textures (all of which could appear in a single frame), which can't really be atlassed since the Impostor system has certain requirements. Even with instancing, statically batching, etc, the draw call (set pass) became very big, slowing things down as the CPU prepared and passed them to the GPU. Instead I opted for single GameObject per building and 16 x 4k atlassed textures which accounts for the highest LOD for all buildings in the game. All this said, I am in fact using Amplify Impostors in the game for some smaller static objects and plenty of dynamic objects as well. These items can all get by on 256px (4 texture Materials) impostor LOD levels. There's somewhere between 30-50 of them presently. That does take some CPU for the 30-50 draw calls prep, but they are GPU instanced since there are many multiples of each dynamic object, so there's definitely a savings in those cases. I have yet to fully validate that the GPU instancing is faster than the dynamic batching but so far my suspicion is that it is in my case. Sorry for the long-winded answer.
IMO the taxi should have some different physics in collisions. In my high speed rocket riding game (Rocket Jockeys) I have implemented custom collision bounce back using some vector math to get smooth collisions while maintaining the flow. Here is a snippet: private void OnCollisionStay(Collision other) { //Bump off of walls if (other.gameObject.CompareTag("Wall") || other.gameObject.CompareTag("Pole") || other.gameObject.CompareTag("LowObstacle")) { if (other.relativeVelocity.magnitude > 20) TempDamage += other.relativeVelocity.magnitude * CollisionDamangeScaler; //damage float BumpBackForce = Vector3.Dot(myTransform.right, other.contacts[0].normal); //how much the right vector overlaps the normal (shallow collisions are glided instead of being very bouncy) float mult = Mathf.Abs(transform.InverseTransformVector(other.relativeVelocity).x); rb.AddRelativeTorque((1 - Mathf.Abs(BumpBackForce)) * Mathf.Sign(BumpBackForce) * 3 * mult * Vector3.up, ForceMode.VelocityChange); //bouncing off of the wall depending on angle of attack } } Note: this is implementing only side to side collisions and not bottom/top collisions which you need in your game as well.
I agree, collision physics could use some touch-up! Hey man, thanks a lot for sharing that code. I'll have a look at it, dissect it and see if it'll be helpful in my situation. I really appreciate you taking the time to post that!
Do you mean for batching same objects/shaders? If so, yes, there's plenty of things I'm GPU instancing. If you mean sending anything directly to the GPU and working from there - no I'm not.
not performance related but i feel like the city looks too monotone from what i can see . there is no distinct theme or land marks in any specific area so all the streets look too similar in most directions. i suggest making more unique things for each area that can function as land marks for players to navigate around and make your city more lively and memorable .
3:37 that is not a good idea, for this is better if you export that prefab into a fbx, then, open it in you 3d software and make a single object with just one layer, then export it to unity, that will save you lots of batches
I know this is a really old comment, but these are not statically batched (if that's what you meant?). Although they are GPU instanced. Regardless, I actually tried that a few weeks ago and while there was a _very_ slight performance improvement, the memory footprint went up too high for me.
Hi, I don't know if this will be useful but if you are not concerned with buildings/props being reused at some point you can use object pooling to simply shift the position of some existing gameobjects around the player's position. You can have a theoretically infinite game world. Not sure how that would fit with your lighting setup though. Anyway thanks for the tips!
I haven't implemented my pooling system just yet but object pooling will only be used for the dynamic objects. That's still result in lots of resource savings. In my earlier tests, using pooling for the static buildings is problematic because of the baked occlusion culling. Moving buildings (in the Editor) post-bake and then going into play mode results in unwanted side effects.
Texture atlassing is the process of merging multiple textures (for different objects) into a single larger texture. This also requires that your models' UV maps are also changed. It works best when you have models using the same shader. The idea is to reduce the number of draw calls to the GPU, be able to batch more items, and often reduce memory consumption. Here's a video on the tool I'm using: th-cam.com/video/PBRKlopkZP0/w-d-xo.html
I do use it a little, but far less than I normally would. Think I mentioned this in the video, but I have a lot of mesh and materials that are used in multiple places. Normally unity only needs to load up a mesh once and then it can be used multiple times without much memory increase. When using static batching, however, unity loads multiple copies of the mesh into memory because it technically combines those mesh into one. So if a mesh is used 5 times, it ends up using 5 times the amount of memory for that object. Where I do use it is on lower res LOD levels. For example: LOD0 - not static batched (currently) LOD1 - sometimes static batched, sometimes not LOD2+ - always static batched etc. My memory budget is 4GB and when static batching is used memory consumption goes up to ~20GB in the current state. All this said, I'm going to be investigating what the memory footprint looks like when most static objects are disabled. If the additional memory isn't required while the objects are disabled I may revisit more aggressive static batching once I've finished up my scripted object culling (gameobject disabling). Hope this makes sense.
@@fressno1807 Did you find it to be pretty performant? I really need to figure this vehicle stuff out soon. :) I'm already doing that with distant cars. Although somewhat differently as those are a transparent texture on a single mesh with the materials coords being manipulated.
@@CassiusJohnAdams you mean you just switch the mesh on and off when the player is out of radius? and just have multliple cars spawned everywhere in the world but only turned on when the player is close enough?
@@fressno1807 Not exactly. The mesh on/off isn't based on radius, but based on view corridors I'm working on. But I suppose in-essence that's what you mean. Right now they're just gameobjects but I'm investigating Addressables for that to help with memory. For the cars, they're not spawned everywhere in world, only within relatively-close distance to the player, but out of view. But they'll basically all be in the scene anyways because of the object pooling, so I don't mean instantiating new objects.
There could be one or more of very many things going on. What does the Profiler show you with regards to whether you're CPU bound or GPU bound (I'm guessing CPU but you never know until looking)?
The Fifth Element . . My favorit movie of all time! Loving the resemblance of the city 👌👌
Thanks! :)
0:57 impostors
3:50 occlusion culling
7:28 lighting
8:35 reflection probes
9:01 disabling gameobjects
And this is perfect ad of your game, you did a great job sir!
P.S. I'd reduce motion blur by half, the car almost completely washed out while driving ;)
agreed
Yeah way too much motion blur I got confused what was happening while watching a lot
Your game concept is outstanding and I really like the performance tricks! The thing that I would love to see in your game is a night enviroment with a dense fog and beam lights from the city and and cops!
Beautiful! As a scifi head i can totally see myself getting lost in there for hours!
On yt there really arent many optimasation tutorials so watching this was really nice
Extremely impressive, nicely done! Subbed and wishlisted. I'll be looking into using these techniques myself! Thank you for this video.
Right on, thank you! I'd be happy to hear if some of these techniques help you out, or if you discover additional ways of achieving better performance in your project.
volumetric lighting would be a perfect fit for your game, great video
followed and wishlisted, hope to see more of your development progress. This is good game dev knowledge to have! :)
Thank you! Hope it was helpful. More videos will be coming over the upcoming few weeks.
Really IMPRESSIVE!!
Glad you liked the video! Also, thank you for the support on Steam. :)
Oh man, this reminds me of NYR: New York Racing from PS2! Awesome!
I love the idea crazy taxi meet 5th element it looks amazing 👏 keep up the great work 👍
Thank you!
Interesting devlog mate, great work!
Super interesting to how about these improvements you made. It's baffling just how much certain solutions can help.
Yes, there's been a lot of trial and error, time spent in the Profiler, and realization that no 1 solution fits all my objects. Glad you found the video interesting!
Love the Multipass-Ad. Wishlisted!
Crazy Taxi meets The Fifth Element?
That's definitely my bag, baby!
Also, thanks, this video is super helpful as I'm trying to understand how to make a concept work on the quest 2 and it's limited hardware
Good to hear that. :) And glad the video was helpful!
More optimization videos :D
Great video
More to come, but I have one or two other videos to get to first. Stay tuned!
That camera follow is sweet
Really nice to watch the performance enhancements
This is probably one of the most believable and addictive game I have seen in my life. Keep up the Good work.
looks pretty good, congratulations
Wow nice! As a concept artist, i suggest you to add more fog/ pollution, and more lights and shadows contrast. But depends on the style that you are looking too. Its looking cool!
Yeah some post-processing effects would do wonder too
Thanks. Fog and pollution is still to be worked on. As for the lights/shadows, there isn't really any because the buildings are so damned tall that sunlight doesn't actually reach down to where the player is. It's all ambient light. I've been thinking about cheap (computationally speaking) ways of having some shadows and direct sunlight without it looking silly in the scene - since there wouldn't realistically be any - similar to a very overcast day.
@@CassiusJohnAdams Ah i see nice. I was referring to artificial lights (like the advertising, street lights, etc. And more occluded areas( like under the bridges or narrow streets) About the resources i've no idea, i just suggested what i thought. I'll be looking forward your progress! Good luck!
This looks awesome, and I appreciate the knowledge provided as well.
This is honestly quite amazing. Keep up the great work!
I love it, ima get the game because this is so inspirational for my own projects, not for public sale, but still none the less a huge project that has many objects. Thanks for making this!
Thank you! :)
This is pretty cool looking. Thanks for the tips. We are in the early phase of making a game so I think there is a lot to learn from your experience. I guess Ill have to go look on your channel for a game synopsis. Once again thank you.
Impressive, looks like it feels lovely and fluid.
Thats pretty amazing. Love the Toronto street signs
Thanks! Figured I'd keep the map and signs local. :)
Still waiting to play the demo but yet so far nothing on Steam *frown* either way I am excited for this!
Yeah, as is always the case, things are taking longer than I'd hoped. Still putting in multiple hours every day though. Glad you're still excited for it!
Amazing video, I’m gonna work on some 3D games in 2021 so your tips on improving performance will come in handy.
Thanks! And I watch some of your videos too.
Watch out for jumping Milla Yovovich!!!
and this is done without DOTS ? Amazing
@@bezoro-personal i wouldnt call it basic optimization
@@bezoro-personal gave me a laugh, i really do agree, most people would spend years learning unity and making games but still lack some very basic skills and knowledge... too bad ig, this is just too powerful to be missed !
Came looking for gold, found a diamond. It's a win boys.
Wow....this game looks amazing!
Thank you! :)
Seems very good project. I personely loved the movie of Bruce Willis that he was driving this kind of taxi.
Well done! Nice game and nice video!
Thank you.
Reminds me movie "The sixth element", old good times :)
Fifth ;)
Bro amazing game bro I will wishlist this game now
We need someone like you to teach to the VRChat world creation community how to optimize their worlds 😮
I haven't worked in VR, but I understand you need to hit a minimum framerate of 90, per eye. That's a pretty tough task. But hardware is always getting better, so it's up to artist and developers to make sure to continue to keep things streamlined to take advantage of the better hardware efficiently.
@@CassiusJohnAdams VRChat can be played without VR Headsets and 30 FPS in VR is socially accepted in VRChat for crowded events in worlds made by enthusiasts. If you have time, give VRChat a try and you will see the mess xD. Cheers!
I make vrchat worlds, the game is inherently cumbersome and poorly optimized for a lot of machines because of its players, their avatars and pickupable objects & mirrors. Occlusion culling, baked lights, no reflection probes & texture atlasing help the worlds only a bit
Great video! Would you please explain why static batching got that much huge space?
Optimising this looks like fun!
Would love to see more!
Do you use ECS for this?
It's fun and frustrating at the same time :)
No I don't use ECS. But I am currently considering the C# job system, maybe ECS too.
@@CassiusJohnAdams fair enough haha
ECS would probably help, because all card and objects would be mostly multithreaded. The downside is that coding takes a lot longer and you gotta start from scratch.
@@DevDunkStudio Fortunately I have very little logic built for the cars and pedestrians so far, so it's not a complete rewrite. Whether I use just the C# Job System by itself, or end up using ECS too I'm not sure yet. For now, I'm investigating Job System on it's own to see if it'll do the trick, and Profile that independently (so I can share those results). Without multithreading/parallelism, the cars are likely going to pose a problem to framerate so I'll definitely have to do something.
I am really impressed with the quality of the game here! It's so cool to see Indie producing this level of quality! I have some constructive critique here:
- Motion Blur: As you know already, it is too much, I can't see the subject(Taxi) clearly and just vanishes. Just need to implement it correctly
- Textures: There are some scenes in your game where the same texture is repeated over and over again. Also, there isn't much of a variety between textures themselves. When you take a look at GTA V, the texture variety is just amazing! You can almost not find any repeating patterns and the object textures are full of surface imperfections (crack in glass, dust collected on cars(if your game has any scene with static cars as subject), dirty cars, damaged cars). There is just so much potential for this game and so much details can be added to make this game really really good.
Liked and subbed. Waiting for another devlog. All the best !
Thanks for the constructive feedback!
For most of this you're preaching to the choir, so to speak. There isn't anything you've mentioned that I haven't already considered to some degree or another. For the most part, it's not that I can't do them, it's more that I want to be sure the game gets finished and that I limit the amount of scope creep (I've been very strict on myself about this). On top of that, there's obviously performance impacts I need to take into consideration.
It's important that I'm realistic with myself by not holding myself to the standards of AAA games, GTA, etc. They have hundreds, maybe thousands, of people working on those games - I'm just one person.
One thing you mentioned, which I hadn't really considered, is decaling the static objects, such as stationary cars (buildings already have some). I don't want to get into the task of changing up mesh/models too much, but decaling to "dirty things up" on those non-building static objects is quick and cheap performance-wise. I think this is do-able in my timeframe.
Thanks again for taking the time to offer your feedback! It's very helpful. :)
what a lovely game, loved the tips
Thank you 😊
Do you use job system for car Ai ? Or maybe full ecs stack? Also there are some invisible triangles in middle section of buildings im not sure if removing them will help they are just culled while rendering anyways.
I'm still working through the car AI. Right now there's no logic. I haven't been using any job systems nor ECS up to this point. It's likely I'll need to look beyond the traditional Unity way of doing things and implement some ECS. Regarding the invisible tris, yeah. They're on my list of things to get to a little later in development. Some are invalid backfaces, others just missing, and a few are in texture transparency.
Yooo this looks brilliantly amazing! What a gameeee! Subscribed! Love these kinds of channels :D Wonder how much variety of gameplay there will be. Like a crazy taxi but in the future?
Please have an option to get rid of the motion blur completely. Unfortunately there are some of us who get sick. My eyes start to hurt after a bit.
Thanks for the feedback. I'll try and get the option in for initial release.
@@CassiusJohnAdams Hey, thanks for considering to add this option, I'm not alone with deciding not to buy a game (AAA or indie) if there is no option to turn off motion blur.
Nice but i do have one question? Do you have a multipass?
Could you make a tutorial for lighting setup for large scenes please. btw your game looking awesome and thanks for the imposter i love it. but please share your experiences for lighting settings for large scenes
Also did you try the GPU Instancer? Maybe you would not have to do the atlassing
Yes, I'm using plenty of GPU instancing where I've found it to make sense - dominantly on my dynamic objects. I use it in combination with atlassing.
@@CassiusJohnAdams I meant the unity asset called "GPU Instancer". It uses instance indirect, so it would load the objects into the GPU memory only once. That way I was thinking, you maybe would not need atlassing
Oh, my bad. I haven't investigated that on the Asset Store. Will check it out!
the game looks very nice ..
How did you implement the Occlusion Culling?
Many of my objects are static (buildings etc) so I baked the occlusion culling for the entire scene. Then I implemented my custom "view corridor" triggers, so that only GameObjects that would be in view of the player are enabled. That eliminates about 70%+ of GameObjects from being calculated at all at any given time. Since most of my buildings are broken up into smaller segments/mesh/GameObjects, I still see decent results from the original occlusion culling bake on the GOs that are currently enabled.
Great work! :)
nice video, if you have time can you create more video on performance tips? good luck mate!
Thanks. And I will definitely try to include more optimization details in future devlogs.
If you dont have any runtime need for manipulation for those 100k objects, theres no need having them separate as separate GO's. Chunk them into 100k tris-ish and put them through CombineMeshInstance. Also, the meshes of the building are so simple that you could get the same look with a low poly mesh + good normal maps. Occlusion culling also has a CPU cost, and if you put everything there, it can end up costing more that without culling at all. The GPU is a beast, it can handle a bunch of vertices if theyre within the same drawcall. Now the data you represent it is very choppy, you want it to be smooth.
Great project, although the camera movement might cause motion sickness in some people
Weaklings...
Nice job!
You probably want to enhance you voice recording. It would definitely make you content better.
Is this based on the DOTS template?
No, it's not. Wish I'd known about that when I started working on this project because I'm sure it would have been helpful. Although I'm not certain that's production-ready yet. Maybe.
this similar with the way i have plan to optimize my own game but i have pland to add extra optimize system
1.the first system to add trigger box in the wean the player enter to have more or lees view distance from dipping for haw closed or open each area are
i have others ideas in the order to optimize my games but the problem is the others i ideas i have in mind is omost impassable make by my self
1. texture lood the idea is to have to change the texture depending for the distance if finding i way to do that everything i will looks better with out change the performance
2. the other idea i have is to make the billboard (imposter effects) but with 3D models
3. way that I think to optimize is to make i system that when is in specific tigers box to hide all the objects is not pasble to see this system sounds very easy to implement but the problem is my game have the option to play up to 4 players for the same devise that means that system is very hard to implement
4. to use ecs in my game Sean in the order to run everything faster the proble is i have no idea haw to use ecs (dots)
1. You can kind of do this already with Unity by setting your textures to Mipmapping. Unity will automatically make 1, 1/2, 1/4 and 1/8 scale version of your texture and automatically use the right scale at the right distance. This, however, comes with an increase in memory for the extra textures.
2. Amplify Impostor (mentioned in the video) does that kind of. The one I referred to in the video is here: th-cam.com/video/G0ILW1cwuTc/w-d-xo.html But maybe I'm not sure what you mean.
3. Can you have a parent for all your player's with a rigidbody? That should allow all the players' colliders to register as a single source and then use that to enable/disable areas? Just a thought.
4. I haven't touched ECS yet. There may come a time when I have to, but for now things are ok.
@@CassiusJohnAdams don't worry you i have meny ideas to optimize my to by onest optimization is one of the things im i will not eny i know like fact the i will run with not problem in most computers Because Unlike your project my own project have way less objects not the project and my 3D models have way less polygons from your 3D in most cases
But the only thing im not sure if able to implomate is the network system and and if able to optimize the for mobile because i have plan to that game i working on mobile and pc
plz tell me bro how can we make a thing to renderd from far away like my camera far distance is 3oo butt i want a game object to render from 600 distance so what i have suppose to do plz help
are you using GPU instancing for the moving vehicles?
Right now, only on their Materials. At the moment I have a pretty even split for resource consumption between CPU and GPU so I'm not sure if I'll end up instancing them further or not.
Amazing. Well done
Thank you so much 😀
Can you please do a tutorial on Atlas texturing, it seems this is the way..........
I have one planned (in early planning right now). Stay tuned. When it's ready, hopefully I'll be able to provide you with some good tips/pointers.
I love the project, for the edit try matching your voice volume with the music volume more
Sometimes the music is way louder than you voice, but this is a small detail ofcourse
What are you gonna use for the music in the game? Maybe make a system for uploading or linking you own mp3 file as a sort of radio.
Thanks for the comment. I really need to get a proper microphone (and get the guys that live above me to stop walking like elephants). I will try reducing the background music next time.
For music, I'm likely going to go with dynamic music. Something that will match the player's intensities during gameplay (no gameplay objectives shown here).
Would be cool to use box trigger to drop people off vertically on buildings... or even thru the building to like a super supermarket skyscraper type... pop density and verity prob helped with the cost for low-budget pcs ...
Is there a part in the game where Milla Jovovich crashes through the roof of the cab wearing nothing but bandages?
6:57 why not max out graphics and still try to optimize.. space reflections on mats and fog fx for example...
Thanks. There are reflections present (Reflection Probes) everywhere in the game, and there's also fog (though not volumetric yet). The reflections aren't for dynamic objects though, so maybe you mean realtime reflections? I gave that a try a few months back and the cost in processing was too high for my liking and because I'd like the game to run on something as low as an i5 and Intel UHD-620 graphics card.
My method has mostly been the opposite, with some exceptions. I've tried to start off simpler and increase fidelity over time, rather than high fidelity and then having to cut back on lots of stuff to fit it all in. Not saying that's a better method - just the method I'm trying with this game. There are some exceptions.
How do you bake dynamic occlusion culling? I mean your level isn't created in Editor but on Runtime, right?
My level is created in the editor, it's not dynamically generated. Some of the dynamic objects are generated, but again within the Editor, not at Runtime.
Great job!
This reminds me of the fifth element
a game where you play as taxi driver on a DYSTOPIAN MEGA CITY? awesome never saw that ideia before. kidding, the game is really cool im going to wishlist it on steam
Right on! Thanks for wishlisting!
Check out Quarantine from 1994
hey havw you checked the sub scene thing they used in the Mega City demo? could suit your project
I haven't yet but I will. Thanks.
You could make a chunk system or a variant of it, you can detect the area you are by position. You're surely using a fix for floating point precision and altering the zero position of your map, in that case you'll have to keep that position on a variable and use it as an offset for the chunks
PS: I love your game
PS2: just noticed this is an old video lol
I know this is a bit of an older comment, but I've read it a few times over the last month or so. I'm not sure I fully understand what you're suggesting. Are you able to rephrase?
I'm not repositioning the zero position at all throughout the game. Floating point, from what I've seen, only starts becoming a problem when approaching the 10,000 position x, y, or z. Up until 10k it should still be accurate to 1cm if I recall.
Anyways, I'd be curious to know what you mean about the chunk system?
This what driving was supposed to be in cyberpunk
Any tips for the optimization of an open world with lots of trees and vegetation? (Have reduced them as much as possible already). I can't seem to get more than 20-30 FPS on my laptop with a built-in GPU and 16GB ram. Any other tips would be great to see, Thanks. How about audio? streaming vs not etc.....Update. So I noticed I had static and dynamic batching enabled, so I tested with them both disabled and surprisingly got a performance boost immediately, now running 35-53FPS on my laptop. Thanks for the video!
Generally speaking, batching should speed things up but it's really hard to know for sure without seeing the project and knowing the inner-workings. Were the trees and vegetation marked as Static when you had static batching enabled? Have you tried Amplify Impostor? Might be a good candidate for a performance boost. Each project is different and unfortunately there is no performance optimization pipeline that fits all projects. I guess one of the more important things is to first determine if you're CPU bound or GPU bound and work your way back from there.
Audio performance is another beast of its own, which I haven't yet found very good ways of fine tuning. Other than some resource pooling and limiting the number of audio clips playing to about 8 or 16 at any given time.
@@CassiusJohnAdams Yep CPU bound. Yes trees etc was marked as static batching enabled. I found that the batching was actually slowing me down (10,000 trees, grasses, plants) Made with Gaia Pro. When I disabled both static and dynamic batching and changed probes to baked instead of real-time I got a 15FPS+ boost. Thanks for your suggestions. Have not used Amplify, will check it out.
@@snakeplisken4278 Hmm. I'm not sure which render pipeline you're on, but are you able to use GPU Instancing for the shader/material for the trees? It _should_ free up a bit of CPU and offload that to the GPU instead (assuming static batching is still disabled). Have you tried enabling SRP Batching as well? Just a couple thoughts.
@@CassiusJohnAdams Standard Render Pipeline with Deferred. PC is 16.0GB Ram CPU is Intel Core i7-8750H CPU @2.20 Ghz with GPU = NVIDIA GeForce GTX 1050 Ti with Max-Q Design with Driver version 472.12.
Awesome...But do you have multipass?
Or an autowash?
@@fressno1807 or Ruby Rhod?
@@TheMULTIcanal or Aknot?
Would the lighting data problem get better if you separated the level into multiple scenes and loaded/unloaded them additively? That would even help with mesh count!
Honestly, I don't know the answer to that, but it is something I previously thought about. I do know it will increase complexity in a number of other areas of my game's development.
The lighting issue isn't just a technical one, aside from the huge number of Lightmaps it would produce and the LOD issue (below). It's problematic that essentially no sun light reaches the play area (with a few minor exceptions) due to the height of the game's skyscrapers. So all I really get is indirect light regardless of whether it's lightmaps or light probes. On top of that, I find Unity doesn't produce the results I want with regards to Lightmap on LOD buildings. Lightmaps apply to LOD0 - anything beyond that depends on Light Probes if I recall correctly. The end result was a "popping" between lightmap and light probe.
What asset did you make use of to construct the city please?
Hi,
Sorry, I didn't use an asset to construct the city. I made it from scratch in Blender and Unity.
@@CassiusJohnAdams 😭😩
Def no upcoming tut on this then
Thanks for replying anyways
Hello, is it compatible with VR ? Cheers
This reminds me of that episode of Dr Who
this game is beautiful
What about investing some milliseconds on post production effects like rain and fog. So you can cover a lot of objects and they can be really low quality as you wont see them in detail. And it would add a lot of athmosphere to the experience.
PP effects are REALLY heavy.
Yeah, they are. In some of my earlier videos you can probably see a lot of fog. So much, in fact, that it produced 100% opacity beyond about 400 units ahead. That let me set the camera's far clip plane to about 450 units, saving me a fair chunk on processing. It more than made up for the expense of the fog and some additional PP I had at the time. But the visuals overall started to feel a little lower than I wanted to go.
"why was this recommended to me?"
*Impostors*
"ah"
Will it be necessary to use the occlusion culling implemantation, when you finished your disabling game objects approach?
It'll still be necessary, both for static and dynamic objects. Once I've implemented a more robust pooling system for the dynamic objects it'll be less helpful (though every bit counts, right?). At that point it'll primarily be just for the static objects. Since my buildings are tiled/repeated in 90 degrees segments, and then replicated vertically as well, I still see significant improvements with the occlusion culling since many side and backs of buildings can then be culled.
Wait how is Amplify Impostors cost you more performance? Its just a 2d sprite?
I probably should have been more clear in the video. My initial idea was to use Amplify Impostors for the highest-level LOD on my building segments, each of which segment is broken into 4 (ex: north, east, south, west). Then it's tiled vertically to make the building. Impostors were costing me more this way for a few factors. 1 was the additional LOD level, which accounted for about 20k new GameObjects all in. That wasn't as big a deal as the 4 textures per impostor material needed for each building multiplied by dozens of buildings. Since these are large segments, the textures needed to be at least 2k to be passable. That lead to 200+ new 2k textures (all of which could appear in a single frame), which can't really be atlassed since the Impostor system has certain requirements. Even with instancing, statically batching, etc, the draw call (set pass) became very big, slowing things down as the CPU prepared and passed them to the GPU. Instead I opted for single GameObject per building and 16 x 4k atlassed textures which accounts for the highest LOD for all buildings in the game.
All this said, I am in fact using Amplify Impostors in the game for some smaller static objects and plenty of dynamic objects as well. These items can all get by on 256px (4 texture Materials) impostor LOD levels. There's somewhere between 30-50 of them presently. That does take some CPU for the 30-50 draw calls prep, but they are GPU instanced since there are many multiples of each dynamic object, so there's definitely a savings in those cases. I have yet to fully validate that the GPU instancing is faster than the dynamic batching but so far my suspicion is that it is in my case.
Sorry for the long-winded answer.
IMO the taxi should have some different physics in collisions.
In my high speed rocket riding game (Rocket Jockeys) I have implemented custom collision bounce back using some vector math to get smooth collisions while maintaining the flow.
Here is a snippet:
private void OnCollisionStay(Collision other)
{
//Bump off of walls
if (other.gameObject.CompareTag("Wall") || other.gameObject.CompareTag("Pole") || other.gameObject.CompareTag("LowObstacle"))
{
if (other.relativeVelocity.magnitude > 20) TempDamage += other.relativeVelocity.magnitude * CollisionDamangeScaler; //damage
float BumpBackForce = Vector3.Dot(myTransform.right, other.contacts[0].normal); //how much the right vector overlaps the normal (shallow collisions are glided instead of being very bouncy)
float mult = Mathf.Abs(transform.InverseTransformVector(other.relativeVelocity).x);
rb.AddRelativeTorque((1 - Mathf.Abs(BumpBackForce)) * Mathf.Sign(BumpBackForce) * 3 * mult * Vector3.up, ForceMode.VelocityChange); //bouncing off of the wall depending on angle of attack
}
}
Note: this is implementing only side to side collisions and not bottom/top collisions which you need in your game as well.
I agree, collision physics could use some touch-up!
Hey man, thanks a lot for sharing that code. I'll have a look at it, dissect it and see if it'll be helpful in my situation. I really appreciate you taking the time to post that!
do you gpu instance anything?
Do you mean for batching same objects/shaders? If so, yes, there's plenty of things I'm GPU instancing. If you mean sending anything directly to the GPU and working from there - no I'm not.
Nice video.. Good dev vlog..
What is Unity Version?
Я думаю перенести свой проект тогда, на нее раз там такой прикольный Oculussing Culling сделали)
I'm using 2019.4 - a bit old now.
@@CassiusJohnAdams And well, then I have a newer one, I understand this is your own system for disabling objects?
not performance related but i feel like the city looks too monotone from what i can see . there is no distinct theme or land marks in any specific area so all the streets look too similar in most directions. i suggest making more unique things for each area that can function as land marks for players to navigate around and make your city more lively and memorable .
3:37 that is not a good idea, for this is better if you export that prefab into a fbx, then, open it in you 3d software and make a single object with just one layer, then export it to unity, that will save you lots of batches
I know this is a really old comment, but these are not statically batched (if that's what you meant?). Although they are GPU instanced.
Regardless, I actually tried that a few weeks ago and while there was a _very_ slight performance improvement, the memory footprint went up too high for me.
Hi, I don't know if this will be useful but if you are not concerned with buildings/props being reused at some point you can use object pooling to simply shift the position of some existing gameobjects around the player's position. You can have a theoretically infinite game world. Not sure how that would fit with your lighting setup though. Anyway thanks for the tips!
I haven't implemented my pooling system just yet but object pooling will only be used for the dynamic objects. That's still result in lots of resource savings.
In my earlier tests, using pooling for the static buildings is problematic because of the baked occlusion culling. Moving buildings (in the Editor) post-bake and then going into play mode results in unwanted side effects.
Lulu Dallas! Multipasport!
bro crazy taxi fith element edition this would of actually been amazing on PSone
one question what is Texture Atlasser ?
Texture atlassing is the process of merging multiple textures (for different objects) into a single larger texture. This also requires that your models' UV maps are also changed. It works best when you have models using the same shader. The idea is to reduce the number of draw calls to the GPU, be able to batch more items, and often reduce memory consumption. Here's a video on the tool I'm using: th-cam.com/video/PBRKlopkZP0/w-d-xo.html
@@CassiusJohnAdams ok thenx
Why not using static batching ?
I do use it a little, but far less than I normally would. Think I mentioned this in the video, but I have a lot of mesh and materials that are used in multiple places. Normally unity only needs to load up a mesh once and then it can be used multiple times without much memory increase. When using static batching, however, unity loads multiple copies of the mesh into memory because it technically combines those mesh into one. So if a mesh is used 5 times, it ends up using 5 times the amount of memory for that object.
Where I do use it is on lower res LOD levels. For example:
LOD0 - not static batched (currently)
LOD1 - sometimes static batched, sometimes not
LOD2+ - always static batched
etc.
My memory budget is 4GB and when static batching is used memory consumption goes up to ~20GB in the current state. All this said, I'm going to be investigating what the memory footprint looks like when most static objects are disabled. If the additional memory isn't required while the objects are disabled I may revisit more aggressive static batching once I've finished up my scripted object culling (gameobject disabling).
Hope this makes sense.
@@CassiusJohnAdams Thanks man
I get it now ......
Were the cars passing through walls?
Yes! Good catch. I haven't fully implemented the NPC logic, pathfinding, and AI for them yet.
Maybe just make waypoints that takes the npc cars around the blocks. Kinda what i did on my cyberpunk city. Looked believable enough.
@@fressno1807 Did you find it to be pretty performant? I really need to figure this vehicle stuff out soon. :)
I'm already doing that with distant cars. Although somewhat differently as those are a transparent texture on a single mesh with the materials coords being manipulated.
@@CassiusJohnAdams you mean you just switch the mesh on and off when the player is out of radius? and just have multliple cars spawned everywhere in the world but only turned on when the player is close enough?
@@fressno1807 Not exactly. The mesh on/off isn't based on radius, but based on view corridors I'm working on. But I suppose in-essence that's what you mean. Right now they're just gameobjects but I'm investigating Addressables for that to help with memory. For the cars, they're not spawned everywhere in world, only within relatively-close distance to the player, but out of view. But they'll basically all be in the scene anyways because of the object pooling, so I don't mean instantiating new objects.
I'm confused, I really like your game btw. I'm getting 10 fps. Can you help?
There could be one or more of very many things going on. What does the Profiler show you with regards to whether you're CPU bound or GPU bound (I'm guessing CPU but you never know until looking)?
Hmm.. I think you are insane. This insane will lead you to success. That what I think for now.
And I have problems running Crazy Taxi...
Very cool. Hello from Reddit
Thank you!