Dx11 line closing/loop

Hello again
Quick question I hope, I’m using Line DX11, there’s a way to close the loop as for the Dx9 versions?

just add the starting point of your line at the end of the point spread.
see car (spreads vector) to get the first point and cons (spreads) to add it to the spread.

1 Like

Hi @tgd, I was already trying to do the same but there’s something that doesn’t work, I guess it is a problem of bin size, which I don’t fully understand yet.
The line dx11 should trace the outline of some polygons I have, I’m feeding it the same XY coordinates and bin size that shape the polygons, but while for the polygons work correctly, Lines lack of the point that closes the loop.

I’ve used CAR feeding it the bin size I already have and then Cons to get the first point back in the spread but It doesn’t work.
I’m guessing is a problem with the bin size but I cannot figure out what is it

could it be you forgot to set the vector size on the CAR? it should be 3 for XYZ. otherwise consider uploading a little patch that shows the problem.

@tgd sure, here’s an example.
I’m using the voronoi plug in that is inside ImagePack fyi.

Example.zip (7.0 KB)

ok the car cons thing is working for a single shape but in your case there is lot more shapes. that take first and add at end approach must be per shape oviously. in other words you have to zip the original spreads with the additional point. There comes zip (value bin).

Voronoi_dx11_testing.v4p (43.9 KB)

@tgd Perfect! Yes doing it per shape was what I had in mind but I’m not yet that practical with bins operations, didn’t know about this node.
Speaking of which I don’t fully understand why you multiply the original bin size by two, the rest makes perfect sense, thank you so much.

a binsize can be applied to data structures. in your patch fo example you feed the polygon vertex count pin with a binsize. but a 2d vertex is 2 values, see? polygon understands that on the other side you will give him a pair of values per bin.
on the other hand zip (value bin) has no concept of vectors so you have to tell it about the real count of values that make up a bin. hope that makes sense.

we have excellent visual explanations on spread operations and bins, make sure to check them out:

@tgd Yes, is making more sense, thank you!
@tonfilm Thank you!

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