khanhha / digital_sculpting

An open source digital suclpting application that provides artists with many types of digital brush, dynamic topology and meshing tools
https://www.youtube.com/playlist?list=PLkLcpRjubtMfBnvqnge646SncXCaHWqBJ
20 stars 6 forks source link

Question about SQM source code #1

Open brupelo opened 6 years ago

brupelo commented 6 years ago

@khanhha Hi! nice to meet you, my name is Bruno and I'm an entushiastic Spanish 3d coder.

Sorry to open an issue on this repository but I wasn't sure how to contact you as I didn't see any mail... I thought maybe this repo was related to the question I wanted to ask you.

Here's the thing, recently I've seen this cool video of yours where it seems you've implemented and created a little standalone application using SQM. Would it be possible to take a look to that app source code?

Few months ago I'd asked professor J.A.Bærentzen about that algorithm and he shared some bits of the original one, I haven't tried to reproduce it by myself... But even if I tried I'm not sure I'd be able to reproduce as the source code he shared with me is missing a lot of source code, basically he just shared the SQM high level entry point.

In any case, it'd be really awesome if I could compile&play with your nice app, that way I'll be able to fully understand the whole thing and creating my own version. Reason I'm mainly interested in SQM is basically for a hobby project I've got in mind where I'd like to create procedurally a bunch of interesting geometry with the limitation of the final exe not being bigger than 64kb.

Thanks in advance! B.

khanhha commented 6 years ago

Hi Bruno Pedrosa, I am happy to know that you care about one app that I created. The exact code in the video was lost, but I did write a better one to integrate into Blender, called B-Skin. You might want to check it here https://developer.blender.org/D1465

On Wed, Aug 15, 2018 at 12:05 AM Bruno Pedrosa notifications@github.com wrote:

@khanhha https://github.com/khanhha Hi! nice to meet you, my name is Bruno and I'm an entushiastic Spanish 3d coder.

Sorry to open an issue on this repository but I wasn't sure how to contact you as I didn't see any mail... I thought maybe this repo was related to the question I wanted to ask you.

Here's the thing, recently I've seen this cool video https://www.youtube.com/watch?v=BLMhv66Zwtk&t=0s&list=PLkLcpRjubtMfBnvqnge646SncXCaHWqBJ&index=7 of yours where it seems you've implemented and created a little standalone application using SQM. Would it be possible to take a look to that app source code?

Few months ago I'd asked professor J.A.Bærentzen about that algorithm and he shared some bits of the original one, I haven't tried to reproduce it by myself... But even if I tried I'm not sure I'd be able to reproduce as the source code he shared with me is missing a lot of source code, basically he just shared the SQM high level entry point.

In any case, it'd be really awesome if I could compile&play with your nice app, that way I'll be able to fully understand the whole thing and creating my own version. Reason I'm mainly interested in SQM is basically for a hobby project I've got in mind https://en.wikipedia.org/wiki/64K_intro where I'd like to create procedurally a bunch of interesting geometry with the limitation of the final exe not being bigger than 64kb.

Thanks in advance! B.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/khanhha/VSculpt/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK7qI91AqYIX4ExfDzLVPQ8De8nHbcXks5uQ0mqgaJpZM4V9QIy .

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

brupelo commented 6 years ago

@khanhha Oh! Sad to hear your app's code was lost, I'd already seen your blender plugin before asking about your little standalone app... I'd asked about your standalaone app as these type of apps are ideal ones to learn more about these type of algorithms. Thing is, I'd like to create a qt app similar that was similar to the original one's but using a very simplified (in terms of size) of the original one.

Couple of questions though:

khanhha commented 6 years ago

You're right. My implementation wasn't integrated into Blender because the old Bmesh algorithm is more flexible than SQM. BMesh just generates 4-quad limbs while with SQM, the number of quads increases when there are more limbs at each branch, which artists don't like. There is a new paper in this field, that I also implemented, but I don't remember its exact name. There is a new paper in this field that I also implemented recently, but it still can't also solve the problem that I expect to solve.

It is "Scaffolding skeletons using spherical Voronoi diagrams": this paper helps generates only 4-quad limbs, but the quality is awful. When there are more than 3 limbs at a branch, they look very ugly. I tried to find some way to relax but it doesn't work.

Recently, there is a new paper which I don't remember its name which uses linear programming to optimize the number of quad per limb.

On Wed, Aug 15, 2018 at 10:55 AM Bruno Pedrosa notifications@github.com wrote:

@khanhha https://github.com/khanhha Oh! Sad to hear your app's code was lost, I'd already seen your blender plugin before asking about your little standalone app... I'd asked about your standalaone app as these type of apps are ideal ones to learn more about these type of algorithms. Thing is, I'd like to create a qt app similar that was similar to the original one's http://www2.imm.dtu.dk/%7Ejab/SQM.mov but using a very simplified (in terms of size) of the original one.

Couple of questions though:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/khanhha/VSculpt/issues/1#issuecomment-413136195, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK7qGXB59SX374e43aNc5oY5xuPcHnGks5uQ-IIgaJpZM4V9QIy .

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

khanhha commented 6 years ago

It seems that the author of the paper " Scaffolding skeletons using spherical Voronoi diagrams" publishes a new one regarding this problem. "https://hal.inria.fr/hal-01774909/document". Interesting.

