- Home /
Stretchable Mesh Generation Techniques in 2D and 3D (Unity)
I wanna to generate such mesh (or smth like) that can be "Stretchable". Yellow objects in the picture are nodes and red ones are edges of my graph. I want to generate "edges mesh" can be stretchable when connected nodes of this edge change position. (distance beetween nodes changes). What techniques are there to implement such feature in Unity or etc.
I have two ideas for this but not sure about the first one: - Usually scaling a mesh is not that kind of a problem. For handling the thickness one could add a bone and weight the whole thing from center to ends 100% to 0%. the longer the mesh, the shorter the bone should be made
- A more complicated approach would be to manually calculate the change of the mesh and modify it via code.
Does it have to be a mesh? (As in, do you need to detect collisions with the red stretched portion? If not, this would be relatively simple to achieve with a particle effect from each "end" aimed at the direction of the other end, with a decreasing particle size over lifetime and a metaballs-style shader to join the particles together into a single fluid/plastic.
You could use Verlet integration, with the spring weights between vertices being less in the center, then getting stronger towards the ends of the capsule.
Your answer
Follow this Question
Related Questions
How Would I Create An (FPS RPG)? 1 Answer
Mesh's texture seems to be off by a small amount 1 Answer
'Forward-scroller' game? 0 Answers
getting udp package info inside unity (GlovePIE) 0 Answers
Mobile Graphics Settings in Menu 1 Answer