How many Rigidbodies can Unity support? [2020 DOTS EDITION]
Вставка
- Опубліковано 13 жов 2024
- In this video we push Unity Physics to its limit again with the new DOTS physics engine. Will it crash this time ?
Link to the Brackeys video : • How many Rigidbodies c...
We will create a script that generate a tower of cubes, first with regular GameObjects and Rigidbodies then with ECS Entities and DOTS physics
This is the very first video on this channel, all feedbacks are welcomed !
You guessed it, I'm French, tell me what I can improve on my English speaking :)
Hey there, thanks for watching this video ! I'm a French channel and this is my first English / Unity video :)
Do you think I should do more of them ? and create a dedicated channel ?
You did a very good job in English. Please do more.
Do more, but try to speak slower and explain more. I am a newbie and cant follow your editing steps
100% yes
So its 9000 cubes without DOTS and 15000 with DOTS. Not much of an improvement.
loved it. I would like to see more DOTS tutorials. I am an experienced Unity developer and really DOTS is a game-changer. Please share your knowledge on this topic :)
6:21 "Entity Deburger" :D Good Video!
🤣
dev burger
full dots release test again ?
Awesome video! Friend was just talking about Unity + DOTS. I think this is a perfect simple example that makes it easy to explain and follow along with code =) great work!
Nooooo. You didn't test Havok. I bet that would give you even better performance. Switching to Havok is just a click of a button.
Dude, i loved this video! Also, DOTS fits like a glove to a system i'm developing, and this video is a definitive proof of it because my hardware is exactly like yours
This was your first tutorial in English? Wow, great tutorial!
Thank you ☺️
I like how this guy casually took Boris' vodka cooled PC video thumbnail in 0:48
J'ai regardé toute la vidéo avant de me rendre compte que c'était toi. BG ! 😄
Hahaha énorme!!!! Comment ça va depuis le temps?
Very good video, straight to the point and very nice explanations! Can't wait to see more content
Thanks for the video, helped me out a ton. What bgm is playing at 6:20min and ongoing, if I may ask?
Bien fait! This was a useful little intro to see the difference in scale of the physics system. Im currently still running away from DOTS until it's out of preview, but it's good to see its potential.
Great job! This was a lot of fun to watch! 👍🏻😊
I loved your video! The DOTS workflow seems very promising if they manage to iron out the bugs and make it a tat easier/faster to implement. I work on mobile games and sadly i don't think this will have much aplicability there in it's current state. Here release time is in most cases more important than performance and from what i've seen the DOTS workflow seem slower.
Thanks for the comment ! For mobile, it is useable to optimise game and reduce heat but it'll be harder to code imo ^^
It can be useful to use ECS/DOTS for performance critical part of the game and use traditional workflow otherwise, I've actually shipped a mobile game that uses a DOTS pathfinding combined with regular game objects (Snap Guys).
You know what would be a really cool test to do like this? Take all these entity objects, have them start is some container, and pour them out.
Nice vid, would like to see it with havok.
i loved seeing the counter and then switching to NOPE lol....nice touch.
Also, you should try this with Havoc too, I think that might be even faster than Unity Physics.
This isn't even Unity Physics - OP is using the "Rigid Body" component, which is not ECS and only supports PhysX.
@@solaris5303 Did you even watch the video? He switches it to a Physics Body after testing Rigidbodies.
Can you post this on github for other to test out? :)
How many cubes without physics but just as entities can you handle then ?
Very cool - performance x2 seems a little underwhelming though. I’m guessing using the BurstCompiler within your script would provide a decent boost?
The burst compiler was enabled but the only script on this project is the tower spawner that only works on start anyway. The bottleneck was the physic computation on the physic package side that already uses the burst compiler :)
Using a ECS physics subsystem (Unity Physics, Havok) would help immensely - this is using the Rigid Body component, which is PhysX-based and not ECS.
@@solaris5303 Watch the video idiot
It's funny that you have the same accent than Brackeys :) Thanks for the video !
Thanks ahah, I have to say he really inspired this video so I got the accent from watching them ^^
Looks like waterfalls!
With dots it seems in the corner that you have less than 60fps for the 8512 blocks. I expected like more than 100fps for the same blocks number. Is there a catch?
Fantastic. Love some Crysis falling barrels tests
n unity 3d android template i want to add a ui button witch rotates my car in mid air forward or backward for a back flip or a front flip pls help i want this
I followed you and made a DOTS tower of bricks to test coding DOTS. I like how you do everything from scratch, and kept it simple. I had a hard time with versions of things: Unity version(2019.3.10), Unity Physics is gone in the current version so I had to download 2019.3.10, and Hybrid renderer version, if you get these wrong you get errors. Also, you didn't say what the includes were, but figured everything out. My last name is French, but I don't speak the language (wish I did). I could understand you, but some of your vowels were hard to decipher. Unity is such an international tool, that I am getting used to more and more accents, but I think it's good to keep working on pronunciation. You speak surprisingly quickly.
Awesome, and thanks, very nice to hear :)
good video, thanks for demonstrating. You're English was very good!
Thanks, so nice of you ! :)
Your*
@@efeloteishe4675 ha ha! Yes.. Good spot.
Hey, nice vid dude! That is also a first time for me (never watched any perf test about Unity before), but that was interesting and well explained. I guess english is not your mother tongue, but your accent sounds good to me :)
Also I don't know how you came up with that idea to try out this new DOTS Unity feature, but I hope you will show more of it in your next videos! Keep up!
Ahahah thanks dude, I really believed that it was some random guy who wrote this, you always got me ♥️
I'm actually a random guy, since I've been selected by a stochastic algorithm ✈️🐜 But you're welcome buddy ;)
I can't tell if you're French, Swedish or Indian
Edit : Nevermind
French with an English accent inspired by Brackeys (Danish) xD
He clearly sounds French.
@@LaCreArthur ok so that's why the 'R' is missing in the words like floor.
STANDART SHADER AND a lot of meshes instances of cube broke your check-performance-tests by fps.
Who will die faster:
Unity with 200000 cubes
My poor MacBook
i would like to see using dots in basic stuff like character controller or enemies if we can even use it for those :D Im not sure where is it good idea to use
You should use it entirely, or not at all typically. It takes a lot of thinking to do right, but the gains are substantial. Of course you can mix and match ECS and monobehaviors, but it's not ideal. :)
Good idea for a future video :)
So, can we make minecraft with better graphics and every block with rigidbody in unity?
Can you remake this video for 2023 please?
1. Please test with Havok
2. Great vid! Please keep up
@LaCreArthur Can you make a video how to use dots SubScene and what scrips have to go in there to optimize transforms in 2020.3? In the past when trying Megacity, there was an additional optimize script should be used. That would be great! thank you
not sure I know much about this subject but I'll see, thank for the suggestion !
Also I'm willing to move this English-Unity tutorial video out of this French Skateboard/Gaming channel into a new one, what do you think ?
damn imagine some high res teardown 2 with this stuff
I don't know why, but I have same performance before and after adding DOTS feature... 3 fps on 6k cubes.. Any ideas?
Did you enabled burst compiler? It's can improve performance on physics simulation?
it is enabled in the physics package itself already if you are using the DOTS physic shape and body components
Jobs and Burst Compile don't help in this scenario?
They're already leveraged in the DOTS physics package, and for my tower spawning script, it runs only on Start so there is no need for them
@@LaCreArthur Thanks for info.
Nice video! Can this technique be used for a massive amount of vegetation? A video about it would be interesting :)
Sure, you gonna have benefits from using the hybrid renderer and entities but physics doesn't seems relevant here, and I don't know about LOD groups for entities...
Unless you are doing a lumberjack game, I'd advise against it.... There are much better implementations for vegetation in Unity (and with 3rd party)
This was a really nice vid. Good quality
Thank you for this comment !
Are you secretly Brackey's secondary channel?
Yes, but also no !
@@LaCreArthur Schrödinger experiment explained in a comment 😂
Also, great video. Keep it up!
Its weird that Brackeys never experimented with Physics iterations, since those affect performance the most.
They also affect accuracy the most as well. I did my own little test over a year ago and I recall cubes falling through the floor or passing through other cubes as if they weren't being calculated in the physics operations.
fluid sim !!!
Yes ! could definitively be turned into a full physical 3D fluid sim using spheres and shaders, that's a cool idea for a new video :)
Have you tried same simulation but using Havoc physics engine? Supposedly because its cache based it is more performant.
not tried but yes it might be better
The DOTS editor was cancelled, and specific to project TINY. Unfortunately you are expected to set up your own archetypes or use sub scene conversion. You can also use authoring components. In addition to all that, you have the option to Live Link game objects to entities for editing at runtime.
By the way, did you test DOTS in a standalone build? Performance between the editor and standalone is substantially different supposedly.
Good video by the way! Just wanted to point these things out so you're aware (and other viewers are). :)
I did build the scene as shown in the video, yet it doesn't improved performance that much. Afaik the first Dots editor was dev by the project Tiny team, announced to be cancelled but the team said they will continue to improve their dots tools and merge them with the dots unity packages.
You can check that the dots editor is still in preview and accessible today.
@@LaCreArthur I see, I hope that is indeed the case. I was reading up on it the other day and saw some Unity devs saying Monobehavior conversion was going to be the only way. So that will be a welcomed change, as the GO conversion and manual creation of archetypes are both... eh. :)
I hope you have disabled DOTS debug features, that improves performance a lot!
How do i do that if you dont mind?
Is the DOTS edition build into 2020 package manager? else where do you download it from? Cheers..
Dots packages are in the package manager, everything is shown in the video :)
Great vid, kinda had the tone of a tutorial, but that might have been what you were going for
Yep it was intentional, half dots demo half tutorial/explanations :) thanks for the feedback
Very well explained, so keep it up
Thank you very much, I hope to have the time to make another one soon :)
can we use havok for the phyic
Source code for your test?
Nice video but I'd write the title and description in english if english is spoken in the video :)
Have you visited the video from an English or a French country ? I tested to change my YT profil language to English (US) and it displays the English title and description
@@LaCreArthur From english country, Finland in this case.
@@MrMorvar Hum, ok I've tested setting my language to Finnish and it indeed shows the French title.. so my guess is that we only see the english title if we explicitly set English as our language and it fall back to French as default, that's unfortunate. I've set back the title in English
Thanks for the reply
I guess, even though entities were used the number of cubes only doubled because physics are still expensive to compute.
CD math is expensive, so are objects on the heap when processing them by thousands, what DOTS physics streamlines is the data structures in memory allowing the CPU to work with perfect cache hit streaks for the entire physics simulation resulting in speedups specifically due to the lack of object overhead and cache misses.
8500 vs 15000. speed increase of 56% ? not bad at all.
I was expecting better though ahah ! Interestingly, I could add 4x more cubes (60000!) with DOTS and still run at 15fps while regular rigidbodies could not be pushed that much, like 1.5x more I had 5fps xD
Yes the have grate performance but most of the people including my self the don't know haw the works and not only that is very comlex to create i code with that system in my opinion
Great video
Can you possibly get even more performance out of this by using the Unity Job System?
It is already leveraged in the DOTS physics package, and for my tower spawning script, it runs only on Start so there is no need for it
pretty sure you can go higher. I think once we reach some "deferred" physics mechanics we could keep 60fps while "freezing" some part of the world. Still room for imprevement
Yes physics computation culling is a thing but here all the objects are inside the camera view so it doesn't really apply !
A New Record!
My pc: "3 fps. take it or leave it."
😂
nice
you should enable GPU instancing on both GameObject and Dots version to have better FPS
I tried and it almost didn't change anything with DOTS or gameobjects. In most cases it is always better to do it of course but here the bottleneck is on the physics computation handle by the CPU, not on the GPU. The GPU had so much "free time" that it did not improve the fps at all
You asked for feedback: ua-cam.com/video/U6idEdIEsa0/v-deo.html
This is feedback
No offence meant by this, but it's actually really hard to follow tutorials by people with an accent.
At: ua-cam.com/video/U6idEdIEsa0/v-deo.html. You say "Ow many" when you mean to say "How many"
Same time stamp, "Widgid bodies" instead of "Rigid Bodies"
"He tries to found" => "He tries to Find"
No idea what. you were trying to say at: ua-cam.com/video/U6idEdIEsa0/v-deo.html
"He handed up with a smooth 60fps simulations of 6000 cube" => "He ended up with a smooth 60fps simulation of 6000 cubes"
And most of the video that just happens all the time. I'm spending brain power translating your words into comprehensible (not saying it's not comprehensible but it's grammatically wrong almost all the time, and there are words where I have to flip W's to H's and parse accented words that do/don't have the same in English) language.
If you're going to throw hundreds or even thousands of hours at this, you're not going to be wildly successful if you have the above issues all the time. Spend a few hundred hours polishing your english - it's very impressive that you can speak another language, I can not. But I skip almost every foreign language tutorial because of this issue, and was borderline skip on your video the entire time, the only reason I did not is because I have worked with a lot of French people, so I have an easier time parsing the French accent.
Or alternately, stick to the French language tutorials, I can only imagine it's a more captive audience than the English market that you're going to battle tooth and nail to get into, stay in, and gain traction within. I imagine a really good French tutorial set would get you more traction and a better following in less time than it's going to take you to get the same in English.
Good luck
Fantastic video! I'm so excited about DOTS!!
Thanks for the comment!
@@LaCreArthur Keep up the great work!
Dots looks kinda confusing, but it looks way more optimized! :D Good video btw!
Thanks
DOTS is still unusable. Simple things are still a nightmare to do, like a simple onCollision function. So I will still wait to use it. Nice video anyway!
I saw some collision detection example on the dots physic github repo, maybe I'll do the next video on it :)
@@LaCreArthur that would be a really helpful video :D
ECS is a different, potentially much cleaner way of writing things - you just need to adapt, basically every other engine out there (proprietary or otherwise) using an ECS model.
very good job
Thanks alot !
how much unreal can handle?
probably less than unity dots
About the same as Unity - both are using PhysX 3.3. Chaos Physics may or may not improve performance once it's actually released.
9/11 simulator
wow cool :D
Thanks
I thought you was one indian else
Short answer, not a lot
brackeys copy
Great video.