huxingyi / dust3d

Dust3D is a cross-platform 3D modeling software that makes it easy to create low poly 3D models for video games, 3D printing, and more.
https://dust3d.org/
MIT License
2.98k stars 222 forks source link

there are wrongs, when calculation #32

Closed FF1985666 closed 5 years ago

FF1985666 commented 5 years ago

wrong

huxingyi commented 5 years ago

Hi, @KeepFenDou Thanks for pointing out. It's a little bit weird when the three branches come together at specified angles and radius, definitely need more work on the optimization of the generating algorithm.

FF1985666 commented 5 years ago

thanks for reply, i find that older version(beta 4) can get proper result, maybe, because you change some parameter in the new version(beta 16).

huxingyi commented 5 years ago

Yes, I just downloaded the beta 4, and played with some new models I made recently. The generated result is quite different, in some case, the older version is even better. The mesh generating algorithm was been rewritten since version 1.0.0-beta.15, it was implemented in Rust language before beta 15, now it's in C++, although the language shouldn't make the result such difference, the main reason, is that the preprocess of generating and branch face stitching are different between the old and new methods. I need to reconsider some algorithm which works better in the older version. Thanks!

FF1985666 commented 5 years ago

three points:

  1. branch face stitching should consider the node connected to me first,not the nearest to me.
  2. one node should consider keeping spherical first, not face stitching.
  3. thanks for your hard work.
huxingyi commented 5 years ago

Thanks, could you elaborate point 1 please? When you say "nearest" do you mean the mesh should not combine even intersects each other? I implemented a "Uncombined mode" in the latest but not release yet version here, please ignore the date on the page, it shows the first day of the tag created.

May-15-2019 08-03-53

FF1985666 commented 5 years ago

no, i mean that, for example,there are three nodes connect to one line, the first node should stitch to the second node first, not the third node. even the third node is nearer.

huxingyi commented 5 years ago

The nodes in the straight line should stitch first, right? Em, that's a very good idea.

FF1985666 commented 5 years ago

英文不太好,表达不清,直接用中文吧, 就是尽量保持由node和line组成的图形的原始形状, 这样的好处是能最大限度的遵循建模者的想法,否则就增加了塑形困难. pic

huxingyi commented 5 years ago

Thanks for the graph, I understand what you mean now. The new stitching algorithm can handle more edge cases but the result is worse. The smooth is come from the preprocess of adding intermediate nodes which could make the result mesh edges more even. I am going to do some experiments based on your suggestion, and I will let you know if there is any update.

FF1985666 commented 5 years ago

thanks, and thanks for your hard work.

huxingyi commented 5 years ago

Hi, @KeepFenDou I have changed the wrapping algorithm, what do you think? Please download the latest build from here: https://github.com/huxingyi/dust3d/releases/tag/unstable Thanks!

FF1985666 commented 5 years ago

thanks, now the result is correct.

right