A new skin modifier implementation

Hi you guys,
The current skin modifier suffers from some problems when dealing with branch nodes with multiple adjacent limbs, and in some cases, there are holes in the stiching region between branch nodes and its limbs. This is due the limit of the current algorithm. So I tried to reimplement the skin modifier with a new algorithm, hoping that it could bring a better result for you.

Here’s the new skin modifier implementation, which support:

  • Branch nodes with multiple adjacent nodes.

  • Ununiform scaling at connecion nodes (node with two adjacent nodes) (when you don’t use ununiform scaling, remember to equalize node’s radius, which will help create a smooth transition at connection nodes).

  • Supplementary nodes at branch nodes for the bulging effect. Just leave the supplementary node inside the branch node’s sphere and scale it along x, or y direction to change its shape. Scaling along X will make the the bulging shape higher, and along Y will make the bulging shape wider.

  • Leaf node hole. Just mark a leaf node as hole, or using a trick by Rafael Nolasco
    at

  • Leaf node flat. Just mark a leaf node as flat.

  • Cyclic skeleton.

Thanks you Campbell Barton and Rafael Nolasco for supporting me.

Here is the window 32 bit binary, and here is the x64 version. If you use other OS, you can check out the source code at the branch mod-bskin at the link and build it on your own.

Hope to see the great characters, advices, and of course, bugs from you to make the implementation better.

1 Like

@khanh_ha
Thanks for this implementation it complement the other version wen i get some free time i will do some more testing

BIG thanks for this - I use skin modifier quite often to model veins, or other body structures, and the problems of the old skin modifier were really hard sometimes, so this is an improvement allready on the first testing.

Hello.
I’m trying to build as explains this link under “Use existing repository”. I get in terminal:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights

Do I need to generate an SSH keys just for switch and download from this branch?
https://help.github.com/articles/generating-ssh-keys/

dont know why git ask you for a ssh key. for cloning, i think it only need to use git clone on staging. blend repotory with mod-bskin branh

dont know why git ask for a ssh key. i think we only need to use git clone on staging.blend repotory with mod-bskib branch

I’m really excited for this. I use the current skin modifier pretty often (I even substituted the default cube for mesh with skin modifier), so thx a lot!

Just to note this wont build on OSX 10.11 El Capitan by default. The CmakeLists.txt is missing entry for 10.11. I just added it in manually, but I guess there is a better procedure than that to resolve the problem. Also it may just pertain to ones building with Cmake.

The problem was that there was explained to read/write under “Use existing repository”, I just need read permissions. So what you have to do if you already have the official Git repository of Blender:

git pull
git remote add origin_staging git://git.blender.org/blender-staging.git
git fetch origin_staging
git checkout -b staging
git branch --set-upstream-to=origin_staging/master
git checkout -b mod-bskin

But still, I’m not sure if that’s the right way to do it.
I also do not know what is the command to return to official master from there.

@YAFU: This is a not a official repotory. You can use git clone git://git.blender.org/blender-staging.git mod-bskin to clone the source code to a folder “blender-bskin” to your current blender folder.

I have checked it. The only file I added for the new skin modifier implemetation is “mod_bskin.c”, which is already in blender/modifers/CMakelist.txt.

it seems that the command git checkout -b staging will create a new branch named staging. I think you just need a command: git checkout origin_staging mod-bskin after setting origin_staging repotory

Really good job. It’s much more stable and create a much nicer mesh than the old one. 2 small points I would like to see:

  • possibility to build with Scons (the scripts are removed in your branch).
  • a 2D version (for 2D animation or shapes with rectangular/square sections like chairs, etc… that could be obtained with a solidify on top of the flat version).
    Anyway, good job.

@khanh_ha, I think I’ve been able to compile with the instructions I had given before.
But the truth is that I have not used much either the original/old skin modifier and I don’t know much about it.
The only experience I have with the old Skin modifier is when I want to choose Solidify Modifier, and I choose wrongly “Skin Modifier” instead, and if the mesh has many vertices then “Skin Modifier” begins to use a lot of CPU/RAM freezing Blender and then I must kill the Blender process.

So now I will try to learn about Skin Modifier.

Thanks.

Any plans for a win-64 version?

@Safetyman: I have updated the x64 build version

It seems the project is unfortunately reaching an end.
https://developer.blender.org/D1465

Hi all,
I tried to change Nicholas skin modifier to make branch node topology better, without hole, without high valence vertex. But it doesn’t work. The topology is even worse as we have to stich a vertex with 6,7,8… valence on branch node convex hull with 4-subdivision number limbs, which results in a very very bad topology. I think Nicholas approach is best for 4-subdivision limb.
I will stop this project here. So sad.

Too bad, as it was promising but must be hard to work on such code.
Hopefully if the new skin modifier project can’t find a solution, the devs will still find a way to solve the current skin modifier long standing problem

Is it really that much of a deal to keep everything 4-sided? I mean if the bugs can’t be fixed keeping everything 4-sided and if it can become a far more powerful system with the inclusion 6 or 8-sided limbs, then it would be worth it, right?

If having the possibility of a triangle appearing in the skin modifier would void the very bad faces/holes being generated, i would be easily happy to have that couple of triangles appearing.
… instead of having, as currently, to tediously move/rescale vertices constantly until i can get those problems disappearing, but with the object then not being what i wanted originally.

The skin modifier is mostly used as a base for doing something else, so the user can retopo at any time, meaning that if the user want a full quad mesh, with some work he can, while a skin object that is full quads but having holes and bad faces isn’t really workable.

That of course until someone can find a better algorithm that do not involve triangles to fix the problem, but i guess that is the very difficult part.

What I’m guessing is that it wouldn’t even be possible without increasing the maximum allowed sides for each limb, especially if you want good edge-loop flow.

Sure, it’s supposed to be a base, but you might be forcing the potential into a small box by forcing everything to be 4-sided.