Custom vector fields for fieldtrip & dx11 particles

Hey gang,

I really want to create a vector field from the data that generated this wind map,
(x, y, speed, direction)

I tried with point forcefields, but I find it really uncontrollable… hard to map the directions and visualize this, the points apparently always suck all the particles to their center first or something, it distorts the visualization.

How would you create your own detailed vector field, if not with that tool, for a task like this?

Hmm, might be able to do it with point force field… setting its direction is weird, and too bad they spherize the thing…

I’d rather go with a custom generated texture or something, tried FileTexture > AsVectorField > AsVF3D, but never with much result… the noise node makes cool particle drivers tho, could I load my own texture in, and control my particles from this data that way?

Guess that’s would be an easy option…

About generating textures, you can do that even without that much shader knowledge. You can do temptarget renderer then, take your XY map that so you have that on screen, and draw something like circles with red color set to direction and green color set to speed then add some blur on top, and you get your texture… However afterwards you would need to custumize your wind shader to properly use that texture… If you want to go that way collect your patch with all the data to zip file, post here…

1 Like

Yes, that’s the method I’m looking for! Just never managed to achieve anything trying… I have to generate the vectorfield realtime, so Vectoray is not an option I suppose.

Are there any examples with the custom texture method? I’d love to get started with that…

Here is the project, thanks for any starting points with this thing!

https://drive.google.com/open?id=1IBelDJE6DY67DNcJ5KlHEbKuN27s42-J

(might have to wait and press both reset a few times on startup, in order to render stuff at initial setup)

link edited with a newer version, more stuff on “interface”

Hi, i so don’t have anything in the renderer on my machine. Anyways i think Velocity (DX11.Particles.Modifiers Texture2D) should be a pretty much what you need…

First you need to convert your coords to -1,1 range, then angle to vector with Cartesian node and feed your positions there… That should work technically…

1 Like

I made this recently and it might be what you need. It makes an XYZ vectorfield from an RGB texture.

1 Like

Ah, thank you both! I was so browsing fieldtrip nodes only, but actually dx.particles might be just enough for me this time, both of these seem to come very handy.

I decided to stick to fieldtrip and look into deeper how to manipulate vf3d-s, should be able to create my
volumetric noise from the wind data somehow… thank you nonetheless!

Hey Marton,
I made a help patch for AsVectorField (VF2D.Sources DX11.Texture) that tries to show how you can make a vector texture for use in FieldTrip. It’s 2D obviously, but given your data is 2D I would start with that and you can always use AsVF3D (VF2D.Operators) to add a Z dimension if you want to avoid working with volume textures.

AsVectorField (VF2D.Sources DX11.Texture) help.v4p (20.3 KB)

@everyoneishappy

hmm, in the help patch you sent, the vector field / vectorlinearrows are not getting modified by the
texture I believe, although this solution would be exactly what I need, thank you! Maybe it’s some other issue, but however I alter the texture, the vectorlines are the same:

Here is how I tried to implement this patch for a vf3d conversion, but the arrowfield is not getting modified by the texture, which makes me sad

asvectorfield_asvf3d.zip (3.3 KB)

@martontokes
hmm, both seem to work fine here. Here’s a screen shot if that helps spot where it’s going wrong. Ah, yours popped up just as I was typing this

if you reconnect the noise or skip over the vector op does it work?

Hard to see what you are seeing. Can probably try tweaking the stepsize on the VectorLines. Otherwise if you download latest FieldTrip from GitHub it should just work. It’s quite possible that changed some defaults at some point.

1 Like

Reinstalling solved the problem,
now I am very very happy as well sir, thank you very much

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.