On Wed, Aug 15, 2018 at 10:25 PM Ha Huy Khanh khanhhh89@gmail.com wrote:

You're right. My implementation wasn't integrated into Blender because the old Bmesh algorithm is more flexible than SQM. BMesh just generates 4-quad limbs while with SQM, the number of quads increases when there are more limbs at each branch, which artists don't like. There is a new paper in this field, that I also implemented, but I don't remember its exact name. There is a new paper in this field that I also implemented recently, but it still can't also solve the problem that I expect to solve.

It is "Scaffolding skeletons using spherical Voronoi diagrams": this paper helps generates only 4-quad limbs, but the quality is awful. When there are more than 3 limbs at a branch, they look very ugly. I tried to find some way to relax but it doesn't work.

Recently, there is a new paper which I don't remember its name which uses linear programming to optimize the number of quad per limb.

On Wed, Aug 15, 2018 at 10:55 AM Bruno Pedrosa notifications@github.com wrote:

@khanhha https://github.com/khanhha Oh! Sad to hear your app's code was lost, I'd already seen your blender plugin before asking about your little standalone app... I'd asked about your standalaone app as these type of apps are ideal ones to learn more about these type of algorithms. Thing is, I'd like to create a qt app similar that was similar to the original one's http://www2.imm.dtu.dk/%7Ejab/SQM.mov but using a very simplified (in terms of size) of the original one.

Couple of questions though:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/khanhha/VSculpt/issues/1#issuecomment-413136195, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK7qGXB59SX374e43aNc5oY5xuPcHnGks5uQ-IIgaJpZM4V9QIy .

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

khanhha commented 6 years ago

However, this paper just tries to solve the topology problem. There is another problem that I was struggling to solve is fitting the base mesh to the shape of sphere-cylinder surface. It's getting very hard where two cylinders are deeply overlapping. If you use ZSphere of ZBrush, you will notice that they solve the problem very well. God, I really want to know what is the algorithm behind ZSphere of ZBrush.

On Wed, Aug 15, 2018 at 10:26 PM Ha Huy Khanh khanhhh89@gmail.com wrote:

It seems that the author of the paper " Scaffolding skeletons using spherical Voronoi diagrams" publishes a new one regarding this problem. "https://hal.inria.fr/hal-01774909/document". Interesting.

On Wed, Aug 15, 2018 at 10:25 PM Ha Huy Khanh khanhhh89@gmail.com wrote:

You're right. My implementation wasn't integrated into Blender because the old Bmesh algorithm is more flexible than SQM. BMesh just generates 4-quad limbs while with SQM, the number of quads increases when there are more limbs at each branch, which artists don't like. There is a new paper in this field, that I also implemented, but I don't remember its exact name. There is a new paper in this field that I also implemented recently, but it still can't also solve the problem that I expect to solve.

It is "Scaffolding skeletons using spherical Voronoi diagrams": this paper helps generates only 4-quad limbs, but the quality is awful. When there are more than 3 limbs at a branch, they look very ugly. I tried to find some way to relax but it doesn't work.

Recently, there is a new paper which I don't remember its name which uses linear programming to optimize the number of quad per limb.

On Wed, Aug 15, 2018 at 10:55 AM Bruno Pedrosa notifications@github.com wrote:

@khanhha https://github.com/khanhha Oh! Sad to hear your app's code was lost, I'd already seen your blender plugin before asking about your little standalone app... I'd asked about your standalaone app as these type of apps are ideal ones to learn more about these type of algorithms. Thing is, I'd like to create a qt app similar that was similar to the original one's http://www2.imm.dtu.dk/%7Ejab/SQM.mov but using a very simplified (in terms of size) of the original one.

Couple of questions though:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/khanhha/VSculpt/issues/1#issuecomment-413136195, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK7qGXB59SX374e43aNc5oY5xuPcHnGks5uQ-IIgaJpZM4V9QIy .

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

--

Ha Huy Khanh Student School of Information & Communication Technology - Hanoi University of Science & Technology Mobile: 01686499853 Y!M: khanhaaaa Skype: khanhhh89

brupelo commented 6 years ago

Thanks for that link! It seems "Scaffolding skeletons using spherical Voronoi diagrams" Submitted on 24 Apr 2018 works on top of both:

[4] J. Bærentzen, M. Misztal, and K. Wełnicka. Converting skeletal structures to quad dominant meshes. Computers & Graphics, 36(5):555–561, 2012. Shape Modeling International (SMI) Conference 2012

and

[15] Z. Ji, L. Liu, and Y. Wang. Bmesh: A modeling system for base meshes of 3d articulated shapes. Computer Graphics Forum, 29(7):2169–2177, 2010.

So I guess it'll be a good idea to skip trying to implement the other older ones and start working directly with this one in order to understand what else will be need to be improved :)

God, I really want to know what is the algorithm behind ZSphere of ZBrush.

Hahah, I understand you very well, I've been also there, usually when you start working on some particular area of CG and start exploring the whole bibliography from the old papers to the most recents ones at some point you'll realize most of the state of the art coolest algorithms are implemented as commercial closed-source products and it's quite rare to find any paper giving some secret sauce for free... that sucks :P

And yeah, ZSpheres tools from ZBrush is a top-notch algorithm in the field so reverse engineering may be not very easy :( . Pixologic claims in one of the ZSphere's docs "There’s nothing like ZSpheres in other 3D programs", so... good luck about that ;)