Commit Graph

90 Commits (230a7278d7ab0c4e6b6eb71ef73495ccd2442349)

Author SHA1 Message Date
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 e2b221533b Fix example meerkat model and disable debug output in command line 2019-07-29 17:49:01 +09:30
Jeremy Hu 0f411d3bd9 Fix inconsistent base normal when shape is too straight 2019-07-27 14:12:07 +09:30
Jeremy Hu 9261b7ca5e Add THREE.Vector3 and THREE.Ququaternion from three.js 2019-07-26 14:15:33 +09:30
Jeremy Hu af792a9bdc Add javascript variable inputs: Float, Int, Check, Color, Select 2019-07-26 10:50:32 +09:30
Jeremy Hu 3e82ee597e Add local average base normals
The base normal of each node will be averaged by sum of all the neighbors' base normal.
2019-07-22 19:10:37 +09:30
Jeremy Hu 930b7ad4a6 Fix quickjs build on linux 2019-07-22 07:44:16 +09:30
Jeremy Hu a7758fcccd Rename quickjs folder to indicate it's modified 2019-07-21 23:42:53 +09:30
huxingyi 48540e297d Fix quickjs crash on windows 2019-07-21 05:22:10 -07:00
huxingyi f2cc4a11e1 Fix quickjs windows build 2019-07-20 04:57:26 -07:00
Jeremy Hu 63d92e7682 Add JavaScript support
This commit introduce JavaScript as nodes generation script, to procedurally generate input nodes, which usually should draw by user on the canvas.

Powered by QuickJS (https://bellard.org/quickjs/)
2019-07-20 14:04:53 +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 013c671451 Fix intermediate nodes generation 2019-07-11 22:22:44 +09:30
Jeremy Hu 81fec2ed44 Update intermediate nodes filling threshold edge length 2019-07-11 20:50:34 +09:30
Jeremy Hu 3c2b60a8cc Fix mesh failure when direction of two nodes parallel to z axis 2019-07-11 19:54:52 +09:30
Jeremy Hu f7b865f18b Fix intermediate cut face 2019-07-11 19:25:52 +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 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 713935adb5 Save cut face transforms 2019-07-03 07:19:18 +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 6fc65df6e2 Fix invalid cut face calculation cause infinite loop 2019-06-10 21:25:09 +09:30
Jeremy Hu 63d32781c1 Fix branch wrapping #32
In this commit, the wrapping algorithm consider the position of neighbor's neighbor, so the cut normal of branch nodes would looks more natural. This commit also fix the radius calculation of the branch face.
Thanks @KeepFenDou for pointing out this issue.
2019-05-28 23:49:50 +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 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 fc341986c0 Fix texture glitchs 2019-05-12 17:45:07 +09:30
Jeremy Hu fcfe51a28a Support customizable extruding face: Quad, Pentagon, Hexagon, and Triangle 2019-05-05 22:19:26 +09:30
Jeremy Hu 69b371adb9 Fix base normal 2019-03-09 23:30:19 +09:30
Jeremy Hu 4ac83a9626 Speed up mesh generating
Use CGAL inexact kernel for mesh combination.
2019-03-08 23:26:01 +09:30
Jeremy Hu 8f5bbfd758 Fix crash on linux 2019-03-08 20:25:24 +09:30
Jeremy Hu 499c3f439a Use CGAL triangulation
Replace triangulation algorithm with CGAL triangulate_faces, the quality of generated mesh improved a lot.
This commit also reduced max uv packer times.
2019-03-07 22:43:41 +09:30
huxingyi 2d841fb58b Fix build on ubuntu 2019-03-03 14:44:48 +08:00
Jeremy Hu ae32a4693b Remove comments. 2019-02-27 23:08:39 +09:30
Jeremy Hu cbaccb0116 Add cut face chamfer tool. 2019-02-27 22:29:03 +09:30
Jeremy Hu 2b44576f22 Fix cut face base normal. 2019-02-26 22:54:58 +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 b2fdb7f4e8 Fix cut rotation 2019-02-23 00:03:04 +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 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 8ace5b43de Fix triangulation of uv unwrapping 2019-01-24 23:57:47 +09:30
Jeremy Hu 3f3134cc0e Fix typo 2018-12-29 09:32:53 +09:30
Jeremy Hu f0334c3eec Fix crash on uvunwrapping #18 2018-12-01 23:21:53 +09:30
Jeremy Hu a2a5b774aa Fix uvunwrap
The As-Rigid-As-Possible method of parametrization sometimes failed, so added Least-Squares-Conformal-Maps method as a fallback option.
2018-11-29 11:55:55 +09:30
Jeremy Hu f6bafdb720 Fix typo 2018-11-18 07:02:12 +08:00
huxingyi 724e745f2e Update meshlite_ffi
Fix radius setting for single node
2018-11-14 13:27:36 +08:00
Jeremy Hu 955ebce009 Fix build 2018-10-25 14:46:21 +08:00
Jeremy Hu 637356e895 Fix undo
Add a crc64 hash check for history keeping to avoid repeated snapshot.
Besides, before, there is a logic error in the undo implementation, which recover the most recent snapshot from undo stack, so user need undo twice and at the second undo get the expected result. This incorrect behavior got fixed.
2018-10-25 14:27:59 +08:00
Jeremy Hu 096c107775 Add fbx export support (2/3)
Currently, only mesh exported. Tested in Blender 2.79 and Unity 2017.4.1f1 Personal (64bit).
2018-10-20 13:07:11 +08:00