Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-defined geometries and muscle models #165

Open
wilhelmbraun opened this issue Dec 11, 2019 · 18 comments
Open

User-defined geometries and muscle models #165

wilhelmbraun opened this issue Dec 11, 2019 · 18 comments
Labels

Comments

@wilhelmbraun
Copy link

Dear all,

I wonder whether it is possible to use Sibernetic with user-generated body geometries and muscle models. I couldn't find any hints on how to do this on this github page.

Thanks a lot for your answer.

Best wishes, Wilhelm

@wilhelmbraun wilhelmbraun changed the title User-defined geometries and muscle models. User-defined geometries and muscle models Dec 11, 2019
@skhayrulin
Copy link
Member

@wilhelmbraun Hi and sorry for super long answer. Actually it's quite hard to solve this task in common way. Main reason that depends on complexity final scene geometrically. I mean that final configuration of particles should satisfy many physical conditions. But despite that there was a some try to do that in this repo it generate a sibernetic config from vrml file which you can get from any 3D editor like e.g. blender. In spite this it actually could work with only super simple configuration example1 example2 and as far as I know the work on this didn't moved forward far

@drojas034
Copy link

@skhayrulin Hello, would that repo work in generating different arrangements for external liquid particles? or how would one be able to generate a custom configuration file without the code crashing?
Thanks.

@skhayrulin
Copy link
Member

@drojas034 Hello. As far as I remember it worked fine with simple configs.

@drojas034
Copy link

@skhayrulin Yeah I can see it is successful in the examples, great job! (@lgchemer)

Would there be a need to modify it to create something like the image attached? To have a large cube of liquid particles in front of the worm to simulate a worm movement transitioning from no liquid particles into the liquid particles? I was able to move the particles around by modifying a configuration file directly (included below, only erasing initial position and corresponding velocity of liquid particles) with no success. (Could not enqueue read data from buffer error code is error code is -5)

Worm 1

worm_swim_half_resolution_2.zip

@clausagerskov
Copy link

@drojas034 It should be possible to write a script to create a scene and then copy the already defined worm into it (looking at the readme for how the scene config should be laid out). I have had success creating simple custom objects from elastic material in blender, exporting to ply files and importing into a scene and adding some water.
See this folder with an example jupyter notebook: https://www.dropbox.com/sh/px6dsukr5tnrh5u/AADrkYypNeUBz-FJXKRJ-8gBa?dl=0
Creating custom muscle models/body geometries could also be possible in theory but connecting them to the neuron sim is a different story

@clausagerskov
Copy link

though to create a box of water you would need to contain it with a boundary, which would also block the worm, not sure its possible to create a boundary just blocking water particles.
Else it should be possible to create a pool that the worm drops into, though it should be noted that sibernetic seems to have segmentation faults at certain large scene sizes/particle numbers

@clausagerskov
Copy link

@skhayrulin would a selective boundary be feasible to implement?

@skhayrulin
Copy link
Member

@clausagerskov I'm not sure that I understand correct. You mean to generate configuration from blender file with some complex boundary?

@clausagerskov
Copy link

nono, just if there are boundary particles that only block water and not the worm, but I just realized that that would not work since the worm also contains water

@clausagerskov
Copy link

i currently just create boundaries in a jupyter notebook and add in the worm that i copied from the worm config files, the most complex object i have managed to import from blender into sibernetic was a cone

@skhayrulin
Copy link
Member

boundary particles locate only on boundary plane and do not move through simulation also it blocks every other particles water, elastic. Water inside the worm does not go outside cause other mechanism so-called membranes (triple of adjacent elastic particles).

@skhayrulin
Copy link
Member

As I admitted before (don't remember when and where :)) It's quite difficult problem to create sibernetic configuration from some 3D model e.g. in blender. Main problem is place the particles on right places. I think man who solve this problem can defend PhD by math, computer science and geometry:)

@clausagerskov
Copy link

How was the original worm model created?

@skhayrulin
Copy link
Member

It was hardcoded here by @a-palyanov after I' stored it into file

@clausagerskov
Copy link

clausagerskov commented Mar 20, 2022

attached is a configuration file i created myself where i throw a cone i imported from blender along the floor into a pool of water. should be possible to isolate the worm from a different config file and put it into this one instead of the cone cone_pool

@clausagerskov
Copy link

created using this notebook: notebook
and this file exported from blender: cone3.ply
exported from the following blender file:
cone.blender

@pgleeson
Copy link
Member

pgleeson commented Jun 5, 2024

@clausagerskov The dropbox links you provided in this issue are to files which have been deleted/removed. Do you by any chance have them backed up elsewhere?

@clausagerskov
Copy link

@pgleeson sure, I just changed provider, here is a link to a folder with those files:
https://e.pcloud.link/publink/show?code=kZjlRTZutqEpmmUaIFQ1ka7mnOP1RSoBJDX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants