Commit Graph

239 Commits (12508be02fee7e4a4f689860d27d8c2cc4ff95bf)

Author SHA1 Message Date
Jeremy Hu ba218b7168 Make the font default size #19 2018-12-02 08:24:04 +09:30
Jeremy Hu ebe97adcde Export metallic, roughness and ambient occlusion map to fbx file 2018-11-28 12:30:03 +09:30
Jeremy Hu 0bee294c7f Put base name into texture image name as prefix 2018-11-28 11:19:22 +09:30
Jeremy Hu b60b9d8691 Embed textures(Color/Normal) to FBX 2018-11-28 00:14:56 +09:30
Jeremy Hu 1866e8fbda Export normal texture and ORM texture to glTF 2018-11-18 08:16:26 +08:00
Jeremy Hu aea7b0cb74 Switch the order of ORM combined texture
Red: Ambient Occlusion
Green: Roughness
Blue: Metallic
2018-11-18 07:30:26 +08:00
Jeremy Hu f6bafdb720 Fix typo 2018-11-18 07:02:12 +08:00
Jeremy Hu 538528d103 Fix normal tangent
Some tangents did not get calculate, this cause some uncolored triangles show in the rendered model, this commit fixed it.
2018-11-17 23:42:46 +08:00
Jeremy Hu 1853e45ea4 Remove model preview from export widget 2018-11-17 17:10:08 +08:00
Jeremy Hu e39acc9f25 Add normal map preview 2018-11-16 13:55:52 +08:00
Jeremy Hu 69d97c7780 Fix build 2018-11-16 07:13:15 +08:00
Jeremy Hu d48bea6248 Merge branch 'master' of https://github.com/huxingyi/dust3d 2018-11-16 07:01:53 +08:00
Jeremy Hu 7f5a47c074 Fix merged texture image
The merged texture image of metalness, roughness and ambient occlusion did not get saved in the document class, this commit fixed it.
2018-11-16 06:56:24 +08:00
huxingyi 9b56ce2dd3 Fix wheel event on windows
The mouse wheel event got triggered on multiple widgets at the same time, this will cause the rendered model been wrongly zoomed while the intention is resizing the nodes.
2018-11-15 22:33:56 +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
huxingyi 753dfe9d8f Make the inverted component more obvious
Mark inverted components as blue to differentiate with normal components.
2018-11-14 11:11:31 +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 39cfe6537d Speed up document saving
If there are images need to be saved, such as the model turnaround reference sheet and texture images, the document saving may be slow because of image encoding to png, now, all the images are pre encoded when the first load, so the document saving could be speed up by avoid the cost of image encoding.
2018-11-11 21:08:13 +08:00
Jeremy Hu dff8e40ef8 Fix PBR material preview
The metallic and roughness texture not show up before, now should be ok if material is been set properly, however, export not done yet.
2018-11-11 17:13:46 +08:00
Jeremy Hu 4416c05bb5 Export translation to FBX 2018-11-11 11:14:49 +08:00
Jeremy Hu 9231ce9162 Fix pose setting: Height above ground level.
Root bone will have heightAboveGroundLevel parameter to indicate the distance between ground and foot. It's a relative value, comparing with the distance of the first spine head position and foot.
2018-11-11 00:05:49 +08:00
Jeremy Hu 205a9f512f Fix paste shortcut for pose editor 2018-11-10 08:21:07 +08:00
Jeremy Hu 69b0fbd68d Add switch chain side action for pose editor
It's very easy to place the wrong side limbs on the pose graphic editor, especially when the reference sheet is not clear. Switch chain side will switch the YZ for the paired chain which contains the selected node. For example, if you select one node from LeftLimb1, and choose the switch chain side from context menu, all the bones, has the name pattern LeftLimb1_Joint* and RightLimb1_Joint*, the YZ of origin will be swapped.
2018-11-10 07:56:58 +08:00
Jeremy Hu ddc837b47c Smooth first and last frame of pose sheet 2018-11-10 07:06:27 +08:00
Jeremy Hu 8a2298bfcb Smooth pose sheet
Simple smooth algorithm: average the frame transform with neiboring frames.
2018-11-09 23:42:20 +08:00
Jeremy Hu bbe36fde68 Change dialog save button action
Don't close dialog when save button got clicked
2018-11-09 23:07:26 +08:00
Jeremy Hu fff39b0835 Add multiple frames per pose support
Usually one pose consists of one frame, however, sometimes multiple frames per one reference sheet for a serial of action could be very useful, such as a sprite sheet. Multiple frames per pose is different with one motion, one motion could contains multiple poses. Currently, the duration of one frame is fixed to 0.042s, it's based on the 24 frames per second calculation.
2018-11-09 11:20:48 +08:00
Jeremy Hu a551995235 Fix inconsistent result between pose editor preview and motion generation
Each bone's head and tail positions are been kept in the pose parameters, that means there are repeated info and we can resolve the bone's head position from parent's tail position if there isn't any positions info been kept for one bone.
2018-11-08 16:01:25 +08:00
Jeremy Hu f0379740ca Fix wrong middle bone index 2018-11-07 23:46:26 +08:00
Jeremy Hu 73d4676675 Make spine bones in the middle of bind vertices vertically or horizontally 2018-11-07 23:12:40 +08:00
Jeremy Hu 01b164cdae Fit control bones in pose canvas
Add scale factor to make all the bones fit in the canvas of pose editor
2018-11-07 22:48:24 +08:00
Jeremy Hu 1543c1a6c7 Fix rig
Improve the quality of main body resolving.
2018-11-07 16:02:55 +08:00
Jeremy Hu 2c8975b1cd Unify rig type of generic and tetrapod as animal
Marks also reduced to four types: Neck, Limb, Tail and Joint.
2018-11-07 00:26:19 +08:00
Jeremy Hu d72738feb1 Fix build 2018-11-06 06:41:39 +08:00
Jeremy Hu 70f075a36e Rewrite pose editor
This commit include lots of changes for pose editor.
Before, we use buttons to represent the transform controller for bones;
Now, we use nodes and edges to represent the bones, just like the nodes and edges for representing the guide spheres for mesh generating. There are advantages by doing this. Firstly, The edit UI for both mesh and pose are unified, secondly, it is possible to set a reference sheet for pose editing now, this is very important.
This new pose editor is inspired by the Eadweard Muybridge's work.
2018-11-05 23:47:21 +08:00
Jeremy Hu a4aefdd308 Make a abstract class for document: SkeletonDocument
This is mainly for reusing the SkeletonGraphicsEditWidget for other purpose, such as the new pose editor.
2018-11-03 16:09:42 +08:00
Jeremy Hu e7249db089 Add translation parameter for pose editor 2018-11-02 13:43:01 +08:00
Jeremy Hu 0d45d65b98 Fix build 2018-11-02 10:30:17 +08:00
Jeremy Hu bd358d4de7 Fix generic rig
Limb bones generation failed when two mark joints sit near with each other, because resolving the joint bone's connectivity failed on finding the first neighbor.
This commit fixs this issue by trying to find a nearest joint node.
2018-11-02 07:48:17 +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 ca07b3ef6f Fix hand pose
Considering the hand direction when calculate the base plane of rotation.
2018-10-28 17:00:41 +08:00
Jeremy Hu 8615223eeb Export motions to FBX
Now motions can export to AutoDesk FBX file. Tested in Unity 2017.4.1f1
2018-10-28 13:22:10 +08:00
Jeremy Hu d00c26ca08 Export motions to glTF(.glb)
Each motion will be exported as an animtion of glTF
2018-10-27 10:29:51 +08:00
Jeremy Hu db33a5e662 Adjust the example model: camel 2018-10-27 08:06:59 +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 438c488f5a Support glTF binary format export
The normals haven't fix yet, this commit is mainly preparing for the next coming commits about animation export.
The glTF text format abandoned for the binary format.
2018-10-25 17:18:04 +08:00
Jeremy Hu 84607fba01 Expand the render model mouse control area
Click the middle mouse on the area out of the canvas can also rotate or move the render model.
2018-10-25 15:03:51 +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