Jump to content
roarke80

How would you create this data branching effect with particles?

Recommended Posts

Forgive a beginner's question, but I'm trying to create a branching effect with particles that looks like data visualisation. Please see attached jpg for a crude drawing of what I'm after. I'm planning to emit points upwards from a surface, then have them clump together into one stream, then separate out again into branches before finally flowing into an animated chart / graph. I've done some initial tests with pop attract and found it really hard to use as the particles kept overshooting and bouncing back and forth, not really landing on the target. Any pointers in the right direction is great appreciated, many thanks!

 

branching.jpg

Share this post


Link to post
Share on other sites

Thanks very much Farmfield! That's a really nice effect, the setup is deceptively simple and I'm still trying to understand it. Would you be so kind as to answer a few questions please? 

What is the blast node doing please? It seems like it's deleting all the points, although my understanding is that there should be the first point left, but I don't see any points left. 

What does the convertline node do please? Or why do you need the restlength? I can see this is piped into second input on the pop network but I can't find any reference to this incoming geo in the pop network?  

In the pop wrangle node, I guess @P = minpos(1, @P); is to guide the particle to the nearest point on the surface? 

What is the thinking behind @v = normalize(@v) * 0.1; To myself it reads like you are reducing the velocity by a factor of ten every frame? 

Sorry for asking so many questions, I'm just trying to understand it so I can customize it. I would ideally like all the branching to happen on a plane so I guess I need to control the flow by using the right geometry. 

Thanks so much for your help!

 

 

 

 

 

Edited by roarke80
clarification

Share this post


Link to post
Share on other sites

There is no deception used here, it's just quite simple, hehe... :D

It's just a habit, rather than scattering a single point on a surface, I usually just use one off the surface, so a sort randomly and then delete everything except point 0. Here I sort by Y and then delete everything but the lowest one. So the bottom most point is there and I feed that into the POP.

The convert line SOP converts every primitive to lines between it's connecting points. If I didn't delete the surface, the minpos function would ray the point to the surface, but here I just want the structure of the mesh for the particles to follow. And I didn't need the restlength, but I just didn't bother about unchecking it, doesn't have any influence at any point here accept eating a small amount of memory.

And yes, the minpos function moves the point to the closest surface position of the target, in this case input two where I piped in the line structure of the half sphere. :)

And finally the wrangle where I normalize velocity and multiply it by 0.1 to force a constant velocity of the particle - else its speed would be controlled by the noise function of the POP wind, with wouldn't be very fitting for particles representing some kind of information flow or alike. If you want different speeds for each particle, you could use something like multiplying the velocity with rand(@id).

Edited by Farmfield
  • Like 1

Share this post


Link to post
Share on other sites

I wouldn't do this with a simulation. I would do something like copy a line 10 times, make them in a row next to each other -- resample them all -- (pseudocode coming) if my y position is between 1 and 2, x value is total avg x position of all lines, if not, remain at your current x position, so they'll remain in their line outside of that range. resample for even distribution again, then slap on UVs -- now you can animate points along the whole thing using UV to drive them

What you need is super specific so I don't think simulating is necessary, just a bunch of sops n cheats :)  also this gives flexibility to change the lines shapes, make them rounded or rectangular, more or less, etc

  • Like 2

Share this post


Link to post
Share on other sites

Yeah, there's no need to go for POPs - and it all depends on what type of effect, how much control you want/need, etc... Here's a non simulated setup using find shortest path SOP. :)

 

  • Like 3

Share this post


Link to post
Share on other sites

Thanks so much for the explanation Farmfield, it makes so much sense when you explain it and is really helpful to a beginner like me. That circuit scene is also awesome, I'm picking it apart to try and understand it better.

Dude, thanks for the suggestion as well, it would be great to be able to customize the shape of it. By animating points along uv do you mean something like this?

http://www.tokeru.com/cgwiki/index.php?title=Houdini#Slide_points_along_edges

Thanks for all your help!

Share this post


Link to post
Share on other sites

Animating along curves with UVs are one way, and the example files on cg-wiki are amazing, but I also love the sort shift point number thingie I've used in many setups, hehe - and I know it's stupid, but I just love it. :) 

 

Share this post


Link to post
Share on other sites

Just a minor side note, instead of projecting/gluing/sliding points onto curves with uvs, I often just use an animated Carve SOP in extract mode to get a point out of the curve. Quicker for simple setups, but might end up needing some looping so can be less efficient for larger setups.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×