Commit Graph

90 Commits (adadab65ea2ef7f87028d52e6c2372ac1ea7dc2c)

Author SHA1 Message Date
Jeremy Hu adadab65ea Remove temporary deforming maps 2019-08-18 10:43:48 +09:30
Jeremy Hu 1d0f2450df Add deforming map painter
- Short cut 'D' changed meaning: from drag mode to paint mode, drag mode icon removed, but still can use space bar to invoke drag mode.
- Brush painter directly paint on part deforming map, use shift key plus mouse wheel to change the brush size, also use shift key to change paint mode(Pull/Push).
2019-08-17 19:43:11 +09:30
Jeremy Hu da6861f6aa Fix build 2019-08-13 07:48:21 +09:30
Jeremy Hu 42f243746e Speed up mesh generation
Cache intermediate combination mesh for generation.
2019-08-12 22:47:11 +09:30
Jeremy Hu bc3fae63e3 Add deform map
Deform whole part according to a height map, gray(127) represent unchanged, white represent expanding, black represent shrinking.
2019-08-03 19:51:27 +09:30
Jeremy Hu fd7dbb2024 Optimize cut face endpoints sort algorithm 2019-07-22 18:24:55 +09:30
Jeremy Hu aec5acd793 Improve intermediate nodes generation
Added Intermediates nodes sometimes will make the whole part’s mesh failed to generate. This commit add a fallback option, when mesh failed to generate, the generator will try again without the intermediate nodes added.

