For UE5.4 entity not moving and build issues: at 6:57 I need to add const before the UWorld& to match with the definition in UMassEntityTraitBass, otherwise I got C3668 error. at 8:21 need to add :EntityQuery(*this) after USimpleRandomMovementProcessor::USimpleRandomMovementProcessor(), otherwise the entities will not move.
Thank you so much for this post! I was going through every tutorial I could find to try to solve this problem, and your comment is 100% correct. This needs more upvotes! For anyone not that familiar with c++, USimpleRandomMovementProcessor::USimpleRandomMovementProcessor() : EntityQuery(*this) initializes the EntityQuery member variable (anything after the colon of the constructor signature is called an "initializer list". Previously there must have been some code that explicitly set the EntityQuery after construction that has been since removed.
Any more in depth videos or information repo's for Mass ? Been hunting for hours and this is literally the only source of information I can find. There's a community project but pulling from git doesn't work. Documentation is negligible, just provides names of subsytems. I'd love to dive in and start learning but I can't find any foothold to begin.
Who came up with this trait, fragments and processors idea? Wouldn't be simpler to just treat it as what exactly is. ECS (Entities = Indexes of data, Components = the Data itself, Systems = Behaviors)? The real genius lies within simplicity.
That's how it works from the user's perspective, sure. The point of archetypes and such is to prevent memory from being memory on rarely used components, as well as reducing iteration time when looking for a specific combination.
ECS is Unities approach to data driven programming. This is just a different approach to same. That being said I think traits are not really necessary and we can get away with just fragments with no additional layer between entity and fragment.
tbh I prefer fragment over component. imo Component typically implies data AND behavior - eg. CharacterMovementComponent. Fragment is a better term for something that is just data and not behavior.
I'm falling at the first hurdle here... I don't see any debug visualisation cones at 5:32 in UE5.4. I've rewatched it again and again to see if I missed anything, I didn't. Any ideaas what could be wrong if I've followed your tutorial exactly so far?
@@swait239 in the demo Mass is driving all the pedestrian and traffic simulation in the open-world section (performing logic and preparing data for animation), including traffic lights logic (there's thousands of intersections in the city) and representing and tracking all the parked cars. Mass was also driving crowd and traffic LODing (both visual and behavioral).
I'm using UE 5.3 and this code seems to be out of date... 😞 For starters, *UMassProcessor* doesn't seem to have a *ConfigureQueries* or *Execute* function anymore. Closest I can find is *CallExecute* , which isn't virtual and takes in a *FMassEntityManager* instead. Any chance we can get an update for this?
actually I am in UE5.3 and I do see the Execute functions. For example you can take a look at the MassLookProcessors, the code is similar to what we have here. But for me the Execute doesn't work at all as well.
In function Execute after update first argument is FMassEntityManager& EntityManager not UMassEntitySubsystem. Also I did everything like in video but mine Context is full of nulls. Where I should look for issue
The biggest selling point of Unreal Engine is its ability to utilize Blueprints. However, functionalities like generating Mass AI cannot be achieved without using C++.
@UnrealEngine @MieszkoZielinski Please provide link for example project with little dudes to tear apart and learn.. :) Was waiting for proper ECS in UE for quite some time, now I can make my dream game true!
How did you pass per instance custom render data to the entities? (like the parameters that drive the animation shader) I can't find anything on how I should approach this, tried a processor that iterates over FMassInstancedStaticMeshInfo-s but no luck so far
Has anyone else encountered an issue that the SimpleRandomMovementProcessor isn't executing at all? I added logs in the Config and Constructor functions, and they indeed are called several times, but the executor isn't. Any ideas?
I found the solution on the Epic forum. You need to add an extra line to finish registration: EntityQuery.RegisterWithProcessor(*this); It works for me void UXXXXProcessor::ConfigureQueries() { EntityQuery.AddRequirement(EMassFragmentAccess::ReadWrite); EntityQuery.RegisterWithProcessor(*this); }
But what about multiplayer? I don't see spawned elements on the client. After packaging game I don't see them too, even on singleplayer. When I play game from editor I see them on server and standalone only.
@@DyMoKen Thx, now it works on standalone and server after packaging but not at clients. Probably I need config some traits. I tried MassReplicationTrait and different settings but at the client i don't see anything. Any ideas?
@@mariopalmero2606 I had a blueprint project that I added the C++ code that turned it into a C++ project and added the plugins they required in that video When I directly call FMassFragment, it is working but not when I parent it like they did
@@RaedAbbas Yes I sorted that out, my guess is that most of those who makes the videos assume you have a solid knowledge of C++. Now I got everything working, even managed to spawn 15k AI doing their own things
So basically all this system is for static objects only right? You can't use this system in some multiplayer game to spawn like, 500 characters and replicate all of them using server?
With all the steps followed up to ua-cam.com/video/f9q8A-9DvPo/v-deo.html including ticking the Auto Spawn on begin play I don't see anything in the editor
You guys should take something else out of unity's book and release these examples so we can play with them and break them. If there are examples the links should be provided!!
I have to say this: Documentation is not enough sometimes it's required tutorial. I think unreal engine have to come with employees who can explain every single features on unreal engine 5 on real projects like a professional on Multiplayer games or Film and animation etc. Sometimes it's happens I am stock on perticular thing for many hours.
What is the advantage of seperating traits and fragments? Why don't we just directly add fragments to entities? I don't see what is the advantage we are getting from having that additional layer.
cool, i can only hope it will get adopted to blueprints as im not planning to learn c untill i master programming blueprints first. Still, good this exist
Would maybe help to start the demo by showing how to initialize project with sample content. Even starting with the template wizard to show how the project was created would be nice.
It was confusing at first, especially from the blueprint guys... But now after perseverance and the will to understand C++, I love it and moved my project to C++
@@KeinZantezuken incorrect, entities in dots was just about a month ago released in 0.5 version and 1.0 will come no sooner than next year and it will not be backwards compatible with the current 0.50 version. Unreal ecs may be experimental but I would assume it is already safer and more usable than Unity ecs. It is funny that over the last 4 yrs they have been developing it at Unity, everyone waiting for it me included and now Unreal 5 just has it without announcing anything beforehand :)
Amazing though! That great to see ECS in the engine. Although it's not good idea to fully integrate the game on it now. Better use a custom engine. But Nice to see these features
This is just amazing. It's hilarious how Unity is flapping around in the dirt of their DOTS system for several years now and they just managed to call their version 0.5, while Epic pretty much got it right on the first try :)
@@TuberTugger ECS software pattern was already known and quite well explored before Unity presented their initial prototype nearly 5 years ago. Now, nearly 5 years later, they failed the bring it to a production ready state and still call it "0.5" version. Epic on the other hand started much later and already ships quite usable version. Snarky comments are fine. I posted one as well after all, but you need to have your facts straight beforehand, otherwise you just embarrass yourself. :)
Well,I don`t want using graph to replace to c++ code because the node graph is very difficult to manage expecially a big Project.The blueprint should be simple and fast iteration and the Engine C++ code should be easy to extendable.I hope the hold Engine Source Code Be rewrite for a better Structure for feature
DOTS has been released a while back in 2021. And what makes you think Unreal's one is complete (literally says Experimental) and it took them less time? UE5 has been long time in dev.
Do you realize that DOTS is way different to Mass? Mass is only a part of the engine which allows you to do some parts of your game with ECS. DOTS is a major change to Unity which allows you to completely write your game with it. These two technologies can't be compared.
@@theytittylyrics But essentially the work both ecs do is reducing cache miss. Now unreal is able to do that. Not to mention nanite and lumen and double float precision system. So my main point is that Unity improves it self much slower than Unreal.
@@digitalmimesislab7240 Unreal is able to do that but Unity does it much more effenciently if you use only DOTS since pretty much everything there in the engine is stored data-driven, which isn't the case with Unity.
it is available for a couple of days. If you just want a built version and not the projects, search around discord or twitter and you will find community builds of the Matrix demo that you can just download and play.
Everything builds nicely: but when I try to run it on UE5.1 I get this error: Assertion failed: ExecutionContext.ExecutionType == ExpectedContextType && (ExpectedContextType == EMassExecutionContextType::Local || bRegistered) [File:D:\build\++UE5\Sync\Engine\Plugins\Runtime\MassEntity\Source\MassEntity\Private\MassEntityQuery.cpp] [Line: 154] ExecutionContextType mismatch, make sure all the queries run as part of processor execution are registered with some processor with a FMassEntityQuery::RegisterWithProcessor call UnrealEditor_MassEntity UnrealEditor_SadesECS!USimpleRandomMovementProcessor::Execute() [C:\Users\greg\Documents\Unreal Projects\SadesECS\Source\SadesECS\SimpleRandomMovementProcessor.cpp:24] UnrealEditor_MassEntity Any idea how to fix it?
@@mohamedibrahim2417 i did - big chunk of it was upgrading to 5.1 and adding a couple of things to the build file. There's a mass ai github sample project, it should point you in the right direction - I'll try to dig it up later and share with you. DM me.
For UE5.4 entity not moving and build issues:
at 6:57 I need to add const before the UWorld& to match with the definition in UMassEntityTraitBass, otherwise I got C3668 error.
at 8:21 need to add :EntityQuery(*this) after USimpleRandomMovementProcessor::USimpleRandomMovementProcessor(), otherwise the entities will not move.
Thank you so much for this post! I was going through every tutorial I could find to try to solve this problem, and your comment is 100% correct. This needs more upvotes!
For anyone not that familiar with c++,
USimpleRandomMovementProcessor::USimpleRandomMovementProcessor() : EntityQuery(*this)
initializes the EntityQuery member variable (anything after the colon of the constructor signature is called an "initializer list". Previously there must have been some code that explicitly set the EntityQuery after construction that has been since removed.
Best start of an ECS so far. You need to continue this serie. That's the game changer.
This highlights a lot of great features, but it would be great to overview the current limitations as well.
We need a proper comprehensive course on this topic on unreal learning
yeh 100%... It's crazy that epic devoted so much resources to make mass entity and the matrix demo and then dropped the ball with the docs and samples
Will you make a tutorial about the shape section, i.e. the traffic system?
Any more in depth videos or information repo's for Mass ? Been hunting for hours and this is literally the only source of information I can find. There's a community project but pulling from git doesn't work. Documentation is negligible, just provides names of subsytems. I'd love to dive in and start learning but I can't find any foothold to begin.
Who came up with this trait, fragments and processors idea? Wouldn't be simpler to just treat it as what exactly is. ECS (Entities = Indexes of data, Components = the Data itself, Systems = Behaviors)? The real genius lies within simplicity.
unity patented the ECS framework, which is kind of scummy. It is likely to avoid lawsuits from a competitor
That's how it works from the user's perspective, sure. The point of archetypes and such is to prevent memory from being memory on rarely used components, as well as reducing iteration time when looking for a specific combination.
ECS is Unities approach to data driven programming. This is just a different approach to same. That being said I think traits are not really necessary and we can get away with just fragments with no additional layer between entity and fragment.
tbh I prefer fragment over component. imo Component typically implies data AND behavior - eg. CharacterMovementComponent. Fragment is a better term for something that is just data and not behavior.
Gotta love patents on ideas that were documented a decade prior to the patent...
Where do we download the sample project?
Anyone ever find this? :)
Is the ability to define traits and add entities going to be made accessible via Blueprint at some point?
They said it will be as the engine gets updates. However, I'm looking to create a plugin that makes this easier for us.
I'm falling at the first hurdle here... I don't see any debug visualisation cones at 5:32 in UE5.4. I've rewatched it again and again to see if I missed anything, I didn't. Any ideaas what could be wrong if I've followed your tutorial exactly so far?
Great! We need tutorial on traffic simulation using mass
Was mass used for the vehicle animations for the cars racing after the car w/ Neo in matrix?
@@swait239 No, that was good old fashion, yet realtime, cinematic.
@@Miechu0 To what extent was Mass used for the matrix then?
@@swait239 in the demo Mass is driving all the pedestrian and traffic simulation in the open-world section (performing logic and preparing data for animation), including traffic lights logic (there's thousands of intersections in the city) and representing and tracking all the parked cars. Mass was also driving crowd and traffic LODing (both visual and behavioral).
@@Miechu0 what wasn’t Mass used for that we would expect it used for but was in fact not?
Is there an example project of the demo in the video I can download?
This is fantastic, but please please please give us a working demo codebase ...
This is great, exactly what I was hoping for. If I can put 1k or 2k enemies in one level without performance penalties I'll be very happy.
yeah I'm trying to simulate machine learning ai but thousands hopefully this will work
You should look into Apparatus, a UE full fledged ECS framework
@@HereIsZane why Apparatus when MassEntity is free?
@@leroy2311 Mass is very much WIP and only meant to be used for specific stuff, Apparatus is general purpose like Unity DOTS
Do you have a link to the code? It will be helpful to build a demo project with this code.
Where to download sample project?
Does this come with a job system to make multithreading easy & safe?
We're working on it.
the only mass ai tutorial i can find is outdated ? yes it is
I'm using UE 5.3 and this code seems to be out of date... 😞
For starters, *UMassProcessor* doesn't seem to have a *ConfigureQueries* or *Execute* function anymore.
Closest I can find is *CallExecute* , which isn't virtual and takes in a *FMassEntityManager* instead.
Any chance we can get an update for this?
actually I am in UE5.3 and I do see the Execute functions. For example you can take a look at the MassLookProcessors, the code is similar to what we have here. But for me the Execute doesn't work at all as well.
So, this feature will be by default in the next versions of the engine?
Omagaaaad
I so love it!
I’m a big fan of ECS approach on Unity(Entitas)
So now I feel free to switch on ue5 completely🤔
x2
Hi, Thx for the tuto. Any ideas on how to get those recordable on Take Recorder please?
In function Execute after update first argument is FMassEntityManager& EntityManager not UMassEntitySubsystem. Also I did everything like in video but mine Context is full of nulls. Where I should look for issue
5:00 When are you going to talk about zone graph then?
The biggest selling point of Unreal Engine is its ability to utilize Blueprints. However, functionalities like generating Mass AI cannot be achieved without using C++.
Can you make tool like geometry nodes in Blender?
Can we have this as a sample project to download somewhere?
Why didn't they go full SOA ? The fragment as the array element means we can't use SIMD to process attributes?
@UnrealEngine @MieszkoZielinski Please provide link for example project with little dudes to tear apart and learn.. :) Was waiting for proper ECS in UE for quite some time, now I can make my dream game true!
were i can see gdc talk dilution of motion ?
How did you pass per instance custom render data to the entities? (like the parameters that drive the animation shader)
I can't find anything on how I should approach this, tried a processor that iterates over FMassInstancedStaticMeshInfo-s but no luck so far
Greetings! Is there any chance that you have sorted out this problem? I would like to pass some custom data into an entity's material, too...
Has anyone else encountered an issue that the SimpleRandomMovementProcessor isn't executing at all? I added logs in the Config and Constructor functions, and they indeed are called several times, but the executor isn't. Any ideas?
I found the solution on the Epic forum. You need to add an extra line to finish registration:
EntityQuery.RegisterWithProcessor(*this);
It works for me
void UXXXXProcessor::ConfigureQueries()
{
EntityQuery.AddRequirement(EMassFragmentAccess::ReadWrite);
EntityQuery.RegisterWithProcessor(*this);
}
But what about multiplayer? I don't see spawned elements on the client. After packaging game I don't see them too, even on singleplayer. When I play game from editor I see them on server and standalone only.
I guess, you forgot to replace Debug visualization, which is used for editor only.
@@DyMoKen Thx, now it works on standalone and server after packaging but not at clients. Probably I need config some traits. I tried MassReplicationTrait and different settings but at the client i don't see anything. Any ideas?
Thanks for your lesson. Excellent presentation. :)
Hi! Is there a way to get a list of what processors will run on an entity config, either through code or in the editor UI (preferably this :))?
So is there no way to have a skeletalmesh? do we have to bake all animation into the material?
Hey, few questions, does multiplayer work with these, can it be used alongside non data oriented stuff?
FMassFragment is now missing in UE5.4
The unedited BasicTrait C++ file assigned to the Data Asset crashes Unreal every single time.
How do you get that FMassFragment? I get an error when I try to implement it
Have you included the plugins and the modules? Have you added the dependancies in your Build.cs file?
@@mariopalmero2606 I had a blueprint project that I added the C++ code that turned it into a C++ project and added the plugins they required in that video
When I directly call FMassFragment, it is working but not when I parent it like they did
@@mariopalmero2606 Have they mentioned dependencies in the video? Only the plugins were mentioned!
Have you sorted this problem out?
@@RaedAbbas Yes I sorted that out, my guess is that most of those who makes the videos assume you have a solid knowledge of C++. Now I got everything working, even managed to spawn 15k AI doing their own things
where can i get the project?
can i use this with Dynamic NavMesh (Invoker) instead ZoneGraphs ?
So basically all this system is for static objects only right? You can't use this system in some multiplayer game to spawn like, 500 characters and replicate all of them using server?
With all the steps followed up to ua-cam.com/video/f9q8A-9DvPo/v-deo.html including ticking the Auto Spawn on begin play I don't see anything in the editor
I am having the same issue. Is this tutorial outdated?
it gives me errors in the compilation...but not knowing much about programming i don't know how to correct.
You guys should take something else out of unity's book and release these examples so we can play with them and break them. If there are examples the links should be provided!!
I have to say this: Documentation is not enough sometimes it's required tutorial. I think unreal engine have to come with employees who can explain every single features on unreal engine 5 on real projects like a professional on Multiplayer games or Film and animation etc. Sometimes it's happens I am stock on perticular thing for many hours.
This is kinda how Rare did sails and floating barrels in Sea of Thieves.
The first slide says “Mario Palermo”, but I think his name is Mario Palmero 😅 Mario Palmero Pavon.
What is the advantage of seperating traits and fragments? Why don't we just directly add fragments to entities? I don't see what is the advantage we are getting from having that additional layer.
They try to keep the data low so its fits in L1-L3 cache, run it on all entities and move on to the next fragment/trait, for maximum speed.
Nice :D think we will ever see texture-driven displacement with nanite? RIP tessellation
cool, i can only hope it will get adopted to blueprints as im not planning to learn c untill i master programming blueprints first. Still, good this exist
Would it be possible to create zombies which can damage players and also take damage?
Pleeeeeease make a tutorial about zone shape and traffic system.😭
I made a tutorial about getting Mass Crowd AI working in any project
ua-cam.com/video/bVvYn7dEqMA/v-deo.html
Working on a MassTraffic tutorial atm.
I m not a computer guy,but can anyone explain what is these?❤️
I can use this un Blueprint???
“our tar jet” 🙉
Would maybe help to start the demo by showing how to initialize project with sample content. Even starting with the template wizard to show how the project was created would be nice.
Does anyone know if this works on mobile?
It was confusing at first, especially from the blueprint guys... But now after perseverance and the will to understand C++, I love it and moved my project to C++
I do not have time to wait for them to make it available in blueprint, I will create a C++ module
Basically Unreal version of Unity DOTS
But it's ready :) The one thing that kept me using unity was the hope for dots... and now I will have it in Unreal just like so.
@@adamodimattia The same here
But the job system and burst compile are also attractive to me
@@adamodimattia It isnt "ready", it literally says "Experimental". DOTS was released into 1.0 by Unity at the end of 2021
@@KeinZantezuken incorrect, entities in dots was just about a month ago released in 0.5 version and 1.0 will come no sooner than next year and it will not be backwards compatible with the current 0.50 version. Unreal ecs may be experimental but I would assume it is already safer and more usable than Unity ecs. It is funny that over the last 4 yrs they have been developing it at Unity, everyone waiting for it me included and now Unreal 5 just has it without announcing anything beforehand :)
Why in the world is this called "Mass"?
Because it can process masses of entities
So good you guys!
R.I.P Unity DOTS. Apr 26, 2022
Amazing though!
That great to see ECS in the engine. Although it's not good idea to fully integrate the game on it now. Better use a custom engine. But Nice to see these features
Will this be used in Lego Metaverse?
Awesome!!!
Motor Grafico-Sensei
This is just amazing. It's hilarious how Unity is flapping around in the dirt of their DOTS system for several years now and they just managed to call their version 0.5, while Epic pretty much got it right on the first try :)
It’s pretty easy to copy
It's hilarious that it has taken older car manufacturers decades to get to today's models. And new car companies do it right away!
@@TuberTugger ECS software pattern was already known and quite well explored before Unity presented their initial prototype nearly 5 years ago. Now, nearly 5 years later, they failed the bring it to a production ready state and still call it "0.5" version. Epic on the other hand started much later and already ships quite usable version.
Snarky comments are fine. I posted one as well after all, but you need to have your facts straight beforehand, otherwise you just embarrass yourself. :)
@@LudvikKoutnyArt Lol. You just said the same thing again. You didn't embarrass anyone but yourself.
Kingdom hearts 4 battle of 10,000 heartless here we come
I just want a city sim with millions of real citizens.
That's coming in 5.1 ;)
@@Miechu0 really?
@@jasonruff1270 I winked! Although that's our long-term goal.
@@Miechu0 what is your take on having large numbers of machine learning AI?
@@jasonruff1270 it heavily depends on what you mean exactly. There's so many pitfalls, disclaimers and hardware limitations!
Nice use of different terminology xD just say ECS
No, it is modified.
It's EFP :P
@@Miechu0 Entity Fomponent Pystem?
@@TheEraindil Entity Fragment Processor, but I like yours even more ;)
Well,I don`t want using graph to replace to c++ code because the node graph is very difficult to manage expecially a big Project.The blueprint should be simple and fast iteration and the Engine C++ code should be easy to extendable.I hope the hold Engine Source Code Be rewrite for a better Structure for feature
2nd (wonderful news btw.)
While Unity has spent years to develop DOTS,boom! Unreal releases their DOTS suddenly.
DOTS has been released a while back in 2021. And what makes you think Unreal's one is complete (literally says Experimental) and it took them less time? UE5 has been long time in dev.
Do you realize that DOTS is way different to Mass? Mass is only a part of the engine which allows you to do some parts of your game with ECS. DOTS is a major change to Unity which allows you to completely write your game with it. These two technologies can't be compared.
@@theytittylyrics But essentially the work both ecs do is reducing cache miss. Now unreal is able to do that. Not to mention nanite and lumen and double float precision system. So my main point is that Unity improves it self much slower than Unreal.
@@digitalmimesislab7240 Unreal is able to do that but Unity does it much more effenciently if you use only DOTS since pretty much everything there in the engine is stored data-driven, which isn't the case with Unity.
@@theytittylyrics Maybe, i hope.
The whole video was done pronouncing target as "tarjet"? lol ... beside that good stuffs.
can you guys pls buy Unity and rewrite all their engine? :)
Make the Matrix Demo available for PC please!! I love the nanite technology and realism in the demo ❤
I thought it's already available?
It's already available for PC.
it is available for a couple of days. If you just want a built version and not the projects, search around discord or twitter and you will find community builds of the Matrix demo that you can just download and play.
it is...its called city sample
@@omegablast2002 thanks
I want massive amounts of machine learning AI
Oh my, Unreal overtaking the ECS frameworks and tools. Unity don't like this! :V
Simple ECS framework ..
ok...
Last!
1st
UE5.0.1 MacOS Water and Landmass Plugin issue. Reminding.
Everything builds nicely: but when I try to run it on UE5.1 I get this error:
Assertion failed: ExecutionContext.ExecutionType == ExpectedContextType && (ExpectedContextType == EMassExecutionContextType::Local || bRegistered) [File:D:\build\++UE5\Sync\Engine\Plugins\Runtime\MassEntity\Source\MassEntity\Private\MassEntityQuery.cpp] [Line: 154] ExecutionContextType mismatch, make sure all the queries run as part of processor execution are registered with some processor with a FMassEntityQuery::RegisterWithProcessor call
UnrealEditor_MassEntity
UnrealEditor_SadesECS!USimpleRandomMovementProcessor::Execute() [C:\Users\greg\Documents\Unreal Projects\SadesECS\Source\SadesECS\SimpleRandomMovementProcessor.cpp:24]
UnrealEditor_MassEntity
Any idea how to fix it?
Hi man I have the same problem, did you manage to fix it ?
@@mohamedibrahim2417 i did - big chunk of it was upgrading to 5.1 and adding a couple of things to the build file. There's a mass ai github sample project, it should point you in the right direction - I'll try to dig it up later and share with you. DM me.
UE5.1 Version You Must Add EntityQuery.RegisterWithProcessor(*this); In ConfigureQueries Function
@@klobodnf This should be its own comment. I wasted hours figuring out what was wrong until I looked at the the Mass Community Sample.
@@klobodnf This was the missing piece, its absolutely mind boggling that this is not documented by Epic.