You can find a written Part 2 + code here: mirzabeig.substack.com/p/unity-tutorial-particle-plexus-part-2 It covers the missing colours and size inheritance.
I've been anxious to see this tutorial. My initial thought was "Is he doing that effect in PopcornFX? Oh boy, I hope it's in Unity." So happy to see that it is! I had abandoned trying to do custom stuff with Unity's particle system in the past because at the time it was pretty unwieldy. Looks like it's time to jump back in. Looking forward to part 2!
It has a steep learning curve for a particle system (for me at least), but able to create a lot of nice custom behavior. But looks like Unity is at least starting to catch up with its customability just based off the programming tutorials I've seen you post so far.
Thanks! You can see I have actually zoomed in to 133% in the bottom left when inside VS anticipating the small text. Maybe I still need to zoom in more? To 146%, perhaps.
Thanks man, these are great tutorials - I've always avoided particle systems, but recently started to explore them and they are pretty simple. Really love how you show that their potential can be revealed more than what I could have imagined :) at 11:16, the cost of accessing the list would be almost identical to accessing array; c# List is similar to c++ datastructure, which has an array under the hood & automatically predicts space and re-allocates its inner array behind the scenes. c# List is not sequence of pointers on RAM, it's a continuous block of memory, therefore, just as with arrays, it's very likely (99.9%) that the CPU will store the i'th value together with at least 100+ following variables) into cache, "just in case if you need it later". This comes very useful when iterating, since you will now only go to RAM once, and can then iterate with what's stored in cache. Also, no need for _transform = transform, Unity has internally cached it starting from version 5.0 Additionally I can argue that compiler will cache a variable if it sees that it's used frequently; Nowadays compilers are pretty smart, since they compile into Intermediate Language, which is simpler & quite fast (could be kinda compared to assembly-code) 18:46, try to avoid large deep indentations, - I've seen many people do a " nested-cake" structure, such as if(true1){ if(true2){ if(true3){ } } } It's better to do if(false1){ return } if(false2){ return } if(false3){ return } //do stuff but you have more code afterwards, which should be executed regardless of if(true1), so perhaps the first for-loop can be taken out into a separate function, for readability Compiler will most likely inline a function, so it won't be performance issue, or we could add [MethodImpl(MethodImplOptions.AggressiveInlining)] above its signature just to be sure Can't wait to program this thing, thanks a lot! :D
Hey Mirza, that is some awesome content! I can definitely learn a lot from you. I remember you being a beast at programming/VFX stuff back in university. Good to see you apply your magic to Unity! I might just have to check out that VFX pack you keep mentioning in your videos ;) Just out of curiosity, do you still work with/compose your own music tracks? I remember that was a passion of yours as well. I noticed your channel is full of VFX stuff, but was wondering if you were doing stuff related to music/SFX.
Dan! It's been a long while. Thank you! I've left my other channel where I did all that stuff from before. I'm just doing development related things here :) If you want that pack, just send me a message on Facebook and I'll just send you a code to get it for free. I've been holding on to a few for friends and giveaways (Unity lets me generate some free vouchers for my own assets). Just the other day I was re-telling your story about the loud cockatiel that found you.
It's not out yet, and I'm not sure when it will be. I'm on a tight deadline for a project so it has to take priority. Part two is going to be at least a few weeks away. Sorry!
ternary operator at 17:00 is unnecessary. lr.useWorldSpace = (simulationSpace == ParticleSystemSimulationSpace.World); will work just as well, and slightly (very slightly) faster
Hi Mirza! First of all I really like your tutorials, especially this one - amazing stuff. I understand you don't have time to record the second part of this video, but if you could provide the full source code of the plexus effect at least that would be of a huge help for me (and probably for a lot of people, too). Would you mind sharing it with us? Either way, thank you very much!
Hi Laszlo! Thanks for watching my tutorials. The link to the script finished at the end of this tutorial is included in the description (you've probably already seen that). Right now I'm not at my main dev machine, but you can just add in colouring and width by setting those properties on the line and using the value from the two start and end particles. Otherwise, I have the full Plexus effect plus some more optimizations available as part of UVFX or on its own on the Asset Store, which is also ready for mobile.
Hi Mirza, thank you for the guides. Actually I already tried something similar to what you suggest even before asking for help, but I had two problems. First, I didn't quite get what's the role of the 'Colour From Particle' variable (how to apply its value when determining line end colours) but that's not a big deal, because I want my lines to always be 100% derived from particle colours. Second, the lines themselves didn't get coloured at all even though the LineRenderer's 'Color' property gets set to the correct value at runtime. After a few days rest during the holidays, yesterday, I realized what the problem was. You say in the video (at around 11:55) that one can use the Default Material for the LineRenderer's material property - and I did so - but that doesn't seem to be working. Only when I changed it to Unity's built-in (Mobile/)Particles/Additive material did the lines get coloured as they should. Just a piece of advice for anyone struggling with the same issue. Also, in case anyone is interested in completing this particle effect, I get the particle size and colour with the calls particle1.GetCurrentSize(particleSystem) and particle1.GetCurrentColor(particleSystem). Then I set the LineRenderer's size and colour with these: lineRenderer.startWidth = particleSize1 * widthFromParticle; lineRenderer.endWidth = particleSize2 * widthFromParticle; lineRenderer.startColor = particleColor1; // TODO: Here have to do something with colourFromParticle... lineRenderer.endColor = particleColor2; Thank you again Mirza and looking forward to your great tutorials in 2018, too!
hey, thx for this awesome tutorial. I was wondering if you could post up the settings of your particle emitter (ex: in a txt file or with screen shots). i understand programming but i'm not proficient with particles yet, and i'm having trouble make mine look like yours.
I need to place a ton of geographic points (from a list/array) (10k+) on a sphere and update their positions when the point array changes. I figured placing GameObjects wasn't an option so I'm turning to a particle system. Is there anyway to create a particle system that doesn't spawn or despawn particles. I just want it to draw the points from my array.
Turn off the emitter in the editor (or script) and call the Emit() function, making sure the lifetime of the particles is set to the highest possible value. You can also pause the system, preventing them from dying regardless of their lifetimes. I've done something like this before the same way.
Hey there, I just wanted to confirm if I can find this effect on you Ultimate VFX that is on the description... You said it was on the 2.6.5 but I can only see the Ultimate VFX (v2.6). Thank you!
The title truncates the third version number, but the version you'll download will be v2.6.5 if using Unity 5.5 and higher. It includes the full version of this effect :)
NIce! great tutorial! But do you really think this moue following particle effect has to be in every video?, It's quite distracting, specially for this vid, here the mouse follower is more prominent than the particles you're talking about. Other than that, I like your videos, I learn allot, and I'm really thankful ;)
okay :( - I will rebuild this Tutorial, with the script you provided and test it on our Daydream & Pixel Device :) :) But unfortunately not until next week, since our VR setup is on a convention.
Hello, First, the result is so good but I have a question .. Which is maybe really stupid or in links about my level in english. Is it possible to realise your tuto whithout the Ultimate VFX ?
This one? Yes, absolutely. You don't need UVFX to follow along, but having all those nice materials will certainly make things look better. But you can even just use the default particle texture/material in this one as a test.
Yesssss. They added direct access to features like that somewhere from Unity 5.3 - 5.5, but I can't remember in exactly which version. Either way, 5.5 has some great new features that I talked about in my non-programming VFX tutorials.
Yes, but the latest version that has it is not on the store. If you own Ultimate VFX, just send me an email and I can send you the newest version that includes this (more complete) component.
Hey Artur, can you please send me an email including your invoice number as proof of purchase to the contact address in the included readme file for Ultimate VFX? I'm online right now, so I can hook you up almost immediately. I prefer not doing support over RUclips to keep things organized.
It's in the pack I have currently, but I haven't sent it for approval to the Asset Store. I'm hoping to do that within a few days, but I have a lot of work to go through first.
One of these days- and I'm not kidding, I hope I get back to tutorials, and maybe even get that part 2 actually finished. By now I'd show you how to do this using parallel Jobs, or maybe even VFX Graph. Here are some examples: Parallel Jobs: twitter.com/TheMirzaBeig/status/1652535183659106305 GPU Neighbour Search: twitter.com/TheMirzaBeig/status/1776992475816542690 Procedural Mesh: twitter.com/TheMirzaBeig/status/1134006686073741312
play.google.com/store/apps/details?id=com.CGIRealms.ParticlePlexus3D_Lite. Here a free wallpaper I made for Android phones using this effect. It runs at over 60fps on a Samsung Galaxy S5 without any problems. Actually, the final Plexus effect (from Ultimate VFX) is barely making an impact on the performance. It's mostly the bloom and colour grading.
thanks! So I noticed this is not in your effects pack or has a part two. I really want to use it. Anyway you can post it somewhere or add it to the library. Or can I just purchase it? Been looking for some like this for awhile. Thanks again
This is already in Ultimate VFX v2.6.5 on the Asset Store with many more advanced options and better performance than what you see here in the tutorial. If you downloaded UVFX from the store with Unity 5.5 and higher, you should have it, and the documentation coves how to use it in full.
You can find a written Part 2 + code here: mirzabeig.substack.com/p/unity-tutorial-particle-plexus-part-2
It covers the missing colours and size inheritance.
cool咕咕
great tutorial. you should do this as a series and show more particle effects thru programming
Thank you for this tutorial now I went from not having any idea what this is to making some cool line effects myself :D
This is a code poems! Love it, especially the parenting instantiated prefab parts!
Thanks @Mirza!
Thanks for watching and commenting!
I've been anxious to see this tutorial. My initial thought was "Is he doing that effect in PopcornFX? Oh boy, I hope it's in Unity." So happy to see that it is! I had abandoned trying to do custom stuff with Unity's particle system in the past because at the time it was pretty unwieldy. Looks like it's time to jump back in. Looking forward to part 2!
I've never actually touched PopcornFX, but I've seen some stuff made with it. Looks neat!
It has a steep learning curve for a particle system (for me at least), but able to create a lot of nice custom behavior. But looks like Unity is at least starting to catch up with its customability just based off the programming tutorials I've seen you post so far.
Sounds like something worth trying out for me, if only to get ideas on how to duplicate some of the behaviour in Shuriken for tutorials :)
Ya it's great for that.
Looks great!
Awesome tutorial, Mirza! When you do code tuts in this high resolution, dont forget to zoom in slightly (ctrl+mousewheel) so we can see easier :)
Thanks! You can see I have actually zoomed in to 133% in the bottom left when inside VS anticipating the small text. Maybe I still need to zoom in more? To 146%, perhaps.
Yes, sorry, I just noticed watching it the 2nd time around. My request should simply have been "More zoom pls" :)
Excellent stuff, particularly like the consideration given to performance trade-offs. Keep up the good work !!
Can't wait for part 2, really amazing tutorials.
Thanks man, these are great tutorials - I've always avoided particle systems, but recently started to explore them and they are pretty simple. Really love how you show that their potential can be revealed more than what I could have imagined :)
at 11:16, the cost of accessing the list would be almost identical to accessing array; c# List is similar to c++ datastructure, which has an array under the hood & automatically predicts space and re-allocates its inner array behind the scenes.
c# List is not sequence of pointers on RAM, it's a continuous block of memory, therefore, just as with arrays, it's very likely (99.9%) that the CPU will store the i'th value together with at least 100+ following variables) into cache, "just in case if you need it later". This comes very useful when iterating, since you will now only go to RAM once, and can then iterate with what's stored in cache.
Also, no need for _transform = transform, Unity has internally cached it starting from version 5.0
Additionally I can argue that compiler will cache a variable if it sees that it's used frequently; Nowadays compilers are pretty smart, since they compile into Intermediate Language, which is simpler & quite fast (could be kinda compared to assembly-code)
18:46, try to avoid large deep indentations, - I've seen many people do a " nested-cake" structure, such as
if(true1){
if(true2){
if(true3){
}
}
}
It's better to do
if(false1){
return
}
if(false2){
return
}
if(false3){
return
}
//do stuff
but you have more code afterwards, which should be executed regardless of if(true1), so perhaps the first for-loop can be taken out into a separate function, for readability
Compiler will most likely inline a function, so it won't be performance issue, or we could add [MethodImpl(MethodImplOptions.AggressiveInlining)] above its signature just to be sure
Can't wait to program this thing, thanks a lot! :D
Your tutorials have been very helpful and provide great insight into particles with Unity. Thanks!
Please do a second part to this tutorial! I can't wait to see it!
super helpful, thank you! I tried the same technique two days ago but yours was much more performant! Learned a lot.
i think this guy is a wizard. he is just to good
I can tell you this for certain: I am not a wizard.
Hey Mirza, that is some awesome content! I can definitely learn a lot from you. I remember you being a beast at programming/VFX stuff back in university. Good to see you apply your magic to Unity! I might just have to check out that VFX pack you keep mentioning in your videos ;)
Just out of curiosity, do you still work with/compose your own music tracks? I remember that was a passion of yours as well. I noticed your channel is full of VFX stuff, but was wondering if you were doing stuff related to music/SFX.
Dan! It's been a long while. Thank you! I've left my other channel where I did all that stuff from before. I'm just doing development related things here :)
If you want that pack, just send me a message on Facebook and I'll just send you a code to get it for free. I've been holding on to a few for friends and giveaways (Unity lets me generate some free vouchers for my own assets).
Just the other day I was re-telling your story about the loud cockatiel that found you.
Another fantastic tutorial. I'm so glad you make these!
This is amazing, and I have been searching for how to do this for a long time : D !
Visual Effect of programming, Great.
I wish you would have made the second part of this tutorial. I guess i ll have to figure it out. By the way, it looks amazing!
omg thx let me see a new perspective of use code for particle
Great tutorials!
Congrats ;) It would be interesting a magic circles/buffs tutorial :D
I subscribed cuz u r amazing !
Thanks man! But I steer clear of anything to do with magic.
Absolutelly amazing. Thanks.
These tutorials are great.
stooooop, good graphics tilts me when I see my game XD
great insight into particles. Thanks :V
This is fantastic, cant wait for part 2! Any idea when you'll get around to it?
I think I was supposed to get around to it just a week after this one's release... but I'm still going through dev. on another project :(
Nice trick on getting out the sqrt(). Did you quantify how much of a speed up it was?
Yes, I had the profiler open at one point for testing, although I edited it out (you can still see me switch out of it).
Fantastic stuff! When can we expect a part 2? or is it already out and I can't find it? :) Cheers
It's not out yet, and I'm not sure when it will be. I'm on a tight deadline for a project so it has to take priority. Part two is going to be at least a few weeks away. Sorry!
Selection sort intensifies
ternary operator at 17:00 is unnecessary. lr.useWorldSpace = (simulationSpace == ParticleSystemSimulationSpace.World); will work just as well, and slightly (very slightly) faster
Good catch. Thanks!
Great work man. Keep it up!!! :)
When will the Part 2 will be available ?
Usnig the completed script, then switching to Local on the particle emitter causes the effect to stop (only show particles), hmm...
Great tutorial!
When will you release 2nd part? I'm really looking forward for it.
Unfortunately I can't say for sure right now. I'm tied up with another project that has top priority.
I have a little doubt in that.actually what this line does? if(lrindex==linerenderercount)
Hi Mirza!
First of all I really like your tutorials, especially this one - amazing stuff.
I understand you don't have time to record the second part of this video, but if you could provide the full source code of the plexus effect at least that would be of a huge help for me (and probably for a lot of people, too). Would you mind sharing it with us?
Either way, thank you very much!
Hi Laszlo!
Thanks for watching my tutorials. The link to the script finished at the end of this tutorial is included in the description (you've probably already seen that). Right now I'm not at my main dev machine, but you can just add in colouring and width by setting those properties on the line and using the value from the two start and end particles. Otherwise, I have the full Plexus effect plus some more optimizations available as part of UVFX or on its own on the Asset Store, which is also ready for mobile.
Hi Mirza,
thank you for the guides. Actually I already tried something similar to what you suggest even before asking for help, but I had two problems.
First, I didn't quite get what's the role of the 'Colour From Particle' variable (how to apply its value when determining line end colours) but that's not a big deal, because I want my lines to always be 100% derived from particle colours.
Second, the lines themselves didn't get coloured at all even though the LineRenderer's 'Color' property gets set to the correct value at runtime.
After a few days rest during the holidays, yesterday, I realized what the problem was.
You say in the video (at around 11:55) that one can use the Default Material for the LineRenderer's material property - and I did so - but that doesn't seem to be working. Only when I changed it to Unity's built-in (Mobile/)Particles/Additive material did the lines get coloured as they should.
Just a piece of advice for anyone struggling with the same issue.
Also, in case anyone is interested in completing this particle effect, I get the particle size and colour with the calls particle1.GetCurrentSize(particleSystem) and particle1.GetCurrentColor(particleSystem).
Then I set the LineRenderer's size and colour with these:
lineRenderer.startWidth = particleSize1 * widthFromParticle;
lineRenderer.endWidth = particleSize2 * widthFromParticle;
lineRenderer.startColor = particleColor1; // TODO: Here have to do something with colourFromParticle...
lineRenderer.endColor = particleColor2;
Thank you again Mirza and looking forward to your great tutorials in 2018, too!
2018 and still waiting for Pt.II XD
hey, thx for this awesome tutorial. I was wondering if you could post up the settings of your particle emitter (ex: in a txt file or with screen shots). i understand programming but i'm not proficient with particles yet, and i'm having trouble make mine look like yours.
Here's an image: imgur.com/a/5gQFU.
awesome! thx so much!
Anyway to do this with the VFX Graph?
Hello, Mirza, can you explain -360 to 360 start rotation thingy? Isn't it basically the same circle?
Full clockwise randomization vs. full counter-clockwise to clockwise randomization.
Hello, what is your syntactic color theme on Visual Studio? I love it!
Dark. It's built-in.
I was asking in relation to the color of the writing by part ratio to the background color ^^
Hey great tutorial man. Is part 2 coming up?
Thanks for watching! I still intend on doing part 2, but I'm not sure when I'll have the time.
Is there a possibility to download your world where you test all your particle systems in? Cause I love how it looks :)
It's included with Ultimate VFX. Link is in the description.
I need to place a ton of geographic points (from a list/array) (10k+) on a sphere and update their positions when the point array changes. I figured placing GameObjects wasn't an option so I'm turning to a particle system. Is there anyway to create a particle system that doesn't spawn or despawn particles. I just want it to draw the points from my array.
Turn off the emitter in the editor (or script) and call the Emit() function, making sure the lifetime of the particles is set to the highest possible value. You can also pause the system, preventing them from dying regardless of their lifetimes. I've done something like this before the same way.
Thanks a bunch!
Hey there, I just wanted to confirm if I can find this effect on you Ultimate VFX that is on the description... You said it was on the 2.6.5 but I can only see the Ultimate VFX (v2.6).
Thank you!
The title truncates the third version number, but the version you'll download will be v2.6.5 if using Unity 5.5 and higher. It includes the full version of this effect :)
NIce! great tutorial! But do you really think this moue following particle effect has to be in every video?, It's quite distracting, specially for this vid, here the mouse follower is more prominent than the particles you're talking about. Other than that, I like your videos, I learn allot, and I'm really thankful ;)
oh oops this is from 2017, oh well..
holy shit this is epic!
wooow Thank you for sharing this amazing Tutorial and Preset =) - I would like to know how good is this Plexus effect working on Mobile VR ?
I can't test for that, unfortunately.
okay :( - I will rebuild this Tutorial, with the script you provided and test it on our Daydream & Pixel Device :) :) But unfortunately not until next week, since our VR setup is on a convention.
Managed to get this working?
Hello,
First, the result is so good but I have a question .. Which is maybe really stupid or in links about my level in english.
Is it possible to realise your tuto whithout the Ultimate VFX ?
This one? Yes, absolutely. You don't need UVFX to follow along, but having all those nice materials will certainly make things look better. But you can even just use the default particle texture/material in this one as a test.
Thank you so much for your quick answer ! I will look better tomorrow ! :)
where is the second video?
What happened to the part 2 video?
Getting an error about MainModule not being a nested type within UnityEngine.ParticleSystem. Any idea what's up with that? Thanks for the great video
Which version of Unity are you using?
Going to update to the latest. I'll let you know if it's still an issue, thanks
After updating the issue is gone, good call! Cheers
Yesssss. They added direct access to features like that somewhere from Unity 5.3 - 5.5, but I can't remember in exactly which version. Either way, 5.5 has some great new features that I talked about in my non-programming VFX tutorials.
When do you plan on releasing part 2 of this tutorial?
never!!
I'm beginner here.
How do you make dark scene like that?
and thanks for the tutorial :D
It's global fog with a dark colour set in the lighting tab. You can also set your camera to render a solid colour and set it there.
Very Nice done! is this Plexus Effect available in Ultimate VFX asset?
Yes, but the latest version that has it is not on the store. If you own Ultimate VFX, just send me an email and I can send you the newest version that includes this (more complete) component.
arthur.arzumanyan@gmail.com
I love your asset the best one on asset store, thanks allot!!!!
Hey Artur, can you please send me an email including your invoice number as proof of purchase to the contact address in the included readme file for Ultimate VFX? I'm online right now, so I can hook you up almost immediately. I prefer not doing support over RUclips to keep things organized.
i just send you an email, let me know if you need anything more thanks!!!
Great! I just sent you a link to download v2.6.5 of UVFX.
and the back music?... you need that...
Hi, is it necessary to have the Ultimate VFX? or Can i create it with just from the raw ?
Albert Callejo You don't need Ultimate VFX to follow along with this tutorial. It's just programming.
Great! Thanks!
how do you learn to do this
Where's the previous video?
Where can I find part 2 of this tutorial?
It doesn't exist yet =/
Вау!
What does that mean?
Mirza, Beautiful
Cool, thanks!
When will this effect be in the pack?
It's in the pack I have currently, but I haven't sent it for approval to the Asset Store. I'm hoping to do that within a few days, but I have a lot of work to go through first.
part 2?
i got memorized
what is lineRenderer template?
I explain and create it in the tutorial (it's exactly what the name suggests - the copy from which the lines are generated between particles).
One of these days- and I'm not kidding, I hope I get back to tutorials, and maybe even get that part 2 actually finished.
By now I'd show you how to do this using parallel Jobs, or maybe even VFX Graph. Here are some examples:
Parallel Jobs: twitter.com/TheMirzaBeig/status/1652535183659106305
GPU Neighbour Search: twitter.com/TheMirzaBeig/status/1776992475816542690
Procedural Mesh: twitter.com/TheMirzaBeig/status/1134006686073741312
play.google.com/store/apps/details?id=com.CGIRealms.ParticlePlexus3D_Lite.
Here a free wallpaper I made for Android phones using this effect. It runs at over 60fps on a Samsung Galaxy S5 without any problems.
Actually, the final Plexus effect (from Ultimate VFX) is barely making an impact on the performance. It's mostly the bloom and colour grading.
What Is the Line renders?
Renders of the line?
Mirza I wanted to try this tutorial but the last variable on the script is "line renderer template"
Where can i find or make that? Thanks for the help
The tutorial covers how to do that at 11:43 :)
thanks! So I noticed this is not in your effects pack or has a part two. I really want to use it. Anyway you can post it somewhere or add it to the library. Or can I just purchase it? Been looking for some like this for awhile. Thanks again
This is already in Ultimate VFX v2.6.5 on the Asset Store with many more advanced options and better performance than what you see here in the tutorial. If you downloaded UVFX from the store with Unity 5.5 and higher, you should have it, and the documentation coves how to use it in full.
where is part 2?
I haven't recorded it (yet).
ok,i'm waiting for it :D
Look like brain activity.