Hey, I’m doing a little series of sketches with noise and contour.
My current patch has a noise texture going through some thresholds and blurs then in AsImage for the contour then everything is built into a 2D polygon.
My problem is with the accuracy of the contour when built as a polygon, the two images below are from the same frame of noise, one is rendered with Line one with Polygon with the same exact setup
You can see that the line is much more defined while polygon mesh is completely chaotic.
note with the Polygon (DX11.Geomertry 2d) node that it can only draw convex polygons correctly, but not concave ones! for an explanation of the difference see here. i’d be surprised if @microdee or @everyoneishappy wouldn’t have anything to offer here though…
if you can fall back to EX9, i can offer: Polygon (EX9.Geometry 2d Concave) which would be rather slow but should work as expected for those cases…
actually DX11 polygon can draw concave shapes, problem here is just proper binsizing and the order of the vertices in the spread ;) BUT what the polygon node can’t do is drawing shapes with holes in them, for that you have 1.5 options:
1: this: https://vvvv.org/contribution/triangle , + the order of the vertices here is not important but it’s slower
1.5: this: https://github.com/microdee/LibTessss/tree/master , it’s only proof of concept and I haven’t touched it for a while, but it’s much faster than Triangle
@microdee apparently I’m working with too many vertices for either method, plus I’m trying to work with animation and this two nodes doesn’t seem particularly keen to be animated, in short the patch keep crashing.
I’ve tried to go from Polygon Concave ex9 (which is drawn fine) to Dx11 with FromEX9Mesh node but it’s not really working
do you want to do anything with the triangles after or you just want to slice stuff? because if the latter it would be much more faster to use clip(alpha-test) in pixel shader of a plane, instead of tryring to triangulate. Even if you need to extrude it in 3D you can create a 2D Distance field out of them and raymarch them accordingly
@microdee at the moment I just want to slice stuff really!
I’m slow on shader stuff so I’ll leave it as last option.
My first go was with raymarching in FieldTrip but I had trouble with the “quality” of the shape, like borders not defined and this kind of things so I switched to the good old polygon method, but apparently I have to go back to the distance field and spend some more time on it if I want to animate this.
Thanks to all for the nice suggestions! @tekcor thanks, if it’s that easy I’ll definitely try
@everyoneishappy Thanks! I did a test with sdf extrude to get from 2d to 3d and it’s working nicely, but I still have the “jagged” border problem, but I saw it’s a common thing among raymarching stuff, so I don’t know if there’s a solution