Jump to content

Exclude identical points from different arrays


Eckxter

Recommended Posts

I'm making an effect very much like this one from Entagma: https://vimeo.com/194277211

I've adjusted it a little and I noticed that some of the curves that get created collapse onto each other.
I think it even happens at the very first frame.
You can see that by the white parts of the lines. Those are the last created points.
When two white parts meet, it means the curves collapsed and continues as 1 curve.
What the setup does is it has a bunch of points as the active searching points.
Each of these find target points in front of them and saves those in an array.
Then a random point from within the array gets chosen and used to make the polywire.
Sometimes, mainly at the very beginning, the searching points are close enough together so that they might find the same target points.
This is where I believe the issue lies.

What I would like to achieve is that I can check between the arrays on each of the points to see if they have similar target points and if so, remove those from one of the arrays.
Or that when points get targeted by one searching point, they instantly get marked so that they can't be found again before the end of the timestep/solve.
At this moment, I'm still trying to figure that one out.

Any tips for this are much appreciated.

Eckhart

ObjectMaterialize.v005_00.hip

Link to comment
Share on other sites

That might become alot of processing and hard to multithread.

I would try:

Wrangle#1

Create an empty array on the goalpoints

Wrangle#2

Let the points search for their goalpoint and append their id to the goalpoint array.

Wrangle#3

Check the goalpoints and their arrays and select the points that you want to connect to.

 

This can be multithreaded and there is only one set of arrays (no comparing).

 

  • Like 1
Link to comment
Share on other sites

I'm not sure that'll do the trick, as there is still the possibility that the searching points will find the same goal point.
Even if they're allowed to find only one.
And I've tried limiting the goal points to 1 per searching point, but then the pattern in which they connect changes too much.

At the moment, I've made a workaround by allowing the search points to select more than 1 goal points at random intervals.
That way there will be splitting happening, that compensates for the collapsing.
Which at the moment is giving me desirable results.

Tho I'm still curious to find out if there's a way to compare arrays on different points.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...