This feature is inspired from Nico J. Dolloso’s model (https://twitter.com/nicodoll).
2019-07-20 12:12:24 +09:30
Jeremy Hu d38737e2cb Fix mesh preview flashback
Before this commit, outdated textured preview will override the updated untextured preview. From user's perspective, sometimes, the mesh preview flashback for a short time span, although it will finally been updated to the latest.
2019-07-10 21:39:46 +09:30
Jeremy Hu 31d627bca9 Support user defined cut face per each node
Before this commit, the user defined cut face can only be set for whole part. Now each node could been configured a separate cut face and rotation.
2019-07-09 08:06:07 +09:30
Jeremy Hu 58b6c7d1d9 Fix build 2019-07-07 20:40:24 +09:30
Jeremy Hu 8d315e3c64 Optimize intermediate nodes cut normal.
Before this commit, the cut normal of intermediate nodes doesn't consider the original nodes' travesal direction. This will cause self intersection in some cases.
2019-07-07 20:25:42 +09:30
Jeremy Hu eb91a8a16c Prepare for cut face offset modifier 2019-07-07 15:57:58 +09:30
Jeremy Hu ad244c4659 Save nodes cut faces 2019-07-03 08:37:46 +09:30
Jeremy Hu 713935adb5 Save cut face transforms 2019-07-03 07:19:18 +09:30
Jeremy Hu 969a25b697 Fix crash in cut face nodes ordering
The comparison function of std::sort requires only return true when first is less than second, this is the rule of "strict weak ordering".
2019-06-29 19:12:45 +09:30
Jeremy Hu 83cb6383c1 Add new base normal option: Average
When this option enabled, the mesh generator will average all the base normals of nodes with radius as a weight.
2019-06-25 08:14:04 +09:30
Jeremy Hu fac78b5e56 Fix preference color setting 2019-06-08 17:27:13 +09:30
Jeremy Hu 292d2ce507 Add none endpoint cut face (ring) 2019-06-01 23:45:57 +09:30
Jeremy Hu 7eef3f9455 Add back the smooth shading toggle menu
As @Toshiwoz suggested, there is still a need for flat shading.
2019-05-30 19:58:55 +09:30
Jeremy Hu 938b6d5d6f Add color solubility setting
If one part configured color solubility, the generated color texture seam between the neighbor parts will be gradient filled using this part's color with the specified solubility.

Demo: https://twitter.com/jeremyhu2016/status/1132159910815227904
2019-05-26 08:54:24 +09:30
Jeremy Hu bb19489ee1 Add base plane constrain settings
Mesh layout and thickness adjustment are depend on base plane calculation. In this build, the base plane calculation could be limited to front plane, side plane, and so on, compare to without any limitation in previous implementation.
2019-05-20 23:08:01 +09:30
Jeremy Hu b09df89da2 Fix build 2019-05-19 13:08:20 +09:30
Jeremy Hu 8f5368a43f Add user defined cut face
Extruding shape is totally customizable now, it's not limit to predefined shapes.
2019-05-19 12:51:38 +09:30
Jeremy Hu 5baf139cb6 Add "Uncombined" mode
Uncombined mode could be used to avoid generation of trivial triangles. However, the result will be none-watertight if there is an uncombined mode component.
2019-05-11 21:31:13 +09:30
Jeremy Hu fcfe51a28a Support customizable extruding face: Quad, Pentagon, Hexagon, and Triangle 2019-05-05 22:19:26 +09:30
Jeremy Hu a1249f5fcb Fix material preview. 2019-03-16 15:32:45 +09:30
Jeremy Hu e2f829d3ce Make chamfer tool as a separate tool
Remove cut template customiziation.
2019-03-10 07:40:39 +09:30
Jeremy Hu 02bb32391e Add cut face customizing.
This commit introduce a new tool, allow user to customize the face template for automatical extruding.
2019-02-24 23:12:23 +09:30
Jeremy Hu 160d2aae5e Show part preview in red color when there is self intersection. 2019-02-23 13:36:24 +09:30
Jeremy Hu d866e0147b Add cut rotation tool
Cut rotation tool allow user to adjust the generated face's rotation.
Convex hull wrapping tool removed in this commit.
2019-02-22 08:18:15 +09:30
Jeremy Hu 8053d3c3fb Improve the quality of mesh parts bridging
First, split parts by combine mode, then sub group by color name, those parts which following in the same sub group will be bridged together.
2019-02-21 08:27:15 +09:30
Jeremy Hu 3e1fde4260 Fix build 2019-02-19 20:51:12 +09:30
Jeremy Hu 4bdbdd496a Introduce new mesh generator: nodemesh
Remove meshlite, introduce nodemesh: https://github.com/huxingyi/nodemesh
Now, all the codebase move to C++, no rust language dependency.
2019-02-18 22:27:18 +09:30
Jeremy Hu b65205a48c Add tool button tips especially when failed to generate mesh #20
This commit add tips for buttons, to show what the function of the button.
Also, fixed a issue, there was no useful infos to tell user when the mesh was failed to generate, now user should see a warning icon with tips to show why the preview disappear.

Thanks the following contributors:
@RubenSandwich <https://github.com/RubenSandwich>
boynet <https://dust3d.discourse.group/u/boynet>
fornclake <https://www.reddit.com/user/fornclake>
2019-01-07 22:33:42 +09:30
Jeremy Hu f6bafdb720 Fix typo 2018-11-18 07:02:12 +08:00
huxingyi 889c11ecef Add new combine mode: Inflation
This mode turn the component to functional nodes instead of mesh construction. The mesh generated before this component will be proportional deformed.
2018-11-15 22:01:20 +08:00
huxingyi ab97615bea Add "combineMode" configuration for component to replace the "inverse" attribute
Currently, only support "Normal" and "Inversion" modes, "Normal" means normal mesh union, "Inversion" means mesh diff, it behaves like subtract itself from the previous mesh.
2018-11-14 21:21:45 +08:00
Jeremy Hu 1f8f7913a7 Improve mesh generation
Insert intermediate nodes automatically between nodes of long edges to avoid generating tiny area but long edge triangles.
2018-11-12 07:21:34 +08:00
Jeremy Hu 1c17e25b69 Add new rig type: Generic
The difference between tetrapod and generic is that, with tetrapod, all the bones need to be generated are know before mark, so if some marks are missing, there would be a message prompted; with generic, you can mark what ever marks as you wish, and the algorithm is try to create a spine and the limbs growing on the spine, that means, the generated skeleton would be some kind of creature.
2018-11-01 23:24:06 +08:00
Jeremy Hu 79200827f5 Cleanup
Refactor outcome. Move processes of outcome to separated files, and leave the outcome class as clean as possible.
Normal export in glb format is been fixed.
Ambient occlusion baker is been temporarily removed.
2018-10-27 07:04:45 +08:00
Jeremy Hu 62632dc168 Fix material widget 2018-10-25 23:28:10 +08:00
Jeremy Hu 208d2a0166 Cleanup
Many source file name and data type are prefixed by "skeleton" before, now all are refactored.
The class MeshResultContext represents the outcome of mesh generation before, now we have material, pose and animation, so we just rename it as Outcome.
2018-10-25 08:19:38 +08:00
Jeremy Hu eeff771a3b Optimize texture generating time 2018-10-09 21:01:04 +08:00
Jeremy Hu 5f2a46be9c Avoid unnecessary mesh regeneration while only texture map changed 2018-10-09 17:17:44 +08:00
Jeremy Hu 7eb5a325a0 Add MetalicRoughness material manager
Besides adding the PBR material manager, this commit hide some unnecessary features such as toggle wireframes and toggle normal smooth.
Add a regenerate button to indicate mesh is generating by showing a spiner, user can click this button to regenerate if the final result is not good.
Please note that, we generate the texture map by default compared to before we only generate texture map when user export glTF result. Current uvunwrap library cann't handle bad mesh very well, so it will crash on the wires model.
2018-10-09 10:19:12 +08:00
Jeremy Hu 7de9b61de7 Remove generated trivial seam triangles 2018-10-05 23:54:12 +08:00
Jeremy Hu f7b5fb1c6a Add PBR support
Now can configure metalness and roughness for parts, however, the PBR render isn't enabled in the code currently.
2018-10-04 20:51:01 +08:00
Jeremy Hu 6ffbdc9c7b Add mesh seam combine algorithm
Not enable by default, should enable the weldEnabled in the SkeletonDocument class.
2018-09-22 18:31:02 +08:00
Jeremy Hu e22a6de6cb Add poses list view
Added Add, modify, delete, copy, and paste poses. The paste menu for nodes not show up also got fixed in this commit.
2018-09-21 15:10:18 +08:00
Jeremy Hu 1ab3d16bd4 Fix parts render crash
Before, app crash on some machines as been reported in #15 and #16, and cannot easily be reproduced on other machines, such as a virtual box guest system, which make it very hard to trace the root cause.
Now, the offline render is totally removed from the code base, instead of offline-render to image then show the image, we can directly show the parts model in the parts tree using normal opengl widget, and the result looks better than before.
2018-09-18 14:22:29 +08:00