keep points instead of delete

Discussions about SOFTIMAGEs© Interactive Creative Environment©
clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

keep points instead of delete

Post by clankill3r » 11 Feb 2013, 16:12

How can i invert this? So instead of deleting 0,2,4 etc. i want to keep them.
Image

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: keep points instead of delete

Post by NNois » 11 Feb 2013, 16:21

hi,
use the "not" node before the delete point

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 11 Feb 2013, 17:16

thanks, in the above case it works.
I also tried it in the compound i'm working on but i got a problem there.

There it sees the array as a "Array of Integer per Point" while i want a "Array of Integer per Object".
How can i force it to be per object?

Also the case where i don't use the "not" node works, but does this mean it loops over many times since it is "Array of Integer per Point"?

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 16:43

Re: keep points instead of delete

Post by Chris_TC » 11 Feb 2013, 17:24

clankill3r wrote:Also the case where i don't use the "not" node works, but does this mean it loops over many times since it is "Array of Integer per Point"?
The Delete Point node expects its input to be per point. If you have an array of IDs per object, you can plug it and a Get Point ID into a Select in Array. The output of this will be per point.

But I may have misunderstood, you might have to clarify your problem.

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 11 Feb 2013, 20:51

I don't really well how to explain.
I expect a invert result but it doesn't.

Maybe someone can take a look
https://dl.dropbox.com/u/17630770/temp/Generate%203D%20Point%20Hexa%20Grid.xsicompound

make a empty pointcloud, create a ice tree and connect the compound.
Then make the Number in X and Number in Y both even, this works great as you can see.
Then set invert to true, nothing gets deleted.

To navigate where i dropped the "Not" node, explore the compound and go to the "Case Even Even" compound.
If you explore that one as well you should see 2 group comments, there is the delete and not node.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: keep points instead of delete

Post by xsisupport » 11 Feb 2013, 21:18

I don't know what you're trying to do, but you are feeding per-point arrays into Find in Array, and then using that to Delete Points.
But not all of the points have any data in those per-point arrays.
Replace your Delete Points with Set Values and you'll see.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 11 Feb 2013, 22:26

I try to create a node that looks a bit like the Generate 3D Point Grid node, only suited for using hexa shapes that line up correct.
To do that i first create the 3D grid with the Generate 3D Point Grid node and then delete the points i don't need.

Which points to delete depands on the Number in X and Number in Y, take a look at this example:
Image

As you can see above, if we remove/keep all numbers that are odd then where done.
Now the next one has a even amount for Number in X, as you can see the points to delete are a bit harder.
Image

This is how i did the first one where Number in X is odd and Number in Y is odd, which works good, also the inverse works.
Image

The one where Number in X and Number in Y is both even works when you don't invert, if you invert it deletes nothing.
Probably if you don't invert it's wrong as well since it's array per point.

@steve, i don't see a Set Values node, if you mean Set Data, i tried that but it doesn't show a Array Per Point for me, or the array is filled with 1 value so it's not obvious...

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: keep points instead of delete

Post by xsisupport » 11 Feb 2013, 22:55

This is from your Case Even Even.
For half the points there's no data going into the Array port on Find in Array.
Nothing goes in, nothing is found, and nothing happens.

I replaced the Delete Points with Set Data nodes so I could see all the points.
Sorry, I don't have time to really dig into it any further.
Image
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: keep points instead of delete

Post by NNois » 12 Feb 2013, 10:42

From my point of view you shoud work directly in the generate 3d point grid.
Take a look at values just after the second modulo for the x positions (before the integer to scalar), and also values after des divide integers nodes, theses, gives you just what you need ;-)
Then you can delete pair point on pair row and impair points on impair rows (or the inverse)

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: keep points instead of delete

Post by NNois » 12 Feb 2013, 10:52

voila
il you are using Z data you need to add a third switch on the same principle
You do not have the required permissions to view the files attached to this post.

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 12 Feb 2013, 11:52

How it worked looked really confusing but i will dig into it when i have time.
A answer of what goes wrong in mine is still welcome for the purpose of learning.

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: keep points instead of delete

Post by NNois » 12 Feb 2013, 12:04

generate 3d point grid use internally temporary sorted "ID's" for the 3 axes.
for example the Y has 1,2,3,4 representing each Y rows, the same as X and Z.
Here, I just use that to filter and delete points

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 12 Feb 2013, 19:11

I'm really tired atm but it looks promising, when the energy found me back i will look at it.
Handling the z shouldn't be that hard i guess.

thanks!

clankill3r
Posts: 131
Joined: 21 Oct 2012, 13:36

Re: keep points instead of delete

Post by clankill3r » 12 Feb 2013, 20:32

Looking at it now.
Just figured out that the original generate 3d point grid has wrong comments where X and Y are switched.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: keep points instead of delete

Post by xsisupport » 13 Feb 2013, 13:32

Instead of deleting points in a 3d grid, I would be tempted to simply arrange the hexagons myself.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage