利用者:Ansimionescu/gsoc2012/specs
(by Campbell, I should rewrite/expand this to look more like some specs)
目次
Targets for GSOC
Improved face filling method
- Must be more stable than scanfill (scanfill creates holes in too many cases)
- Not create overlapping faces
- Must be implimented in a similar way to scanfill (so it can be a drop-in replacement for )
Ngon poke tool (tool to convert ngon to quads/tris using at least 3 different methods
- triangulation
- fan-fill (each ngon adds one vert which is the hub of a fan)
- optimal-ngon-partitioning (join edges across the ngon recursively at optimum points until its reduced to quads/tris)
Optional Extras
- NGon flatten tool (flatten non-planer ngons)
- NGon cleanup - tool to ensure ngons are not concave (clip off concave areas into their own convex faces).
- Function to calculate the area of an ngon (we care currently missing this)
- Mesh cleanup tool - find zero area faces, zero length edges and dissolve/remove them.
Requirements
First half (Weeks 1-6)
NGon filling needs to be working at some level, this can be a python script that runs standalone or C code transposed from another implementation - output can be an image or an OBJ mesh file --- anything to validate that it works. how much of this code you write and how much you use as a reference is up to you, but you need to understand it well enough to make improvements to it, fix any bugs and integrate it with blender.
Ideally you would have something working IN blender by this time but depending on how much time integration takes you - this is a minimum so we can see the rest of the project is worth going ahead with.
This has to work at least as well as blenders existing scanfill - without serious flaws/bugs for normal uses (ignoring degenerate cases like zero area faces, zero length edges).
Second half (Weeks 7-12)
Integrate this ngon tessellation into blender and support replacement of blenders scanfill for BMesh ngon filling - to be exact --- all uses of BLI_scanfill_begin involving bmesh/mesh code.
Currently there are 4 instances
- ./source/blender/blenkernel/intern/editderivedmesh.c:197: BLI_scanfill_begin(&sf_ctx);
- ./source/blender/blenkernel/intern/mesh.c:2502: BLI_scanfill_begin(&sf_ctx);
- ./source/blender/bmesh/operators/bmo_triangulate.c:171: BLI_scanfill_begin(&sf_ctx);
- ./source/blender/editors/uvedit/uvedit_unwrap_ops.c:265: BLI_scanfill_begin(&sf_ctx);
By the end of the project the ngon poke tool should be done too
however this can be done at any point in the project.