I’m a few weeks into my Grasshopper adventures, although I have a fair bit of experience with Dynamo. I’m having fun with Kangaroo for form finding, but this particular issue has me completely stumped.
(I’m going to abbreviate RemeshByColor to RMBC)
Method
Model a very basic flat mesh. A rectangle with six rectangular holes.
TriReMesh it to make a dense mesh.
Colour that mesh’s vertices with a reference image.
RMBC to make the mesh denser where the image is darker.
It works. In this image, the bounds of the lookup image are orange, the source mesh is blue, the first remesh is red, and the RMBC is teal (offset for clarity).
If I move one of the source mesh vertices a little bit out of plane, nothing breaks (although the RMBC needs resetting). But as soon as I go beyond a pretty low threshold, the RMBC turns red complains: 1. Solution exception:Object reference not set to an instance of an object.
The first remesh is performing fine and can admirably cope with a very contorted source mesh, but RMBC seems really picky about its input. (I have checked all the incoming data with Panels and nothing looks wrong).
And also the RMBC outputs Invalid Mesh unless I fix vertices as well as the curves.This one’s really weird. The output mesh reappears if I set iterations to 0, but that’s useless!
these intervals, which define X and Y dimension of the rectangle you are using as Boundary, have Origin on the “private” plane on which the Rectangle is built:
Just note, you can always find the Surface Closest Point even if a Vertex is moved completely out of the Rectangle Boundary so make sure all the Vertexes always stay inside the Rectangle
Ah of course there’s a better way of getting the parameters from the image. It’s always the way when I have a pile of spaghetti performing some conceptually simple task! Thank you
However, the problem still persists. Further experimentation with a simple quad for input shows that I have more success if the first remesh is denser. There is no color information being stored in the mesh here
But only at low RMBC iteration values! that image was generated at 8, but at 9 or above we’re back to old behaviour.
It’s not the first remesh step causing the issue, and it’s not caused by using mm for large objects. I get similar trouble in a brand new file with a 15x15 mesh as input, no colour processing at all and units set to metres.
I’m going to hunt down some example files that use RMBC and see how they work. See if I can bend one into a shape that works for me…