5
$\begingroup$

I'm trying to recreate a basketball hoop for Unity, and after trying it out on both engines, it seems like I'm having some issues with the strings forming the net.

Base mesh. I think the problem has to do with the strings doing through each other

Ball test. The strings are seperating around the first "ties", and break completely when the collision happens.

Would anyone know some way to keep this attached, without making it too stiff? Thank you very much!

(I'm still trying to learn Blender, so if you could explain it in a simple way for me to understand, just knowing what the issue is could help!)

By the way, is there an option for me to link up the .blend file for anyone willing to take a look at the property settings?

Edit: May have forgotten to specify that this is under a cloth simulation.

$\endgroup$
3
  • $\begingroup$ As far as I know, Blender's cloth simulation does not work in game engines. Unity has its own cloth physics and you should use it for the game physics. In Blender, I would use a low-poly mesh (cylinder) with a cloth simulation as a proxy. Then use the Surface Deform modifier and bind the mesh to it... well, see the answer below ;-) $\endgroup$
    – Blunder
    Commented Oct 6, 2022 at 18:43
  • $\begingroup$ It really sounds like a good idea and would make my life so much easier. I kinda zoned out for a few seconds but I should probably try that. Thank you both for your answers, if anything this is probably more of Unity related question now! $\endgroup$
    – CupOfWater
    Commented Oct 6, 2022 at 18:53
  • $\begingroup$ Similar question: Basketball net is not colliding with ball $\endgroup$ Commented Oct 11, 2023 at 18:23

2 Answers 2

7
$\begingroup$

Leonardo's solution, just a more thorough tutorial.

The topology for the cloth solver can be achieved with a 16 verts cylinder, ✲ CtrlR about 4 loopcuts, F3 poke faces, removing all vertical and horizontal edges (⬆ ShiftG selecting similar by length will help). Also add the top verts to the PIN group... It looks nicely with cloth modifier:

However, without faces it won't collide, so you need to add the faces and severly decrease material resistances:

You can now align a bezier with auto handles, by snapping to the vertices, give it some bevel, add an array modifier count 16, object offset, an empty in the world origin, rotated by $360° \over 16$. Make a second curve going the other way and finally slightly rotate the handles so that the strings don't overlap:

Select both, F3 to mesh, ✲ CtrlJ join, add a Surface deform modifier (which would also not work without faces on the solver), bind to the solver on frame 0:

Now draw the rest of the owl:

$\endgroup$
3
  • $\begingroup$ Well thank you again for this comment, followed everything and (after a few issues running the array correctly) I have a near perfect result. The only thing that's bothering me right now is the fact that the object is hollow, and therefor goes flat when collision happens. Would there be a workaround to "fill" the net's strings? Thank you again! $\endgroup$
    – CupOfWater
    Commented Oct 7, 2022 at 11:14
  • $\begingroup$ @CupOfWater the strings aren't supposed to go completely flat, they're not affected by cloth simulation directly, so the only thing that's happening is that they as they get transformed by the Surface Deform, their shape may change and become less round... You could convert a single string to a mesh, then array, then surface deform, then use something like skin modifier (or geonodes) to give it thickness, maybe that could work. $\endgroup$ Commented Oct 7, 2022 at 15:00
  • $\begingroup$ Oh yeah sorry I completely forgot what I did previously. I gave a try to the solidify modifier, but sadly I can't notice when it's filled completely, and since I have no idea what are geonodes, I'll probably use them later on, but for now I'm trying to not make it too hard on my tiny brain. I'll give a try to the skin modifier. $\endgroup$
    – CupOfWater
    Commented Oct 7, 2022 at 17:20
4
$\begingroup$

To animate this type of model it is better to do it from a simpler mesh. Add a mesh in the form of the net, and add the cloth modifier to it.

enter image description here

Then add the "Surface Deform" modifier to the net object, and select the simple cloth mesh on the target input and press "Bind" button

enter image description here

to render, disable rendering of the cloth object

enter image description here

Now you have the animated basketball net

enter image description here

$\endgroup$
2
  • $\begingroup$ Well thank you for your answer. This is actually really useful, since i'll probably do some rendering at some point to try out how well I can make it look like. The thing is I'm trying to go for a pattern, which is supposed to link each sections with some form of ties (that I wanted to replace with torus), so that I could make it Unity-ready. I'm not really sure if the surface deform would work inside it. Would your method allow me to setup a cloth component to the simpler mesh, and still get the net to move along? Thanks again for your help! $\endgroup$
    – CupOfWater
    Commented Oct 6, 2022 at 18:48
  • $\begingroup$ To export meshes with animated deformations like physics or others, you can export it in alembic format, and follow this tutorial in unity to import the animation. When exporting make sure you select only the meshes you need and activate the "Selected objects" option $\endgroup$
    – Leonardo
    Commented Oct 6, 2022 at 20:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .