Unity VFX Graph - Muzzle Flash Effect Tutorial
Вставка
- Опубліковано 16 лис 2020
- Let's see how to create a quick and simple Muzzle Flash that you can use in your weapons. Made with Unity VFX Graph in 2020.1 URP
**
CHECK OUT RPG Builder: assetstore.unity.com/packages...
RPG Builder UA-cam: / @blinkstudiosyoutube
RPG Builder Discord: / discord
**
Smoke Texture: / vfx-graph-muzzle-44004985
Check out the game I'm working in btw :D store.steampowered.com/app/17...
-----------------------------
PATREON: / vfx-graph-muzzle-44001723
ASSET STORE: assetstore.unity.com/packages...
HERE: www.gabrielaguiarprod.com/pro...
----------------------------
Courses
✦VFX GRAPH - BEGINNER: www.udemy.com/course/unity-vi...
✦VFX GRAPH - INTERMEDIATE: www.udemy.com/course/unity-vf...
✦VFX FOR GAMES - BEGINNER: www.udemy.com/course/vfx-for-...
✦VFX STYLIZED EXPLOSION: www.udemy.com/course/visual-e...
VFX Assets Packages
Unique Projectiles Vol 1: assetstore.unity.com/packages...
Unique Projectiles Vol 2: assetstore.unity.com/packages...
Unique Projectiles Vol 3: assetstore.unity.com/packages...
VFX Graph - Mega Pack - Vol 1: assetstore.unity.com/packages...
VFX Graph - Mega Pack - Vol 2: assetstore.unity.com/packages...
VFX Graph - Mega Pack - Vol 3: assetstore.unity.com/packages...
VFX Graph Tutorials
VFX Graph - Magic Orb: • Unity VFX Graph - Magi...
VFX Graph - Weapon Effects: • Unity VFX Graph - Weap...
VFX Graph - Portals: • Unity VFX Graph - Port...
VFX Graph - Burning Paper: • The Burning Paper Effe...
VFX Graph - Loot Drop: • Unity VFX Graph - Loot...
VFX Graph - Lightning: • Unity VFX Graph - Ligh...
VFX Graph - Hits N Impacts: • Unity VFX Graph - Hits...
VFX Graph - Heat Distortion: • Unity VFX Graph - Heat...
VFX Graph - Character Effects: • CHARACTER EFFECTS in U...
VFX Graph - Ice Attack: • Unity VFX Graph - Ice ...
Shader Graph Tutorials
Shader Graph - Fire Flames: • Unity Shader Graph - F...
Shader Graph - Laser Beam: • Unity Shader Graph - L...
Shader Graph - Fire: • Unity Shader Graph - F...
Shader Graph - Tornado: • Unity Shader Graph - T...
Shader Graph - Blood: • Unity Shader Graph - B...
Shader Graph - Electricity: • Unity Shader Graph - E...
Shader Graph - Nuke: • Unity Shader Graph - N...
Shader Graph - Shield: • Unity Shader Graph - S...
Shader Graph - Waterfall: • Unity Shader Graph - W...
Shader Graph - Lava: • Unity Shader Graph - L...
Shader Graph - Fire Wings: • Unity Shader Graph - F...
Shader Graph - Galaxy: • Unity Shader Graph - G...
Shader Graph - Black Hole: • Unity VFX & Shader Gra...
Shader Graph - Ground Cracks: • Unity VFX - Ground Cra...
Shader Graph - Ghosts: • HOW TO CREATE A GHOST ...
Shader Graph - Interactive Snow: • Unity Shader Graph - S...
Shader Graph - Liquid Shader: • Unity Shader Graph - L...
Shader Graph - Glowing Crystals: • Unity Shader Graph - G...
Other VFX Videos
Fireball Projectile: • Unity 5 - Game Effects...
Laser Beams: • Unity 2018 - Game VFX ...
Projectile / Bullet Raycast: • Unity 2018 - Game VFX ...
Weapon Trails: • Unity 2018 - Game VFX ...
Destroy / Explode Objects: • Unity 2018 - Game VFX ...
Dragon Ball Aura: • Unity VFX - Dragon Bal...
Loot Box: • HOW TO CREATE A LOOT B...
Valorant - Phoenix Fire Wall: • Valorant Phoenix Fire ...
Shoot Projectiles in FPS: • Unity Tutorial - Shoot...
Valorant - Sage's Wall: • Recreating Sage's Wall...
Doom Eternal - BFG-9000 VFX: • DOOM ETERNAL BFG-9000 ...
Enjoy and feel free to ask any questions you may have. And don't forget to like and subscribe. Thank you!
✦ Follow on TWITTER: / gabrielaguiarfx
✦ Like on FACEBOOK: / gabrielaguiarprod
✦ Subscribe On UA-cam: ua-cam.com/users/gabrielagui...
Unity VFX Graph Muzzle Flash Effect Tutorial
VFX Graph Muzzle Effect Tutorial
Muzzle Effect in VFX Graph
Muzzle Flash in Unity
Unity Muzzle Flash
Muzzle Flash
#VFXGraph
Unity VFX
#Muzzle
#Unity
VFX
👉Go learn more about VFX Graph: www.udemy.com/course/unity-visual-effect-graph-beginner-to-intermediate/?couponCode=17.99_UNTIL_20-09
Just to help some of you : you can apply a modifier in blender called "solidify" ! If you follow the tutorial and add a "solidify" modifier, your plane (and tour cone) will be "two sided" :)
Cool tip but, be careful you will ncrease your faces count.
In VFX Graph, if you select the Output, on the inspector you can set the "Cull Mode" to OFF, this way you will have "two sided" as well.
saved my ass
Thanks
Thanks, friends. You can also CTRL+A in Blender and "apply transforms" box when export fbx to have correctly oriented mesh in Unity
@@stankeyal3390 Rotation too?
Thank you Thibault! I also shut off the fill rim in solidify and set thickness and offset to zero to remove redundant geometry. The other option (instead of solidify) would be to use a custom two-sided shader, but your approach is so much easier!
your channel has been an absolute gem for getting into unity shaders. thank you.
Happy to hear that!
I've been looking for a muzzle flash tutorial that looked good and was in URP. This seems very good. Thank you.
Once again Gabriel bringing the top tier tutorials!
Thanks for explaining us, what you did in blender, it helped me a lot, really enjoy watching more of these tutorials
Ryze :D
Now I can make some awesome particle effects for firearms.
Bro I have been following u since you were making shaders in unity and I can tell u know what you are teaching a best channel for VFX in unity to learn 🔥🔥
thanks for doing this. i like the effect and the tutorial. it covers the basics and a nicely functioning muzzle flash effect
I love this video. Your teaching style is Developing greatly !!! I love how in blender you say what you do , not to get us lost . I love how you explain in detail and just .. Take your time .... You definitely have a talent in teaching and in programming OBVIOUSLY ... Creative and very nice cool person . I really see how this channel is going to grow. Love your VIDS !
Best VFX tutorial for muzzle flash. Thank you!
If your texture appears only on one part of the object set Output Particle > Inspector > Cull from ‘default’ to ‘Off’. Hope you don't spend hours on this like me :)
Thank you so much!
Is this in Unity or Blender?
@@ViezeFredsel in unity
@@SpriteTheDude I found it tnx a lot!
Thank you so much! I was struggling with this for quite some time
Don't know why, but why didn't I found this awesome channel sooner?
Thanks for this - really well done.
It's magnificent how good this is explained, how good it looks and how appropiated it is after the first person shooter you showed us!
I used a similar effect with PS instead of VFX inspiring myself in another video of yours and the result was amazing!
Thanks again for sharing this video and the smoke texture! And thanks for the PS texture how to.
Stay safe and awesome!
thanks for the support Sergio always nice of you :)
Awesome tutorial! In case someone's smoke texture is not animating you should add a flipbook player on update.
always come to support ! keep the good work going~~
Thank you, I will
if the muzzle flash texture is only drawing to one side, you can try the optimal solution.
1) Go to Inspector screen of Output Particle Mesh.
2) Change Cull Mode to "Off"
OMFG thanks
That didn't work for me. I still only have 1 texture on the cone instead of 5
I've watched the video... must be 15 times now. everything is exactly the same and i've tried your fix too
@@thiskidcalledtom use solidify modifier
Thanks a lot you saved me !
amazing im glad i read your comment
Nice video... 😊
Thanks for toturial... 🙏
Awesome tutorial! Thanks!!!!!!!!
Great tutorial! just a quick question, I'm on Unity 2021 and it seems that the second Group Node is not working, I'm seeing only the 2 plans but not the cone... is there anything not described in the tuorial to do to make it work?
Awesome tutorial
Awesome tutorial Gabriel, thanks for sharing this :)
I had a problem with muzzle flash not responding properly with UV Scale - it made it smaller, but did not multiply it. Turns out that in texture import settings there's "Wrap Mode" that's defaulted to "Clamp" while using "Sprite" Texture Type. To fix this simply change Wrap Mode to Repeat and hit Apply :)
Glad it helped! Thanks for sharing.
Thank you so much for this, I was stuck for ages trying to figure out why my UV texture wouldn't repeat
dude, over 3 hours trying to figure out what happened, ty for sharing
Awesome! Thanks! Wish i had read this first. i tried 1 hour ^^
Thank you, 🙋♂️🌠🌠🌠🌠also if you put the muzzle flash particle system, in UnitybAnimation, would you need to add the muzzle flash as a Add Event within the keyframes?
I can't seem to get the particle system to play in animation mode with the gun.
The blender part was hard to follow, but I'm a new user so it felt pretty fast. Thanks for the vid.
Took me about an hour to figure out I needed UV Sync Selection... must have missed that somewhere...
@@jdavis6355 same here it was a ball ache
Gabriel, always great content, thank you.
One question: for 2D development you suggest to just spawn 2D sprites muzzle flashes by code or you think that particle system could still be useful? Is it "too much" for 2d?
Thanks
Yeah since you can't use VFX Graph in 2d, yet, I would use the particle system because it has more customization options then a simple sprite. I would also use it with a pooling technique (keep 4 muzzles inactive and activate them randomly) instead of instantiating every time you fire a weapon. Hope this helps, good luck.
My mesh is only visible through one side, i need help please. Also good video, do you think you could do one for proyectiles with VFX Graph?
Fantastic tutorial :)
Thank you! Cheers!
The UV's wont show in my UV editor, not even as a straight line they just wont show up at all
thanks a lot, you deserve a subscription
Glad I could help
Can you use VFX to add a light to the effect so the muzzle flash lights up the area around it?
If i add a Circle, it is just a black cirlcle and if i scale it in edit mode it doesnt go in like i want it to. What should i do?
can only see the muzzle flash 2d and from one side any suggestions would be greatly appreciated ASAP thanks.
When i put the muzzle planes in unity the vertical one is facing out of the gun but the horizontal one is facing to the right? did i do something wrong in blender?
How come your mesh was automatically double-sided? I tried doing this but my planes were transparent on one side. did I miss something?
Why when I drag my mesh into the output particle mesh do I get specified cast invalid error? I also get a little hashmark next to the node that says "Output particle mesh bounds computation have no sense of what the scale of the output mesh is. " Then something about using padding
Awesome!
For some reason mine doesn't grow out from the center like yours, for some reason it's like it's orientation is in the center of the mesh even though I made my muzzle flash mesh exactly like yours.
Thank you very much. Could you make asset for Tesla Electricity Shot ?
is amazing thanks.
awesome thanks
This tut is fire. Can you please make a tutorial about how to making weapon bobbing?
*My muzzle flash is just sprite which enables at shoot and disables leaving shoot key.*
Hey, i'm not able to get the muzzle flash in krita, could someone guide me on how to draw it there? Thank you.
How can I add the blender files to unity so I can see them in my assets as you show in 5:06
Thanks
Отлично, спасибо большое за урок.
Hi Gabriel! I wanted to ask a question:
Where's the gain in making this kind of effects with VFXgraph instead particle system?
Ease of Customization and Performance friendly. Those are the main gains. But there's still a few down sides to VFX Graph. Naimly collisions not being available, slower workflow, no vertex displacement, not production ready for mobiles and few more that are being fixed/improved by Unity developers. VFX Graph roadmap is looking promising portal.productboard.com/unity/1-unity-graphics/tabs/9-visual-effect-graph
Does anyone know how to create this muzzle flash texture in GIMP (with this glowing outline thing)?
How to play the vfx graph Through Script?
Noit gonna lie, your blender tutorial has some leaps of faith that your viewers know blender, this being my first attempt I am left confused with the UV and how to move things into the area as you didn't explain how to make things into the zone and size it.
then look up how to uv unwrap? You obviously have access to internet, so why don't you just look up how to UV unwrap?? It's not this guy's job to babysit you and teach you how to do every little thing.
Oh my god RPG Builder looks like the exact shit I'd try to download as a kid, I think one I wanted was called Realm Crafter? It was to make MMO's I think
Gabriel when I upload my model from Blender it seems that only 1 side of the models are showing. Is there any way to fix this?
Have the normals flipped. You can go back to Blender, in Edit mode duplicate the planes and Flip Normals.
I also get Bounds computation during recoding is based on position and size in update context. Changing these properties now could lead to incorrect bounds. use padding to correct this discrepancy
Hey! I have problem, in unity my muzzleplanes are really small... I've done blender as you did, but maybe export or i don't know :c Any help ?
If it's small you can use a set size in vfx graph to control how big you want it to be, or a set scale to control each axis. Hope this helps.
Having some major issues with importuning the blender object, it seems to always turn up pink (error in shaders). I believe I imported everything correctly.
(Edit)
Was able to import it correctly, but the muzzle cone is all types of messed up. When I added it to the project is made the project mess up causing me to have to reimport the planes. When I did and placed them in meshes, the x plane worked, but the y plane didn't.
my textures are pink too, dont matter what mesh im trying to use, i think it has to do with the shader but im not sure...
Best sir
What version of blender are you using
thank you very much :D
You're welcome!
At what format did you export that shapes from blender?
FBX
For whatever reason, the muzzle flash texture is only drawing to one side of the 2 muzzle planes. Was there some additional duplication that I missed in the blender step?
EDIT: Nevermind, looks like I just happened to be looking at the 2 "back" faces for the Muzzle Flash. Since of the 4 corners only 1 view is showing both flashes correctly I assume I'd need to add more mesh planes with flipped faces to handle views from other angles?
Yes, that's something I wanted to mention in the video and forgot.
Somehow in VFX Graph we can't use double sided on meshes, yet. So the trick is to go to blender enter in edit mode and duplicate geometry with shift d and press spacebar to search for Flip Normals. And that's it.
@@GabrielAguiarProd thx bro i need this answer
@@GabrielAguiarProd Thanks, I've got a similar challenge
Help me guys
When I add mesh as a cone, then that cone comes between those muzzlePlanes
Rather than beginning like in this tutorial
You can offset the cone with a Set Pivot in the Output.
Doesnt work for me, when i change the MuzzleCone UV Scale to 5 it keeps being 1 :(
Edit: I fixed it changing texture type to default (im idiot i had on "Sprite (2D and UI)")
PD: Thank you for the tutorial
Thx
WTF why did that fix it!?=
Hi, my UV planes are not double sided? How can I fix this. I can only see the planes from one side and the cone from the backside.
Duplicate the geometry and flip the normals for example.
hey, man in my game it doesn't show correct, the vertical Muzzle is just a blurry square. while the horizontal one is just fine any solutions?
nvm
I find this tutorial really hard to follow for some reason, maybe its just that I didn't really use blender often.
Hey Gabriel, can you make particles collide with a rigid body ?
if you use a particle system just enable collisions
So if anyone is having trouble getting their muzzle flash to grow outwards, in blender, make sure you change the origin of the object to be at the beginning of the object. Just look up how to change an objects origin, i spent so much time trying to solve this its ridiculous it almost feels purposely left out.
could you provide the texture in the description?
hi, which version of blender do you use in this video?
I believe it was with version 2.81a
Can i use VFX Graph for my android project? Because it give me this error "System.IO.DirectoryNotFoundException: Could not find a part of the path"
Nope, you can't. I mean you can maybe but it would have ton of performance issues.
I don't know what I'm doing wrong, but whenever I put the MuzzlePlanes as a Mesh in the Output Particle Mesh I don't see anything, the particles disappear. I don't see anything in the wireframe, not even the Default Particles flowing it just disappears both in the Scene and Game view.
Same Happened with me, then I applied Solidify modifier in blender and scale the meshes a little less then it works perfectly. Hope it helps you too.
It worked!!! Thank youu!!
hi man, great work. but the muzzle flash is visible only from left and top view. any idea on how to fix ?
Basically go back to blender, duplicate geometry and do a flip normals on the newly duplicated geometry.
@@GabrielAguiarProd Thanks, that was the part I was having trouble with
hey can someone help me? when I use the "Set Size Over Time" the muzzle flash effect starts from the middle of it and it grows to both sides and in the video it starts from one side and it only gets bigger on the other side. plz help
Not sure why, but make sure the UVs of the plane are like in the video.
I just had this issue. You didn't set the origin on your planes to be the center. 3:23
I had the orgin of my planes in the wrong spot but this still happened. To fix this, I went to blender and pressed my planes, went into edit mode, and rotated the uv mapping 180 degrees. This fixed it. Hope this helps!
‼‼‼Who have trouble with visibility of meshes, check scale of model in inspector (try tweak scale). ‼‼‼
** or when you export model, in export window, set next: Transform > Apply Scaling > FBX Units Scale **
Great tip, thanks for sharing!
Kindly one tutorial for bullet trail like uncharted...?
For me, when i put the planes as the mesh nothing is happening
Maybe:
1) Size of the planes are small or too big.
2) The planes don't have UVs. In Blender, in edit mode, select everything, press U and choose Unwrap.
3) Have the normals flipped. You can go back to Blender, in Edit mode duplicate the planes and Flip Normals.
I finally redid this and everything works, thanks for the tips! The muzzle flash I made looks totally normal in the scene view, however when I play it in game, the only plane that is showing is the horizontal one. I don't see the cone, or the vertical plane
I am using gimp and when I do the stroke path with a paintbrush I don't get the same effect you get. Please help.
Try to use a different paintbrush, the problem must be related to it.
@@GabrielAguiarProd I am using the default paintbrush just like you and in Gimp there is something called the brush dynamics option where there are different dynamics options. Do you know which one I should use since that is what I see is making a huge difference in the execution?
I'm having this same problem. If you've found a solution I'd love to hear it
@@luismendez2768 I just got the photoshop free trial. No other solution seemed to work.
My cone texture wrap incorrectly, anyone know how I can fix this?
The UVs in Blender, make sure they are exactly like in the video. OR, you rotate your texture according to the UVs.
Hey Gabriel, do a tutorial on clouds
Maybe? :) Will see...
i think i messed up my muzzle planes somewhere... the texture only shows up on one side of the plane and the other side is completly invisible. can anyone help me?
Basically go back to blender, duplicate geometry and do a flip normals on the newly duplicated geometry.
@@GabrielAguiarProd so i just duplicate each planes and rotate them 180 degrees so it faces both directions right?
yes, rotate 180 degrees or flip normals.
instead of a 3-D muzzle flash I have two muzzle flashes going in each other like an x please help
Make sure the UVs are like in the video.
Also duplicate the 2 planes in blender and flip normals. Otherwise it only renders on one side.
I had the same problem, rotating the muzzle flash image I was using by 270 degrees in an image editor so that it appears vertical instead of horizontal fixed it.
Does not work. The Textures of my planes are rendered one sided. Any solutions?
In blender, duplicate geometry and do a flip normals on the newly duplicated geometry OR rotate the duplicated planes 180 so they face the opposite direction.
@@GabrielAguiarProd Sorry im new to blender, but in which part of your video have you done this? I think i managed to oversee something. Thanks for the quick response so far!
How do i disable playing the animation on the first frame?
Not sure what you are trying to achieve. But you can try to add a delay in the Burst of particles, in the Spawn section.
@@GabrielAguiarProd thank you for answering.
When i press the play button in the editor, animation plays in the first frame. I was trying to figure out how to not play it at the first frame. So i clicked on the VFX component and deleted initial event name. I think it worked afterwards.
Is VFX Graph linked with Shader Graph ? Interfaces of both looks similar
They can work together, yes. I got videos on my channel where we use both tools to create effects. ua-cam.com/play/PLpPd_BKEUoYhN8CiOoNLTSVh-7U5yjg3n.html
@@GabrielAguiarProd Hey, on the video you linked me, could you do a video explanation or just tell it here, how do you setup your scene exactly please ? Having this purple background with dark borders for example and how do you setup the post process exactly so particles have a nice bloom. Thanks dude
@@alexismaquaire6201 For the purple background use a unlit>color material and assign it in the lightning settings to the sky. Dark borders is a vignette, which is added to a global volume (right-click in the scene to create a global volume).
@@GabrielAguiarProd Thanks a lot Gabriel :)
I've one question, if I become a Patreon level 1(3$) can I download this or not
I think this one is in the 5$ bracket. There's a link in the description if you click it shows the price.
when i created visual effect graph there is an error [vfxgraph_MuzzleFlash_tut] [System] CameraSort.compute: Kernel at index (0) is invalid
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
pls help
That's weird. What I would do is something like this. Create project from scratch with Unity Hub and select the pipeline (URP or HDRP). Go to package manager and made sure that Shader Graph and Visual Effect Graph are installed and then turn on Experimental Operators/Blocks in the Preferences>Visual Effects.
Good luck!
bro this doesn't work because my unity won't render both sides of the mesh.
Disable Culling mode in the Output node of vfx graph OR in Blender duplicate the mesh and use a flip normals only on the duplicated mesh.
@@GabrielAguiarProd Thanks man, that was really helpful :D
My visual effect is a bean wtf??!?!?!?!?!?!?!?!??!?!?!?!??!?!?!?
You got that Portuguese accent, are you Portuguese?
Spot on! My accent doesn't lie, Portuguese from Portugal.
Bro I love your videos, but you go so fast and use so many keyboard shortcuts without explaining I was so lost when trying to do that stuff in blender with the uvs.
I don't think this works on the new Blender, I've followed this tutorial replaying parts constantly and things don't line up, the rotations are reversed, the muzzle flash only showed on the 1 plane etc. Gonna have to dislike and look for another video
If the muzzle is only seen in 1 plane then you can select the Output and in Cull Mode you can set it to Both or Off.
20 minute install time for visual effect graph....
Arghh. Trying to make this texture is an absolute nightmare in GIMP. I don't have photoshop but I want to make it myself rather than use the internet. But GIMP is a confusing, countintuitive trashfire with brushes. Nothing seems to make sense!
I would suggest trying Krita. Personally I find it easier to use and a bit more similar to photoshop.
the tutorial is incomplete need to put the call in the script when the weapon is really firing
My mesh is not visible from all sides. Why is blender such a shitty program?
Add a solidify modifier in blender
a little to fast ngl
Hi, running into a problem. I see only 2 flashes going to either side when trying to do the radial effect on the cone. What am I doing wrong?
Normal texture(1): gyazo.com/26b11479d80b24689c2df9bf53b022a4
UV Scale X (5)
gyazo.com/4e348a644bf1cf0f8d2ad3e9c33eccff