A Plexus like effect with glowing vertecies and connection-lines based on the wireframe of the mesh. When the vertecies move around they connect and disconnect based on the distance. Implemented with ECS, parallel running jobs and burst compile.
Had no idea how to implement this effect in Shadergraph or Effectgraph so i tried it with ecs/dots. Would love to know how to achieve this with Shadergraph or an Effectgraph!
You can set any mesh and andjust some values like how fast and far the vertecies move from their original Position or how thick the connection lines are and how streched they have to be until they get invisible.
There is still tonns of room for improvements like adding lots of options to make the the effect more variable. If you have an idea or an request please let me know.
The effect does not run on heavy Shaders and can be used in ALL RenderPipelines. The development Unity Project was build with the URP Renderpipeline. If you want to use the HDRP Renderpipeline you just have to convert the 2 Shaders that are used in the project. Im not sure if you can automaticly upgrade them to HDRD in a HDRP-Project. But you can always rebuild them. In the URP-Project just open the shaders with the shadergraph editor and you can see how the shader is built. then open the HDRP project and rebuilt the Shader in a new Shadergraph.
i built the Project with Unity 6 but i dont know in which version it will break. I tried out with 2022.3.55f1 and it worked just like described, so i just assume the 2023 will work too until some says otherwise.
how to get started with this repository. you can just download it an play around in the sampleScene, create a new project and play around or load it into a existing one.
After donwloading or cloning the repo, open it with the corresponding Unity version. The opne the "SampleScene" from "Assets/PlexusEffect/ExampleScene/".
In the Scene you have to make sure the "EntitySubScene" is activated (is ticked)

Then when you enter the Playmode the PlexusObjects should load and animate due to the parameters. Now you can change the paramters, exit the PlayMode select the Gameobject "PlexeusObjectSphere" and change the parameters, then restart the playmode to what changed.
here is an example on how to import the effect into a fresh project.
- Download this Repository.
- Create a new Project

- Open The "PackageManager" window to import the needed ECS dependencies

- In the "PackageManager" window, switch to the "UnityRegistry" section

- Install the "Entities" package, which grabs all the neccessary packages for ECS

- Install the "EntitiesGraphics" package, which is needed to render meshes with ECS

- to import the "WireframePlexusEffect" package, close the "PackageManager" and rightclick in the Project panel and click "Import Package" -> "Custom Package"

- navigate to the location where you donwloaded/cloned this repository and select the "plexusEffectPackageToImport" package from the "assets" folder, and confirm

- in the import dialog click "import", this will genreate a new folder called "PlexusEffect" where you can find all the PlexusEffect realated stuff

- now that that the plexusEffect is imported, lets make some effects. In order to use ECS Entites a "Subscene" is needed. So rightclick into the "Hierarchy" and create a new Subscene. The Subscene is like a Scene but for ECS Entites only, so we will fill it later with ECS life.

- give the Subscene a meaningfull name

- now that the Subscene is created, make sure that it is ticked and enabled, because a subscene can also be disabled

- In order to fill the Subscene with life, we have to register the Entities that we want to use later in the Subscene. To do so, navigate to PlexusEffect/prefabs/Subscene folder in your assets.

- and drag and drop all 3 "EntitySpawner"-Prefabs into the Subscene we created earlier. These will tell the Subscene how to Instantitate a new Entity instance.

Great, now the PlexusEffect stuff is setup and ready to be used to actualy render something!
in this example we create a simple PlexusEffect on a Unity-sphere
-
In our regular Scene lets create a new Gameobject and choose the default Sphere, with rightclick into the "Hierarchy" and select GameObject->3D Object->Sphere

-
Add the "PlexusGameobjectFromMesh" Component to the Sphere Gameobject. This Component will iterate over the MeshData and convert it to a kind of PlexusEffectMesh data that will be used by the Effect. this will happen when the scene starts and is quite a heavy calculation. for an example like this, it is fine, but for a more preformance critical setup you should consider using the "PlexusGameObjectPrecalculated" Component

-
now the Spehere is a "PlexusGameObject" but you will not be able to see it, because there are no values in the "PlexusGameObjectData" Field of the "PlexusGameobjectFromMesh" Component. So lets fill it with some values.
-
to better see the actual Plexus Effect, move the Sphere Closer to the Camera, because the position of the PlexusEffect will be synced with the position of the Sphere, even at runtime.

-
test out the Effect and press the play button. If you used the values from the previous section, you should get a blue Sphere with the plexusEffect.

-
the effect could look much better, with the default settings you will see aliasing and hard edges, so lets set the AntiAliasing. In this case with an URP Proejct you can set the AA in the PC_RP.asset

-
Postprocessing will also help, increasing the Bloom will also result in a better look with softer edges on the edges and vertecies.

-
Now you have a working example and can play around with the values and find out cool combinations and visuals.

Todo
the loading Of PlexusGameobjectFromMesh is quite slow because on start of the GameObject it iterates over every vertex and edge to calculate how the PlexusEffect needs to be. on objects with ten or hundreds thousands of vertices this can take multiple seconds. To adress this issue there is also the fast loading PlexusGameObjectPrecalculated which generates all the neccessary data in advance.






