Here i am trying to visualise a VectorField (.vf ) using an arrow glyph in the VFX graph. Everything works well (see image VectorFieldVisualisation1.png).
As the vector field being very big in the environment:
I would like to know is it possible to exclude certain parts of graph OR display only the Middle part of the graph (see image VectorFieldVisualisation2.png). Your insights would be very helpful in this
I had an idea like : placing a sphere in middle (see image VectorFieldVisualisation3.png) and compare the vector distances of the vector field and the sphere and if it is less than say for eg 5 then display only these arrows. I don’t know whether this idea will work or not because i am unable to figure out how to implement this…
You can add a Kill Box or Kill Sphere block in your output and set it to be inverted.
“Killing” particles in an output (i.e. setting their Alive attribute to false) only turns off their rendering for that frame. This should be able to do what you want:
Glad you figured it out. Just in case, maybe this will help visualize things.
If you wanted to only keep the middle, you could set the Kill Box to Inverted and position it in the part you want to keep. This way you only need to use 1 kill block.
If you want to cut parts away to create a more complex shape, you can use multiple Kill boxes set to Solid.
If you use multiple Solid boxes**,** each will remove the particles in its volume.
If you use multiple Inverted boxes, you will only see particles where all of them intersect.
Vlad, sadly, isn’t working directly with the VFX Graph team anymore.
However, being able to visualize the Vector field properly can be very valuable for VFX and Tech Artists. As I don’t have access to Vlad’s source file, I took some time to build an example.
The VFXGraph that I’m sharing should allow you to visualize Vector Fields and have some parameters to tweak the visualization:
The Vector Field (Text3D) property will let you set a Vector Field that you want to Visualize:
The Volume Resolution property controls the number of velocity trails.
The Trail Length Property lets you modulate the length of the velocity trails.
The Trail Resolution is the number of particles per velocity trail (min:0 max:10).
The Trail Width Property controls the width of the trails.
The Visualizer Bound property will help you to only display a portion or a slice of your Vector Field.
Finally Velocity Gradient and Velocity Range properties modulate the color visualization of the Vector Field Magnitude.
I’m joining a small package so that you can take a look and build upon it. Note that I didn’t take the time to clean it, and it’s a little bit messy.
If I have the time, I’ll try to make a cleaner version that will use the new HLSL blocks.
I hope that you find this example useful. Good day.
Some examples of the Vector Field visualizer that drives the behavior of particles.
Most of the velocity comes from the Vector fields with the Vector Field Force Block. To add more interesting motion, the Vector Field is being rotated and some Turbulence is also added.
I’m joining the Vector Fields used in those examples as a small unity package. Bye