August 7, 2014, 04:10 (GMT) |
quiet warning |
August 7, 2014, 04:06 (GMT) |
Merge branch 'master' into temp-array-modifier |
August 7, 2014, 03:58 (GMT) |
Stopgap bugfix for trim tessellator failure when trim curve hits vert, read/write unstashed & bugfixed to not crash on undo push, changed UV axis orientation and coloring for consistency with RGB={+x,+y,+z} mnemonic. |
August 7, 2014, 01:50 (GMT) |
BMesh: use existing lookup tables when remapping |
August 7, 2014, 01:19 (GMT) |
GHash/EdgeHash: avoid NULL check on iterator init |
August 6, 2014, 23:14 (GMT) |
Fix T41047: Text objects flipping |
August 6, 2014, 19:34 (GMT) |
Custom Split Normals current state This is not yet ready for a detailed review, requesting more a skim one to see whether there are some big/key issues in current patch code/design. Further info on concepts used for custom lnors storage can be found [here](http://wiki.blender.org/index.php/User:Mont29/Foundation/Split_Vertex_Normals#Loop_normal_edition), but to summarize, it defines for each smooth fan (i.e. group of neighbor loops sharing a same normal) an orthonormal system which one axis is the auto lnor, and another one is aligned with a 'reference' edge which defines the start of the smooth fan. In addition, we store two angles, alhpa being the average angle between the auto lnor and all edges, and beta, the angle bewteen the start and end edges of the fan (around auto lnor). We then store custom lnors as a set of two factors, one applied to alpha angle (to get how much 'far away' from auto lnor custom one is), the other applied to beta angle (to get where around auto lnor custom one is). Since we need those data as well (like auto lnors), nearly all this adds to existing `BKE_mesh_normals_loop_split()` (and its BMesh version), with a small API to define lnor spaces, and convert raw custom normals to/from clnor data format (the two angle factors). Note lnor spaces also embed a representation of smoothfans (as a linklist of relevant loop's indices). Also note than all this overhead only takes effect when computing lnor spaces and/or using custom lnors, else current split lnors code is nearly unchanged. Would also like some advice on performances topic - right now, custom split normals can be up to 50 (or more) times slower than mare autosmooth in worst 'grid/sphere' cases, mostly because we can't skip anymore fanning around fully smooth vertices (since we have to generate lnor spaces for those too). In a more average case, it's something like three, four times slower (really depends on the topology!). I have two different tracks for optimization currently: * Use real threading (BLI_thread, could probably gives three or four times speedup with modern CPUs). Not really considering OMP, it�??s practically unusable on OSX and Win platforms currently (and not that perfomant compared to real threading anyway, afaik). Thinks the main loop of `BKE_mesh_normals_loop_split` (and it�??s BMesh equivalent) would be a good candidate for that, afaics each loop processing can be operated in parallel (this is a bit tricky to analyze, so not yet 100% sure about it, though). * Cache lnor spaces, using a similar system to current skey gsoc to detect changes in geometry or topology that would need to recompute them. Since computing those lnor spaces takes a huge part of the added processing time, this should lead to a nice gain too. But that would mean caching quite a bit of data in BMesh, Mesh and DerivedMesh... Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D703 |
August 6, 2014, 19:33 (GMT) |
Fix `BKE_mesh_has_custom_loop_normals` in Edit mode, get rid of some debug prints, various minor tweaks. |
August 6, 2014, 19:33 (GMT) |
Fix stupid handling of clnors_data in editderivedmesh. There was a mismatch between index/offset, and we need to handle both clnors from dm and from actual bm data... |
August 6, 2014, 19:33 (GMT) |
Add inlined-checks/fix of clnors data consistency to BKE_mesh_normals_loop_split() as well... |
August 6, 2014, 19:33 (GMT) |
Several enhancements: * Add an 'has custom lnors' helper, also available from RNA. * Add a 'factors' array to set custom lnors func, to make lerp interpolation between custom lnor and auto lnor. * Add a 'set custom lnors from vert nors' func (also available from RNA). * Reshuffle a bit clnor CD data handling in UI (now in Normals panel, and you can also add a layer if needed). |
August 6, 2014, 19:33 (GMT) |
Rework a bit `BKE_mesh_normals_loop_custom_set()`, should be more robust now. |
August 6, 2014, 19:33 (GMT) |
Fix various little issues and some corner-cases bugs... |
August 6, 2014, 19:33 (GMT) |
Add inlined custom lnors consistency check/fixup code in BMesh version of `loops_calc_normals` Note that stashing all clnor computations in a single func might not be optimal, but it allows to reduce compute overhead as much as possible (it's a desing decision in the end). Also, looks like func used to create smooth fans from a set of custom lnors is not working 100% correct - new checking code did found some diff in lnors of same smooth fans... :/ |
August 6, 2014, 19:33 (GMT) |
Fix stupid code to get CD custom lnors data in BMesh! |
August 6, 2014, 19:33 (GMT) |
When converting custom normals to CD data, interpret NULL vectors as NOP ones. i.e. if you give a (0, 0, 0) vector, you will always get auto-computed normal... |
August 6, 2014, 19:33 (GMT) |
Add DM callback to get lnors spaces (needed by modifiers generating custom normals!) |
August 6, 2014, 19:33 (GMT) |
Add a 'clear custom split normals' op (similar to those for skin or mask CD layers). |
August 6, 2014, 19:33 (GMT) |
Enhance lnor space handling (by taking into account the 'cone case'). In other words, we now have two plain angles, and custom normals are encoded as factors for those two angles. |
August 6, 2014, 19:33 (GMT) |
Some cleanup, add new CD layer (CD_CUSTOMLOOPNORMAL, float[2]), and a function to convert custom normals to internal data. WIP |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021