Open kwokcb opened 6 months ago
Leaving a ping for @ashwinbhat as I believe you and Roberto worked on these ?
I had similar observations about several of the Shape nodes, wondering if they should be updated to be more consistent, predictable and complete:
Yes.
line
pattern is quite stange to me as well as it's a line that is diagonal from the 0,0 to 1.1
radius
I believe is thickness of the line., but I guess referes to the radius of the circles at the end points.but it's a lot of work to offset the line to handle the radius. Also can't get rid of the circles ?
<Line> actually makes sense to me: the point1 and point2 positions are the centers of the endpoints of the line, and radius is the half-thickness of the line, so all pixels that are within "radius" pixels of the (infinitesimally-thin) line between point1 and point2 are "on". The only addition I would suggest is like I mentioned at the TSC meeting, to have a "color3" variant of <line> as well as float, which would have a pair of color inputs to define the "in the line" and "not in the line" colors. And same for all other Shape nodes: have both float-output and a color3-output variants of all of them rather than "some output float, some output color3". Though maybe better choices for the two color inputs would be "colorfg" and "colorbg" rather than color1/color2 so it's more clear which color input drives the color of the pattern and which is the non-pattern background color.
rectangle
for a line with a width
/ height
or a single thickness
. Perhaps a different primitive to add.center
is still weird to me. If you set it to 0.5, 0.5 then just offsets the entire line so may it should be called offset
?The circles on the line ends is because we are using a signed distance field formula. If we use rectangles we will have issues connecting lines together. I guess we could have option or another line node for rectangle ends. I haven't thought about that.
Regarding circles, hexagon, or cloverleaf position. The initial position is consitent but yes, looks like the offset for cloverleaf needs to be multiplied by 2. That should be fixed. But the tiled version works ok, maybe there it's compensated somehow. if we fix one we need to probably "unfix" the other.
Issue
If you create a
cloverleave
node and try and center it it will not be placed where expected. If you use the same placement inputs forcircle
orhexagon
it does.I'm unsure if there is any upgrade issue as
channels
is used in the implementation nodegraph or just is pre-existing ?Test Data
Output on a 2d plane. BTW a center of 1,1 places it in the center for some reason ?
File used: