Search Unity

(ALOT of) Curved lines with VFX Graph?

Discussion in 'Visual Effect Graph' started by Xform, Jan 17, 2022.

  1. Xform

    Xform

    Joined:
    Jan 28, 2016
    Posts:
    5
    Hi
    I want to create a similar visualization of the suns magnetic field(as seen in the video from NASA ) but with VFX Graph. Do you have any tips on how to achieve this? I'm quite new to VFX Graph but it seems like the right tool for this, but maybe Im wrong?

    Another way of doing it would be through scripting and using the line renderer maybe?
    Appreciate any help on this!

     
  2. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    For starters - do you already know how to calculate the lines? If so, what does the data look like and how does it animate?

    Encoding a bunch of positions into a buffer or texture and rendering those with VFX graph isn't so hard.
     
    Xform likes this.
  3. Xform

    Xform

    Joined:
    Jan 28, 2016
    Posts:
    5
    Thank you for the fast reply!

    I'm not sure on how to calculate the lines. I know that they spawn in the dark spots and then bend down towards a point some arbitrary distance from where it spawned.
    I've done some googling on how to achieve this effect but came up with nothing remotely like it.

    My coding skills are quite basic but I'm not afraid to learn, just need some direction on what to start testing with.

    The main issue I have wrapping my head around, is getting two points connected procedurally. Or maybe I would just need points/lines spawning in the dark areas and then some force to pull the end point toward the surface again( but not on a dark spot).
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I think you are probably diving in to something fairly complex and I'm trying to think of something less gnarly that will still lead you towards your actual goal.

    Do some general procedural generation tutorials. Spend a few weeks on that and maybe then come back to this.

    Catlike Coding is great: https://catlikecoding.com/unity/tutorials/

    > Another way of doing it would be through scripting and using the line renderer maybe?

    You're going to need scripting whatever you do. This isn't something VFX Graph can do by itself.

    It's also worth downloading every single thing Keijiro has ever done and poking at it to see what you can learn. Some of it is pretty advanced but there's a wealth of inspiration and some of it is pretty approachable: https://github.com/keijiro?tab=repositories
     
    CuprumGD likes this.