Jump to content

trouble triangulating and filling in polys in a trail

Recommended Posts

I have a group of points - a cached particle system - and from each point I want to emit two particles, and then triangulate these two trails together like a ribbon. One edge of the ribbon is from ParticleSystemA, the other is ParticleSystemB.


(The two particles emitted from each point, I actually have as two separate particle systems, and I'd rather keep it that way if possible. More on this below). 


So SRC feeds ParticleSystemA and ParticleSystemB, which both have the exact same emission properties and life and everything, so they are always in sync, there is always a point in ParticleSystemA which corresponds to ParticleSystemB, in fact they even share an 'id' attribute, only difference is their behaviour and where they go. 


I've tried many things, but the closest I've got is:


- 'Add' after each particle system, add polygon by attribute 'src_id' (I copy each src particles id into src_id before the particle system, so each trail knows who it belongs to). This connects each of the particle trails into a line. Which is good.

- merge the two streams, and add a final add polygon by attribute 'id'. Going into the two particle systems, each src particle has a unique ID. Now when the two streams are merged, there are two particles for each id, which correspond to each other. I want those to be connected. This 'add' SOP does that, and connects them with an edge. But I cannot for the life of me figure out how to make that into a poly! It feels like I need one node to complete this into a surface but I can't find it!


I effectively want to create a triangle strip trail per original src particle, which goes:

src_point, a[0], b[0], a[1], b[1], a[2], b[2], a[3], b[3] etc. but I cannot figure out how to do it. 


I've attached a simplified hip file.


P.S. The reason why I don't want to mix the two different particle systems into one system is because I have created them as separate tools and they are already cached separately. I can merge them if that is the only way, but I'd like to think it is possible to merge the two streams and triangulate. 

particle to particle trail test stripped.00020.hipnc

Edited by Memo

Share this post

Link to post
Share on other sites

would you be able to have a grid sop that adds rows dynamically and has 2 columns, feed into into a point sop, feed the particles into the point sop second input, in the position fields of the point sop use $TX2 $TY2 $TZ2... or perhaps a point expression instead...

I haven't tried this...

Share this post

Link to post
Share on other sites

Hey thanks for the reply. That's an interesting idea. You're basically saying use existing geometry and just deform it. It sounds like it should work. My source is quite dynamic, and there are thousands of src points, so it's going to be building up a lot, I'm not sure how it will affect performance if I'm also dynamically creating thousands of grids and deforming them. I'll give it a shot on a small scale to see if I can even do it. 

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