A deep dive into Boids using Niagara in Unreal Engine

  Рет қаралды 23,209

Ghislain Girardot

Ghislain Girardot

Күн бұрын

Пікірлер: 53
@thebutterflyking
@thebutterflyking 2 ай бұрын
Thank you for sharing so much of your high-level work with us so we can learn more about Unreal and graphics. I'm amazed by what is possible with a high level of mathematics in the engine!
@ghislaingirardot
@ghislaingirardot 2 ай бұрын
Ty for your feedback! The sky's the limit 😁
@vembdev
@vembdev 2 жыл бұрын
Dude this is really cool. I've been coding pretty hard already for few years, but the niagara coding stuff is so intimidating haha. I hope you make more cool stuff.
@ghislaingirardot
@ghislaingirardot 2 жыл бұрын
Thank you! Niagara is indeed intimidating at first but I found the learning curve to be not steep at all. Everything is well thought and there's only a few core concepts to grasp and then it's game on. Will do!
@ccart2343
@ccart2343 11 ай бұрын
I know this is a bit older, but where would one begin to start to look into the coding side of niagara particles? Hard to find good ressources that explain the beginnings well.@@ghislaingirardot
@IPpainting
@IPpainting 2 жыл бұрын
Wow this is so much content. Thank you so much for giving us all this golden information for free! When im going on a work break next month or so im going to get your Tier3 and absorb all the info i can get. Much appreciated
@ghislaingirardot
@ghislaingirardot 2 жыл бұрын
You're welcome, I'm glad the video was informative. I went a little bit too in-depth and the video's length skyrocketed but oh well :D I appreciate any kind of support, ty!
@ooorc46
@ooorc46 2 жыл бұрын
Dude, Awesome work!!! You are my idol!!!
@DmnJordy
@DmnJordy 2 жыл бұрын
awesome video!
@jamaalsineke2405
@jamaalsineke2405 3 ай бұрын
Awesome tutorial. How would this be applied to physical boids like other AI enemies, not Niagara particles
@jomesias
@jomesias 3 ай бұрын
If you use a mesh renderer and select the ai skeletal mesh it could work. But I’m not sure if they would run the AI behavior tree/ code !
@jamaalsineke2405
@jamaalsineke2405 3 ай бұрын
@@jomesias Interesting..... thank you for taking your time to comment. I appreciate you
@Wodyingyu
@Wodyingyu 9 күн бұрын
Hello ! Nice video ! Could it be apply to have a flock of sheep or deers ? WorldToUnit input is a proper to unreal engine 4 ? Do we need to be on patreon to get access to the project ? Thanks
@ghislaingirardot
@ghislaingirardot 8 күн бұрын
Hi! Ty 1) Sure but you'd have to come up with your own flock algorithm. Not sure sheep/deer adhere to the rules described here. 2) I don't understand. You'll probably find the answer in my NeighbordGrid3D beginner to expert video. 3) Yes, files are only available on my Patreon
@thisghy8126
@thisghy8126 9 ай бұрын
How would you go about making this bound to terrain for non-swimming or flying but walking behavior? Love it
@ghislaingirardot
@ghislaingirardot 9 ай бұрын
Hi! kzbin.info/www/bejne/r2ewh2SogLOXmaMsi=Ab5gAGQvZzsUbUiy This might help
@antreasalexandrou116
@antreasalexandrou116 Жыл бұрын
Amazing work, is this working on Unreal Engine 5?
@ghislaingirardot
@ghislaingirardot Жыл бұрын
Thanks! Yes I have an Unreal Engine 5 version on my Patreon :) It only needed minor tweaks to properly work in 5.
@叶枕头
@叶枕头 Жыл бұрын
Hello, how can particles avoid meshes?
@ghislaingirardot
@ghislaingirardot Жыл бұрын
Hello! Here I'm using the Global Distance Field. It basically samples a very rough volumetric representation of your scene (if you use Distance Fields!) and each particle can get the nearest surface position & normal at any given location and drive logic based on that and go away from nearby surfaces/objects.
@叶枕头
@叶枕头 Жыл бұрын
@@ghislaingirardot Thank you very much. I'll try it now
@michaeldelva5487
@michaeldelva5487 Жыл бұрын
Great job ! Is the target location individual for each particle, or is it the same target for all the particles?
@ghislaingirardot
@ghislaingirardot Жыл бұрын
Ty. The target location? Sry this is an old video, I don't remember it all.
@michaeldelva5487
@michaeldelva5487 Жыл бұрын
@@ghislaingirardot Sorry I meant the Destination, at timestamp 21'30
@ghislaingirardot
@ghislaingirardot Жыл бұрын
@@michaeldelva5487 No need to apologize :) Destination is per particle
@kyroba515
@kyroba515 Жыл бұрын
This is exactly what I needed! I am trying to simulate electrons in a volume, and this kind of method may actually work. The particles would not have a field of vision and there would be a repulsive force due to charges. How simple would a modification of what is done here be in your opinion? I already have a python program that simulates this but I am finding it difficult to use Niagara. Your thoughts are appreciated!
@kyroba515
@kyroba515 Жыл бұрын
I just stumbled onto your smart crabs work! The dispersion of the crabs is exactly what I need! In your images that you supplied, you have a Dispersion node, where do you get that from?
@ghislaingirardot
@ghislaingirardot Жыл бұрын
@@kyroba515 Hey! That dispersion isn't a node but is just a vector stored per particle that is computed based on the nearby particles using the grid 3D interface and custom HLSL. Honestly I wouldn't even try modifying this boid algorithm nor my crab algorithm to do what you're trying to do. I'd start from scratch. Building a repel force is not that complicated actually, it's probably more of a matter of getting comfortable with Niagara overall in your case. Did you have a look at the various advanced Niagara system examples provided by Epic? Like the Content Examples project and Niagara Fluids plugins both demonstrate great physically-based particle interactions. There's for instance a sand emitter that is a great yet simple example of that. Once you understand how to use the grid 3D interface through custom HLSL it becomes quite easy to repel particles based on other nearby particles. Good luck!
@kyroba515
@kyroba515 Жыл бұрын
@@ghislaingirardot Thanks for the quick response! I agree, I think I just need to get more comfortable with Niagara and Unreal as a whole. This is my first time using it! I took a look a the content examples and I am trying to achieve something similar to the Plexus example except with actual particle repulsion. I will take a look at the sand emitter then!
@kyroba515
@kyroba515 Жыл бұрын
I have been trying to understand the 3d neighbour grid interface but it seems like there are complications based on what version of UE I am using. I was using UE 5.1, but I think I should downgrade to 4.26 or 4.25 based on the documentation that is available online, especially the one by Cormack. It is unfortunate how little information is out there on this.
@kyroba515
@kyroba515 Жыл бұрын
@@ghislaingirardot I think the biggest problem for me is that I know how to get the particle position for the particle I am currently solving, but I am not able to get all other particle positions within that step. Will I need to create a vector that stores all particle positions from the previous tick and then work off of that?
@ue5beginner248
@ue5beginner248 2 жыл бұрын
Merci pour cette vidéo 👍ca serait top cette vidéo en Français. Faut penser à nous 😟
@ghislaingirardot
@ghislaingirardot 2 жыл бұрын
Np! Héhé oui je sais bien mais je dois faire des choix. C'est vraiment trop long pour moi de faire et en anglais et en français. Je dois ré-écrire tout le script, et ducoup ça change le timings des phrases et des paragraphes et ducoup je dois re-timer la plupart des clips et souvent ré-enregistrer les prises d'écran et bref, au final refaire une vidéo quoi et c'est vraiment trop long. On dirait pas comme ça mais c'est plusieurs jours de taff une vidéo comme ça :(
@ue5beginner248
@ue5beginner248 2 жыл бұрын
@@ghislaingirardot Slt oui je me doute que ca doit être long ! ( tu es le seul au monde a faire un band de poisson comme ça sur internet et j’arrive pas trop a comprendre! je suis dégoûté lol . Au cas où! Si tu fais cette formation en Français payant sur Udemy par exemple je te l’achète direct! C’est une mine d’or ce que tu as présenté là! Formidable travail merci beaucoup
@ghislaingirardot
@ghislaingirardot 2 жыл бұрын
@@ue5beginner248 Je comprends, c'est pas forcément facile l'anglais au départ :( Je verrai éventuellement si je trouve un workflow pour faire des sous-titres en français assez rapide, j'imagine que ça pourrait aider déjà.
@ue5beginner248
@ue5beginner248 2 жыл бұрын
@@ghislaingirardot Merci au pire y’a les sous titre déjà mais c pas pareil:( et si tu fais des cours sur niagara ou ton band de poisson je suis preneur bonne journée
@roundtabledetails3307
@roundtabledetails3307 8 ай бұрын
haven't seen the whole video yet, but what is the green arrow at 3:43 and how do I make them?
@ghislaingirardot
@ghislaingirardot 8 ай бұрын
What green arrow?
@roundtabledetails3307
@roundtabledetails3307 8 ай бұрын
@@ghislaingirardot the little tiny ones, 3 next to the yellow ones
@ghislaingirardot
@ghislaingirardot 8 ай бұрын
@@roundtabledetails3307 It's a Niagara feature :shrug: Lets you reset a parameter to the default value set in the emitter if I recall correctly. Could be a deprecated feature
@roundtabledetails3307
@roundtabledetails3307 8 ай бұрын
@@ghislaingirardot fair enough, can I buy project and use it?
@tristangybels8040
@tristangybels8040 7 ай бұрын
Hi Ghislain I recently found out about you. This is really amazing work! I am very fascinated by your VFX skills! Keep up the amazing work. I was wondering what happens when a particle exceeds the bounds? It is not captured by the 3d grid ? What then? How does it know how to return to the rest of the fish? Could you explain me the difference between the NeighborGrid.IndexToLinear and the NeighborGrid.NeighborGridIndexToLinear? 10:53? It's a bit weird, I assume it is a index for the particle within the cell? and the other one is just the index for the cell? I tried looking into the content exmaple but I couldn't find much documentation sadly.. :( I was also a bit confused with the query FlockSeparation Value. if particles are close to each other, and even overlapping, the ThisFalloff value will be 1. And because you wan't to push them away more forcefully when they get closer to each other, although wouldn't it not work because you are multiping that falloff value with the delta vector that has a low value? woulnd't it be better to use the normalized value and multiply it with the falloff value instead? Or did that actually give you better results?
@ghislaingirardot
@ghislaingirardot 7 ай бұрын
Hey! First, thanks! Second, oof! That's a lot of questions :p 1 - When exceeding the grid's bounds, a particle may no longer be aware of its surrounding particles, that's all. Up to you to add a 'weight' to its own intended direction to make it go back in, or prevent the particle from going outside the grid's bounds with some constraints, which I did. 2 - IndexToLinear: Converts an X/Y/Z integer grid cell index into its linear index (linear index is in the [0:NumCells-1] range) NeighborGridIndexToLinear: Given an X/Y/Z grid cell integer AND an index in the list of particles that grid cell may reference (in a [0:MaxNeighborsPerCell-1] range), returns that particle's linear index in the overall grid buffer (range can be large depending on amount of grid cells/particle per cell/other data per cell) 3 - Hmm, there are possibly quite a few possible implementations here. I chose to go with deltatime and have these constraints be soft and slowly kick in. Separation doesn't actually prevent particles from colliding, just helps. Overlap/penetration is handled with an offset applied to the position, that way a fish is repelled by nearby fishes but is not entirely incited to swim away. 'Just a matter of weights and how everything is fine tuned. This version is way too complex and is bloated with too much stuff tho, I'm working on an update, a much cleaner version of this :) Hope that helped
@tristangybels8040
@tristangybels8040 7 ай бұрын
@@ghislaingirardot Thanks for the answer! That helps, you confirmed my questions. I thought that your flocking code is a general approach but you actually made you own by thinking logically, by just trying and tweaking, cool!! After I return from my holiday I plan to purchase the content because it makes me wanna try that as well because this looks awesome to master! recently I made my own cockroaches, there are many tutorials out there but i do it completely differently using quaternions and speed instead of applying velocities before rotating, but the 'problem' is that they don't interact with each other, so I hope to implent the pushing logic you made into my system. I saw your crabs example i never thought about using state machines by creating niagara enums, c'est tres cool! I have always wondered if we could have scalabilities as enums to bypass certain code, say i want to disable light detection for my cockroaches if we are running on low scalability setting, but I don't know how that could be done, but imagine you could avoid applying the flocking push away code if you are on low. Makes the effect production quality and not only just portfolio nice. I am looking forward to see your update on the fishes!
@antreasalexandrou116
@antreasalexandrou116 Жыл бұрын
Hello, i downloaded the project and it's really amazing! However, I want to make my fish interact with the player. Is it possiple to do that? i tried to replace the meshes with my blueprint class/actor but i think it is not possible. i am new to Unreal Engine and i dont have much knowlage on that field :( I would appreciate your help.
@ghislaingirardot
@ghislaingirardot Жыл бұрын
Hello! No you won't be able to replace the meshes with a blueprint. What kind of player interaction are you hoping to achieve? If this is a simple avoidance effect (like flee away from the player) then it's already built in in the emitter using the Point Avoidance Module and you just have to send your player's actor location to a Niagara parameter collection using a Blueprint, and use that parameter in the Point Avoidance Module as the location to avoid
@antreasalexandrou116
@antreasalexandrou116 Жыл бұрын
@@ghislaingirardot thanks for the response. I am trying to make a virtual underwater tour of a port in my city, for my theses and i wanted to put many different fish that you can find in that port. The interaction i wanted to make is when the player gets close to a fish he will be able to click on the fish and get the information about the specific fish. So i made a fish actor that when you click on it it shows the information about the fish, but unfortunately i can put it in the niagara effect.
@ghislaingirardot
@ghislaingirardot Жыл бұрын
@@antreasalexandrou116 This is unfortunately a bit complex and would require : 1- the use of a mesh array, to display multiple fish meshes 2- use of the export data interface to have access to some data per particle in Blueprints to drive interaction effects
@0805slawek
@0805slawek 2 жыл бұрын
Its C++ but how the hell you know which text use?
@ghislaingirardot
@ghislaingirardot 2 жыл бұрын
I'm sorry I don't understand your question. This isn't C++.
Using Physics to Improve your Shots in Unreal Engine 5
11:35
William Faucher
Рет қаралды 293 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 8 МЛН
Modus males sekolah
00:14
fitrop
Рет қаралды 25 МЛН
My first step in Strand-based Foliage Simulation
36:40
Ghislain Girardot
Рет қаралды 8 М.
The REAL Reason Unreal Engine VFX Looks FAKE
6:58
Joshua M Kerr
Рет қаралды 440 М.
How I made this battle scene in blender
11:05
FxForge
Рет қаралды 528 М.
No, Einstein Didn’t Solve the Biggest Problem in Physics
8:04
Sabine Hossenfelder
Рет қаралды 226 М.
How I build intricate particle behaviours using Niagara in UE
18:17
Ghislain Girardot
Рет қаралды 10 М.
A deep dive into my process of creating this animated stylized ocean in UE
29:20
Fire Simulation FX in Unreal Engine Niagara | in 12 minutes
11:54
Motion Dreams
Рет қаралды 70 М.
Simulating Large Crowds In Niagara | Unreal Engine
34:07
Unreal Engine
Рет қаралды 262 М.
Unreal Engine 5 - Sword Slash VFX - Niagara Tutorial
16:27
Gabriel Aguiar Prod.
Рет қаралды 6 М.
3D AI Model Generation is Getting GOOD - UE5.4 Unreal Engine
12:25