Unity - Plexus Effect || Part 1 (Particle/VFX & Programming Tutorial)

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 140

  • @MirzaBeig
    @MirzaBeig  3 месяца назад +1

    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.

  • @nomadcrossfire
    @nomadcrossfire 7 лет назад +13

    great tutorial. you should do this as a series and show more particle effects thru programming

  • @uumatter_0106
    @uumatter_0106 5 лет назад +2

    Thank you for this tutorial now I went from not having any idea what this is to making some cool line effects myself :D

  • @visualboyxyz9200
    @visualboyxyz9200 7 лет назад +1

    This is a code poems! Love it, especially the parenting instantiated prefab parts!
    Thanks @Mirza!

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Thanks for watching and commenting!

  • @DedRed7
    @DedRed7 7 лет назад +1

    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!

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      I've never actually touched PopcornFX, but I've seen some stuff made with it. Looks neat!

    • @DedRed7
      @DedRed7 7 лет назад +1

      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.

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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 :)

    • @DedRed7
      @DedRed7 7 лет назад

      Ya it's great for that.

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Looks great!

  • @Theformand
    @Theformand 7 лет назад +3

    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 :)

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      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.

    • @Theformand
      @Theformand 7 лет назад +2

      Yes, sorry, I just noticed watching it the 2nd time around. My request should simply have been "More zoom pls" :)

  • @mccabejohn
    @mccabejohn 7 лет назад +3

    Excellent stuff, particularly like the consideration given to performance trade-offs. Keep up the good work !!

  • @Moohyn
    @Moohyn 7 лет назад +1

    Can't wait for part 2, really amazing tutorials.

  • @IgorAherne
    @IgorAherne 7 лет назад +1

    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

  • @Dave75Mendis
    @Dave75Mendis 7 лет назад +1

    Your tutorials have been very helpful and provide great insight into particles with Unity. Thanks!

  • @benhayward6468
    @benhayward6468 6 лет назад

    Please do a second part to this tutorial! I can't wait to see it!

  • @blauges
    @blauges 7 лет назад

    super helpful, thank you! I tried the same technique two days ago but yours was much more performant! Learned a lot.

  • @thelifeoftheepie7643
    @thelifeoftheepie7643 7 лет назад

    i think this guy is a wizard. he is just to good

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      I can tell you this for certain: I am not a wizard.

  • @Urbs000
    @Urbs000 7 лет назад +1

    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.

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      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.

  • @rachelbreenable
    @rachelbreenable 6 лет назад

    Another fantastic tutorial. I'm so glad you make these!

  • @TwentysixPM
    @TwentysixPM 7 лет назад

    This is amazing, and I have been searching for how to do this for a long time : D !

  • @JamesEmirzianWaldementerGaming
    @JamesEmirzianWaldementerGaming 7 лет назад

    Visual Effect of programming, Great.

  • @SuperSertyuio
    @SuperSertyuio 6 лет назад

    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!

  • @jun1408
    @jun1408 2 года назад

    omg thx let me see a new perspective of use code for particle

  • @luisassuncao1282
    @luisassuncao1282 7 лет назад

    Great tutorials!
    Congrats ;) It would be interesting a magic circles/buffs tutorial :D
    I subscribed cuz u r amazing !

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Thanks man! But I steer clear of anything to do with magic.

  • @rafmrs
    @rafmrs 7 лет назад +1

    Absolutelly amazing. Thanks.

  • @bradleysmith9924
    @bradleysmith9924 7 лет назад +1

    These tutorials are great.

  • @QuesterDesura
    @QuesterDesura 7 лет назад +4

    stooooop, good graphics tilts me when I see my game XD

  • @koumamura
    @koumamura 7 лет назад +1

    great insight into particles. Thanks :V

  • @DangerosoDavo
    @DangerosoDavo 7 лет назад

    This is fantastic, cant wait for part 2! Any idea when you'll get around to it?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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 :(

  • @seanloughran6714
    @seanloughran6714 7 лет назад +2

    Nice trick on getting out the sqrt(). Did you quantify how much of a speed up it was?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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).

  • @m11sd
    @m11sd 7 лет назад +1

    Fantastic stuff! When can we expect a part 2? or is it already out and I can't find it? :) Cheers

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      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!

  • @rage5110
    @rage5110 7 лет назад

    Selection sort intensifies

  • @gaben421
    @gaben421 7 лет назад +3

    ternary operator at 17:00 is unnecessary. lr.useWorldSpace = (simulationSpace == ParticleSystemSimulationSpace.World); will work just as well, and slightly (very slightly) faster

  • @thedavinci1414
    @thedavinci1414 5 лет назад

    Great work man. Keep it up!!! :)

  • @kemalardaalkin1068
    @kemalardaalkin1068 5 лет назад +1

    When will the Part 2 will be available ?

  • @Bornstella
    @Bornstella 3 года назад

    Usnig the completed script, then switching to Local on the particle emitter causes the effect to stop (only show particles), hmm...

  • @wiedzmin07
    @wiedzmin07 7 лет назад

    Great tutorial!
    When will you release 2nd part? I'm really looking forward for it.

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Unfortunately I can't say for sure right now. I'm tied up with another project that has top priority.

  • @rakeshrs6198
    @rakeshrs6198 6 лет назад

    I have a little doubt in that.actually what this line does? if(lrindex==linerenderercount)

  • @laci1125
    @laci1125 6 лет назад

    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!

    • @MirzaBeig
      @MirzaBeig  6 лет назад

      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.

    • @laci1125
      @laci1125 6 лет назад

      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!

  • @aedangraves
    @aedangraves 6 лет назад

    2018 and still waiting for Pt.II XD

  • @shiftynevers
    @shiftynevers 7 лет назад

    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.

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      Here's an image: imgur.com/a/5gQFU.

    • @shiftynevers
      @shiftynevers 7 лет назад

      awesome! thx so much!

  • @mexihkano
    @mexihkano 2 года назад

    Anyway to do this with the VFX Graph?

  • @xyigolova7063
    @xyigolova7063 7 лет назад

    Hello, Mirza, can you explain -360 to 360 start rotation thingy? Isn't it basically the same circle?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Full clockwise randomization vs. full counter-clockwise to clockwise randomization.

  • @LEACKIM
    @LEACKIM 6 лет назад

    Hello, what is your syntactic color theme on Visual Studio? I love it!

    • @MirzaBeig
      @MirzaBeig  6 лет назад

      Dark. It's built-in.

    • @LEACKIM
      @LEACKIM 6 лет назад

      I was asking in relation to the color of the writing by part ratio to the background color ^^

  • @dh7222
    @dh7222 7 лет назад

    Hey great tutorial man. Is part 2 coming up?

    • @MirzaBeig
      @MirzaBeig  7 лет назад +2

      Thanks for watching! I still intend on doing part 2, but I'm not sure when I'll have the time.

  • @zMightyKnightz
    @zMightyKnightz 7 лет назад

    Is there a possibility to download your world where you test all your particle systems in? Cause I love how it looks :)

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      It's included with Ultimate VFX. Link is in the description.

  • @KeenanWoodall
    @KeenanWoodall 7 лет назад

    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.

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

    • @KeenanWoodall
      @KeenanWoodall 7 лет назад

      Thanks a bunch!

  • @vitorfigueredo18
    @vitorfigueredo18 7 лет назад

    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!

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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 :)

  • @radiomotori
    @radiomotori 5 лет назад

    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 ;)

    • @radiomotori
      @radiomotori 5 лет назад

      oh oops this is from 2017, oh well..

  • @AlphaCollectorCZ
    @AlphaCollectorCZ 7 лет назад

    holy shit this is epic!

  • @pestana01
    @pestana01 7 лет назад

    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 ?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      I can't test for that, unfortunately.

    • @pestana01
      @pestana01 7 лет назад

      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.

    • @levenzonderleven
      @levenzonderleven 2 года назад

      Managed to get this working?

  • @juliefaganello6840
    @juliefaganello6840 7 лет назад

    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 ?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

    • @juliefaganello6840
      @juliefaganello6840 7 лет назад

      Thank you so much for your quick answer ! I will look better tomorrow ! :)

  • @chah1653
    @chah1653 Год назад

    where is the second video?

  • @akhaos310
    @akhaos310 5 лет назад

    What happened to the part 2 video?

  • @victorytoad6141
    @victorytoad6141 7 лет назад

    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

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      Which version of Unity are you using?

    • @victorytoad6141
      @victorytoad6141 7 лет назад

      Going to update to the latest. I'll let you know if it's still an issue, thanks

    • @victorytoad6141
      @victorytoad6141 7 лет назад +1

      After updating the issue is gone, good call! Cheers

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

  • @SlenderEnderGuy
    @SlenderEnderGuy 6 лет назад

    When do you plan on releasing part 2 of this tutorial?

  • @TheMJGoodz
    @TheMJGoodz 7 лет назад

    I'm beginner here.
    How do you make dark scene like that?
    and thanks for the tutorial :D

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      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.

  • @arturarzumanyan8476
    @arturarzumanyan8476 7 лет назад

    Very Nice done! is this Plexus Effect available in Ultimate VFX asset?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

    • @arturarzumanyan8476
      @arturarzumanyan8476 7 лет назад

      arthur.arzumanyan@gmail.com
      I love your asset the best one on asset store, thanks allot!!!!

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

    • @arturarzumanyan8476
      @arturarzumanyan8476 7 лет назад

      i just send you an email, let me know if you need anything more thanks!!!

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Great! I just sent you a link to download v2.6.5 of UVFX.

  • @maketor100
    @maketor100 7 лет назад

    and the back music?... you need that...

  • @albertcallejoamat7837
    @albertcallejoamat7837 7 лет назад

    Hi, is it necessary to have the Ultimate VFX? or Can i create it with just from the raw ?

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      Albert Callejo You don't need Ultimate VFX to follow along with this tutorial. It's just programming.

    • @albertcallejoamat7837
      @albertcallejoamat7837 7 лет назад

      Great! Thanks!

  • @dhruvmathur5315
    @dhruvmathur5315 4 года назад

    how do you learn to do this

  • @AlterRektMLG
    @AlterRektMLG 6 лет назад

    Where's the previous video?

  • @akhaos310
    @akhaos310 6 лет назад

    Where can I find part 2 of this tutorial?

    • @MirzaBeig
      @MirzaBeig  6 лет назад

      It doesn't exist yet =/

  • @darkflamedx
    @darkflamedx 7 лет назад

    Вау!

  • @Pitiedowl123
    @Pitiedowl123 7 лет назад

    When will this effect be in the pack?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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.

  • @herrjava9369
    @herrjava9369 7 лет назад

    part 2?

  • @thelifeoftheepie7643
    @thelifeoftheepie7643 7 лет назад

    i got memorized

  • @youtuberwf9644
    @youtuberwf9644 7 лет назад

    what is lineRenderer template?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      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).

  • @MirzaBeig
    @MirzaBeig  4 месяца назад

    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

  • @MirzaBeig
    @MirzaBeig  7 лет назад

    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.

  • @gilbertfrausto
    @gilbertfrausto 7 лет назад

    What Is the Line renders?

    • @MirzaBeig
      @MirzaBeig  7 лет назад

      Renders of the line?

    • @gilbertfrausto
      @gilbertfrausto 7 лет назад

      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

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      The tutorial covers how to do that at 11:43 :)

    • @gilbertfrausto
      @gilbertfrausto 7 лет назад

      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

    • @MirzaBeig
      @MirzaBeig  7 лет назад +1

      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.

  • @dannyclear685
    @dannyclear685 7 лет назад

    where is part 2?

  • @AncientEntity
    @AncientEntity 5 лет назад

    Look like brain activity.