Obi Official Forum
Help Cloth Physics to Trawler Net - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Help Cloth Physics to Trawler Net (/thread-3898.html)



Cloth Physics to Trawler Net - jacobwoord - 31-05-2023

Hi there, im importing a trawlernet structure from a Json File. This file includes a start and end position for each element of the net.  For now i created a cylinder for each element but this does not give the expected results and is not realy an efficient way to simulate. i was thinking for a way to generate a custom mesh or curved plane based on the vertices of the elements so that i can use Obi cloth on it. but im stuck on the the approach to achieve this.

My question is: can i modify or create a particle system for the cloth system based on the vertices of my imported Json file? 

I attached some pictures of a part of the net.


RE: Cloth Physics to Trawler Net - josemendez - 01-06-2023

(31-05-2023, 02:02 PM)jacobwoord Wrote: Hi there, im importing a trawlernet structure from a Json File. This file includes a start and end position for each element of the net.  For now i created a cylinder for each element but this does not give the expected results and is not realy an efficient way to simulate. i was thinking for a way to generate a custom mesh or curved plane based on the vertices of the elements so that i can use Obi cloth on it. but im stuck on the the approach to achieve this.

My question is: can i modify or create a particle system for the cloth system based on the vertices of my imported Json file? 

I attached some pictures of a part of the net.

Hi!

By default, cloth blueprints create one particle per vertex in its input mesh. If you create a Mesh object out of your JSON file, all you've got to do is feed this mesh to a ObiClothBlueprint and call its Generate() coroutine. (see: http://obi.virtualmethodstudio.com/manual/6.3/scriptingactors.html for details on how to create a blueprint at runtime).

kind regards,