I am trying to optimise a freeform surface to get as many typical sized panels as possible for a surface:
I have created the initial triangle paneling on the surface using the lunchbox plugin for grasshopper. From there, I am trying to use Kangaroo to relax the mesh and hopefully minimise the number of unique panels along the surface:
I have used 3 goals to try and achieve this:
- I am trying to clamp the lengths of each triangle within a certain tolerance. This force is what I hope will standardise each panel.
- Keeping the vertices of each triangle panel locked onto the surface. Otherwise it will not keep the original form.
3. Lock Edge Points
- I am relaxing an extended version of the original surface, this will give me more panels to work with when relaxing the mesh. I have locked the naked edges of this extended surface outside of a bounding box brep of the original surface. This will ensure that the panels will cover the portion of the surface that I want to optimise.
The issue I am having is that I am getting a “wrinkling” affect in many of my simulations… I think this is due to the panels wanting to flip over each other in order to achieve the previous goals. Obviously this is not what I want, I have tried using the Hinge component to lock them in place but it hasn’t been working…
I have attached both my rhino and simplified grasshopper file with data internalised to this post. If anyone had any other suggestions on how to fix this? Or propose reasons why this is happening in the first place? I’ll be honest, I am still fairly new to kangaroo so this may be an easy fix for some people out there. Any help would be greatly appreciated.
Sock_Optimiser.gh (284.9 KB)
Sock_Optimiser.3dm (76.8 KB)
In my experience of form finding a good approach is always to simplify the number of variables in the simulation and increase as required. You might consider doing an initial relaxation using a course mesh, allowing it to stabilise and then subdividing the result followed by another round of relaxation. Repeat as many times as required for your desired resolution.
Regarding your simulation, it sounds as though you have a lot of different forces albeit they all sound necessary to some degree. When you have a lot of forces they tend to lock in results and since the simulation is progressive problem areas compound. My recommendation above should help avoid this by simplifying the variables but additionally I would recommend to set most of your forces (all but the essentials) to a low strength initially and increase slowly when visually you can see it is required. I am not familiar with the clamp force - doesn’t spring force when based on edge lengths do the same sounding thing? additionally - onmesh sounds like the attract to surface force component - Perhaps try these since its quite a staple approach - possibly because they may be a bit more stable (im not sure) - at the very least more people could give you advice on this approach.
Good luck and keep posting updates - im interested.
Thanks for the response! Here is an update:
I realised that my initial surface was in fact very far away from the rhino origin. Moving my object closer made the meshing process within Rhino less jagged which resulted in a smoother Mesh. However, upon running the solver, there was still significant wrinkling.
From there, I decided to run the solver on a subset of the original surface, particularly where the wrinkling was most present:
I meshed this surface using a lower panel subidivsion U and V count. The gradient that you see is based on the area of each panel:
From there I ran the solver and hooray! No wrinkling was present.
Your suggestion of subdividing the result and running another solver makes a lot of sense to me, so I used a triangular weaverbird subdivision on the relaxed result of the Kangaroo2 solver:
Here is the result after the subdivision, I have decided not to run another solver on it yet:
This test on a portion of the original surface is both good and bad. Good because I managed to remove the issue I was having with wrinkling, however this suggests that the error is originating from the surface itself, which is something I would rather not tweak compared to the grasshopper definition. I think from now I will work on the larger surface with coarser mesh properties as suggested and slowly increase variables until I reach a stable result, then subdividing further.
Will keep updating!
OptimumCOW had some good suggestions.
But I suspect your issues are steming from your initial mesh and the clamp component.
Firstly, From what I’m seeing, the mesh you’re starting with has quite varied edge sizes. You might want to consider using MeshMachine to create a more even mesh to start with.
Secondly, the clamp length might be a bit too aggressive for what you’re trying to achieve. It’s forcing every edge to be within a set distance. I think that’s what’s causing your weird flipping; short edges are suddenly forced to be much longer. You could give the equal length component a try. Maybe run one instance of Kangaroo to do a gentle pass of equal length. Then, in a second pass, take the edges that are already close to the average and put a very high force to bring those to an equal length and let the others be. Your binning strategy could be more fancy to minimize the type of panels that aren’t in the main set.
I’d be curious to hear how others deal with this problem as it’s quite common. The strategy you’re looking at will force most of the triangles to be equilateral which may or may not be an optimal choice.
UPDATE: Some improvements but still not there yet!
Thanks all for the responses. After doing more tests, I realised that the issue most likely was originating from the initial surface I was using. I decided to create a much more simplified version which did not expand and contract as much as before:
Here is with the panels visualised by area:
I was still getting wrinkling issues, and as Louis_Leblanc suggested, the ClampLength force seemed to be very aggressive and causing many of my triangles to fold over themselves or produce undesirable results:
In order to stop this, I decided to introduce some more forces into the solver: ClampAngle I calculated the average of each interior angle of each triangle and clamped them within a certain range.
I ran the solver after a lot of value tweaking and success! The solver worked without any wrinkling! This is the biggest improvement I’ve had so far. What surprised me the most is that I had ALL the forces applied, I was expecting to get even wackier results, but it seems to be a step in the right direction.
I have not used “MeshMachine” before, so I will definitely be checking that out. Or possibly consider running several solvers on my mesh as Louis_Leblanc suggested.
Will keep updating!
Hey, I am really interested in what you have done, because I try to do the same at the moment. Would it be possible to share your grasshopper file?
Unfortunately, this was a confidential project and I am not able to share the grasshopper file… sorry about that.