I'm going to do a video on regeneration over time (think COD/Halo health system) which could be used to make fires regenerate if they're not constantly doused.
Great video, thanks. I am working on a serious game/ microsimulation to to help learning basics of marine firefighting. This will be very helpful and I guess I will adopt a lot of these ideas. Thank you. With the raycast approach you can only simulate a stream not affected by gravity or indirect effects, right? I think I will simulate the stream with small rigidbody projectiles ("water drops" in a way). This way, I hope to also be able to simulate a realistic ballistic trajectory and also techniques for indirect attack like aiming at the ceiling to create "rain" on the fire. Will also try to tweak your fire model with a simulation of propagation. I think about giving burning objects a temperature, heat release rate, and heat energy which can be inherited from objects nearby. Something like that. I am excited how your project will continue and looking forward to more videos :-)
You have some great ideas for your simulation. As far as raycasts being incompatible with gravity: You can fire a ray cast straight from the hose for a certain distance then have subsequent, shorter and shorter, raycasts which "fall" (aim down). Or, for example, plot a bunch of points coming out of the hose and do sphere checks about those points (Physics.OverlapSphere) to check if there are fires nearby. I tried fire propagation and my implementation was extremely slow. I have another idea for how I'd do it and that might be a future video.
@@FeedMyKids1 Hey, thanks for the hint with the raycasts. Sounds really cool. I am still a real noob in terms of all things computer 🙂 Spent my Sunday on a simple real time fire behaviour model and it worked out quite well. Next will be the interaction between the tiles / burning objects. I am really looking forward to your next video on that! Cheers, Marie
Hey, really happy with the progress i've been able to make due to this video!! My one problem is that my extinguisher is not affecting my fire in any way, even with the scripts attached exactly as they are in the video to the main camera, and with the extinguisher being a child to the main cam too. Any idea what this could be? Thankyou.
really great tutorial ,but in my game i have a particle system water ,it is a VR game so i want to put the fire of only if the water collides over the fire ,how should i change the extinguish script???please help sir because i am a beginner thanks in advance
I'm not sure how it would be any different. I don't use VR but I imagine it's about the same in terms of using raycasts or spherecasts. If you aim the water at the fire, it should extinguish.
Hello BROTHER, I am Working on VR i have used your idea but the Fire is Dissolving very Fast Even i increase or Decrease the "amount" of that TryExtinguisher Function Can You Help Please ??
Thanks A lot @FeedmyKids1 this tutorial is great and very informative, i used it on my vr for assigment task in my university. i want to ask about the timing of the water output from a hose or an object? i want to combine with a fire extinguisher but i cant trigger it and it always spraying the water Thanks
i kinda have it worked in vr but the particles didnt extinguish it i just shove my object that have a camera and its automaticly extinguish how to work around on this?????
@@arikurniawan7698 Well, it's not the particles that extinguish the fire. It's just pointing the camera at the fire for a while that makes it go out. So, all you need is a timer on your fire extinguisher and a timeToExtinguish value. Once you're aiming at the fire (unobstructed hopefully), you add to the timer (or subtract to zero) until it's at the timeToExtinguish.
Hey! I just saw your video and downloaded the particle asset, though I couldn't find that water house prefab. Do you know where can I find it? It's no nowhere to be found in my prefabs folder
assetstore.unity.com/packages/vfx/particles/particle-pack-127325#content Looking at this and examining the Package Content and EffectExamples Folder, under Water Effects you will find WaterLeak.fbx. I think I modified that to look like a hose.
Yeah, good question because it's kind of a weird process. Access and save to a variable the emission module of the ParticleSystem - ex var em = ps.emission; You can directly create ParticleSystem.Burst structs in the EmissionModule.SetBurst /SetBursts methods or create a new Burst separately. ex. em.SetBurst (new ParticleSystem.Burst (.5f, 30)); //that sets the time at .5f and count to 30 I created a more detailed example here: github.com/KampinKarl1/How-to-use-Unity-Particle-System-Burst-in-Script/blob/main/Code/EmissionBurstAccessor.cs
@@FeedMyKids1 Thanks for the help, it worked for my project and if its not too much can you make a tutorial of how work with Visual Effects parameters(Unity VFX)?
Shit, sorry about that. This is the exact script that I have in that project: github.com/KampinKarl1/Unity-Camera-Components/blob/main/CameraComponents_FeedMyKids/Scripts/Camera/Raycaster.cs I'm pretty sure if you revise the fire fighter code in this, you won't find anything that references the Raycaster.
Hi, sorry you're having issues. I can post the scripts and later post the project with only assets that I've created; Most of what I have in the project (as far as assets) are from Unity and I can't share that.
Scratch that, issue solved... I am however wanting to attach the water hose to an object and pick up and turn on water if anyone has any ideas??? I have managed to attach but it doesn't extinguish :(
@@Duplicity3D Hi, if I remember correctly, the extinguisher has to raycast in order to check if it's hitting a fire. It's possible that your object has a collider that is essentially "blocking" or absorbing the raycast and doesn't allow for checks in front of it. Try setting the object's layer to IgnoreRaycast and see if that works.
Great and informative video! Do you have any plans to continue on with part 3 of this video that you mentioned?
I'm going to do a video on regeneration over time (think COD/Halo health system) which could be used to make fires regenerate if they're not constantly doused.
Great video, thanks. I am working on a serious game/ microsimulation to to help learning basics of marine firefighting. This will be very helpful and I guess I will adopt a lot of these ideas. Thank you.
With the raycast approach you can only simulate a stream not affected by gravity or indirect effects, right? I think I will simulate the stream with small rigidbody projectiles ("water drops" in a way). This way, I hope to also be able to simulate a realistic ballistic trajectory and also techniques for indirect attack like aiming at the ceiling to create "rain" on the fire.
Will also try to tweak your fire model with a simulation of propagation. I think about giving burning objects a temperature, heat release rate, and heat energy which can be inherited from objects nearby. Something like that.
I am excited how your project will continue and looking forward to more videos :-)
You have some great ideas for your simulation.
As far as raycasts being incompatible with gravity: You can fire a ray cast straight from the hose for a certain distance then have subsequent, shorter and shorter, raycasts which "fall" (aim down).
Or, for example, plot a bunch of points coming out of the hose and do sphere checks about those points (Physics.OverlapSphere) to check if there are fires nearby.
I tried fire propagation and my implementation was extremely slow. I have another idea for how I'd do it and that might be a future video.
@@FeedMyKids1 Hey, thanks for the hint with the raycasts. Sounds really cool. I am still a real noob in terms of all things computer 🙂
Spent my Sunday on a simple real time fire behaviour model and it worked out quite well. Next will be the interaction between the tiles / burning objects.
I am really looking forward to your next video on that!
Cheers, Marie
@@mariegrasmeier9499 That's way more than I could do when I was a noob. Keep it up!
@@FeedMyKids1 ❣
Hey, really happy with the progress i've been able to make due to this video!! My one problem is that my extinguisher is not affecting my fire in any way, even with the scripts attached exactly as they are in the video to the main camera, and with the extinguisher being a child to the main cam too. Any idea what this could be? Thankyou.
Same issue with me
I’ll make a video this week as a follow up to this one since a few people have the same problem
nice video please continue
Thanks.
I'll continue a little later.
Gonna switch to some Shooter mechanics in coming videos.
Thank you very much, works fine in VR too
Great to hear.
Can you help me? I am facing issue
@@ATHIRAlSharyaniWhat's the issue?
@@FeedMyKids1 when the smoke particles touches the fire particles nothing happen
really great tutorial ,but in my game i have a particle system water ,it is a VR game so i want to put the fire of only if the water collides over the fire ,how should i change the extinguish script???please help sir because i am a beginner thanks in advance
I'm not sure how it would be any different. I don't use VR but I imagine it's about the same in terms of using raycasts or spherecasts. If you aim the water at the fire, it should extinguish.
@@FeedMyKids1 thanks considering me I somehow solvd this problem I used the guns raycast to extinguish the fire
Hello BROTHER, I am Working on VR i have used your idea but the Fire is Dissolving very Fast Even i increase or Decrease the "amount" of that TryExtinguisher Function Can You Help Please ??
Thanks A lot @FeedmyKids1 this tutorial is great and very informative, i used it on my vr for assigment task in my university. i want to ask about the timing of the water output from a hose or an object? i want to combine with a fire extinguisher but i cant trigger it and it always spraying the water
Thanks
i kinda have it worked in vr but the particles didnt extinguish it i just shove my object that have a camera and its automaticly extinguish how to work around on this?????
@@arikurniawan7698 Well, it's not the particles that extinguish the fire. It's just pointing the camera at the fire for a while that makes it go out. So, all you need is a timer on your fire extinguisher and a timeToExtinguish value. Once you're aiming at the fire (unobstructed hopefully), you add to the timer (or subtract to zero) until it's at the timeToExtinguish.
@@FeedMyKids1 Ok thanks for the advice
Hey! I just saw your video and downloaded the particle asset, though I couldn't find that water house prefab. Do you know where can I find it? It's no nowhere to be found in my prefabs folder
assetstore.unity.com/packages/vfx/particles/particle-pack-127325#content
Looking at this and examining the Package Content and EffectExamples Folder, under Water Effects you will find WaterLeak.fbx.
I think I modified that to look like a hose.
third part???
Great video but i want know how can i access to the burst parameter
Yeah, good question because it's kind of a weird process.
Access and save to a variable the emission module of the ParticleSystem - ex
var em = ps.emission;
You can directly create ParticleSystem.Burst structs in the EmissionModule.SetBurst /SetBursts methods or create a new Burst separately.
ex.
em.SetBurst (new ParticleSystem.Burst (.5f, 30)); //that sets the time at .5f and count to 30
I created a more detailed example here: github.com/KampinKarl1/How-to-use-Unity-Particle-System-Burst-in-Script/blob/main/Code/EmissionBurstAccessor.cs
@@FeedMyKids1 Thanks for the help, it worked for my project and if its not too much can you make a tutorial of how work with Visual Effects parameters(Unity VFX)?
Oh man, sorry but I don't know anything about them to be honest.
@@FeedMyKids1 Don't problem thanks anyway
I want to know about your Raycast script,
That is attached in your main camera
Please tell me
Shit, sorry about that.
This is the exact script that I have in that project:
github.com/KampinKarl1/Unity-Camera-Components/blob/main/CameraComponents_FeedMyKids/Scripts/Camera/Raycaster.cs
I'm pretty sure if you revise the fire fighter code in this, you won't find anything that references the Raycaster.
Could you possibly make the project available for download? I’m having several issues.
Hi, sorry you're having issues. I can post the scripts and later post the project with only assets that I've created; Most of what I have in the project (as far as assets) are from Unity and I can't share that.
github.com/KampinKarl1/Unity-Extinguish-Fire/blob/main/README.md
@@FeedMyKids1 Thank you so much!
I can't seem to redirect the water leak... anyone any ideas?
Scratch that, issue solved... I am however wanting to attach the water hose to an object and pick up and turn on water if anyone has any ideas??? I have managed to attach but it doesn't extinguish :(
@@Duplicity3D Hi, if I remember correctly, the extinguisher has to raycast in order to check if it's hitting a fire. It's possible that your object has a collider that is essentially "blocking" or absorbing the raycast and doesn't allow for checks in front of it. Try setting the object's layer to IgnoreRaycast and see if that works.