利用者:ReD Fox/GSoC2007Proposal

提供: wiki
< 利用者:ReD Fox
2007年6月14日 (木) 04:59時点におけるwiki>ReD Foxによる版 (Proposal moved to its own page)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Google Summer of Code 2007 Proposal

Project Title

Mesh bevel and offset tools/modifiers

Synopsis

Tools to create beveled edges are very important in technical modelling and rendering. However, it is also important that the artist have as much control over the process as possible. During modelling, the artist should be able to bevel selected faces/edges/vertices, choose the appropriate beveling method, and accurately set and view the final result in real-time. Also, a mesh-wide technique for producing a beveled result would be very helpful, mainly for rendering. This would be best implemented as a modifier with options to bevel based on edge crease values, vertex weights, and percentages (based on face joining angles and face area sizes).

In addition, based on the fact that there is a shared interest and perhaps even similar algorithms, the creation of a parallel offset tool would be a great benefit to technical modelling. A parallel offset tool increases or decreases the area/volume of a mesh while attempting to keep the points on the resulting surface as equidistant as possible to the original surface.

Benefits to the Blender Community

Although Blender has received an increased focus on mesh tools that mostly benefit organic modelling (edge-loop tools, sub-surface, sculpt, multi-res, etc.), some "simple" and much-asked-for tools that would greatly benefit technical modelling have not been implemented, or have been implemented without the proper attention to detail. The implementation of a better edit-mode bevel tool that works only on selected faces/edges/vertices, and that provides better visual feedback, has been a much requested feature for quite some time. Also, the creation of a bevel modifier will enable many artists (such as those in architecture) to focus on precision modelling while providing them an instant beveled result on the derived mesh.

The offset tool, while not requested nearly as often by the community, is essential to many types of modelling (such as architecture and logo design). This would be most welcome as an edit-mode tool to supplement the current ALT-S implementation.

Deliverables

Listed in order of priority:

1. Re-implement edit-mode bevel code to only work on selected faces/vertices/edges

  • Context sensitive: works differently based on the edit mode selection context (vertex, edge, or face)
  • Works on edge-only geometry

2. Re-structure the bevel preview to represent the selection-only changes, provide numeric input (optional; based on feedback from other developers), and, based on speed and feasibility, possibly provide a final-result, actual-data preview

3. Create a new bevel mesh modifier with the following options (listed in order of priority):

  1. Entire mesh; constant amount
  2. Selective; based on sub-surf edge crease data
  3. Selective; based on vertex weight (optional; only if time allows)
  4. Selective; based on edge angle
  5. Entire mesh; variable amount, based on face angle/area percentages (optional; only if time allows)

4. Implement new bevel mode: vertex only (bevels corners, but not edges)

  • As a modifier option
  • Incorporate into edit-mode tool (optional; only if time allows)

5. Implement new mesh tool: parallel offset

6. "Shell" modifier (optional; only if time allows)

Project Details

For those that don't know, beveling is the tapering or rounding of edges or corners so that the resulting angles are less distinct. It is useful as both a modelling tool, and as a special "final touch" to add detail and realism to a model. The details for the individual deliverables are as follows:

Re-implement edit-mode bevel code to only work on selected faces/vertices/edges

This should be fairly straight-forward. Currently, the edit-mode bevel tool operates on the entire mesh, regardless of what portions the user has selected. Frequently, there is also an annoying concave-corner result for poles with greater than four edges. However, the existing algorithm is fairly robust, and extending it to only work on selected faces/edges/vertices will be relatively simple. Also, I will take care to properly handle the edit mode selection contexts (vertex, edge, or face), slightly altering the result when and where appropriate. I will also ensure the bevel function works on edge-only geometry (e.g. an edge outline). In the process, I will be able to further refine the tool to remove the concave corner problem and, possibly, make the tool more intelligent (such as detecting co-planar faces).

Re-structure the bevel preview to represent the selection-only changes, provide numeric input, and, based on speed and feasibility, possibly provide a final-result, actual-data preview

This is a very important change. Currently, the bevel tool represents the final result with an unthemed yellow wire-outline preview. Ideally, I would like to see this abandoned for an actual-data preview that updates in realtime as the user adjusts the result. I have not examined whether this is a simple change, but speed concerns and certain operations (such as setting multiple recursion levels) may mean that this will require a creative solution, or may need to be abandoned for the simpler approach currently in use. Additionally, I would like to incorporate real-time numeric input for both the bevel values and recursion levels (providing a faster, more precise, work flow).

Create a new bevel mesh modifier with the following options (listed in order of priority)

Entire mesh; constant amount

My first goal for the bevel mesh modifier will be to establish a framework for future options and development. I will need to research the possibility of sharing code with the edit-mode bevel tool, but due to the difference in edit-mode and derived mesh data structures, the bevel modifier and edit-mode tool may need completely separate functions, and perhaps even different algorithms. The first option for the modifier will take the bevel amount and recursion levels as inputs, and will produce the same result as if the user had beveled the entire mesh using the edit-mode bevel tool.

Selective; based on sub-surf edge crease data
Selective; based on vertex weight

These two will be very similar, differing only in where they get the data for per-vertex/edge bevel amounts. They will bevel the mesh selectively, assigning "sharper" values to edges/verts containing higher weights/crease values. For the vertex weight option, the user will probably be required to specify a vertex group to be used.

Selective; based on edge angle

This option will only bevel edges if they exceed a certain angle threshold (i.e. if they're "sharp" enough).

Entire mesh; variable amount, based on face angle/area percentages

This will be similar to the previous two options, except that a method for determining the relative "sizes" of edges will need to be developed so that larger edges will be beveled more than smaller edges, and (possibly) so that sharper edges are beveled more than less sharp edges.

Implement new bevel mode: vertex only (bevels corners, but not edges)

This tool will allow a user to bevel poles (vertices, corners, whatever you want to call them) without affecting the angles of adjoining edges or affecting adjoining poles. Although it is a similar concept to edge-based beveling, it will probably need to use a significantly different algorithm. Access of this mode through the bevel modifier will be fairly simple (merely present the option to the user), however, I would also like to incorporate it into the edit-mode tool. Further thought and discussion with other developers will hopefully allow me to discover the best method for doing so (from the user's perspective).

Implement new mesh tool: parallel offset

This will be an alternative to the current ALT-S (scale along normals) tool. Rather than moving each vertex an equal distance along their individual normals, this tool will increase or decrease the area/volume of a mesh while keeping the points on the resulting surface as equidistant as possible to the original surface (meaning, edges and faces will remain as parallel as possible).

"Shell" modifier

If time allows, using the experience (and, possibly, code and algorithms) gained in developing the parallel offset tool, I will work on the creation of a "shell" or "offset" modifier that takes a mesh and offsets it to create a thickened 3D volume in the same shape as the original 2D surface. This would be useful for the creation of some types of objects (such as a vase or cup). It would also provide a "hook" for other, more advanced, offset operations (such as creating a shell for a non-manifold surface) and options such as self-intersection detection/resolution.

Project Schedule

Work can begin as soon as this application is accepted, and I am available full-time this summer. I am already rudimentarily familiar with the bevel code currently in implementation, and have played a bit with the modifier stack, but it will probably take about a week for me to get up and running with other details (Blender's event system, drawing methods, and memory allocation methods, for instance). Work will proceed until the deadline based on the priority assigned to the deliverables. The deliverables noted as "optional" will be postponed until I am reasonably certain that I will be able to include them in a working state without affecting the quality of the other deliverables. I will be available after the deadline for final bug fixes, integration/code-cleanup, and, perhaps, additional development.

Bio

I am a 21 year old computer science student wrapping up my degree and looking to pursue a graduate degree (in an unrelated field). I have been working with Blender since the summer of 2000, focusing mainly on python scripting (mesh tools), modelling (often technical), and game development (UV-mapping and texturing).

I have been programming for 6 years, with main experience in C/C++, Python, Java, and PHP. Projects have included 4 separate Blender-Python scripts (including a parallel offset tool), a basic web content management system, the BPyC ( http://hhofministries.org/bpyc ), and other course-related OpenGL projects such as display techniques (including interaction and animation), light baking, and image/pixel manipulation/filters.

I especially enjoy developing mesh tools. I am drawn to their highly technical nature, their need for new and creative algorithms, the visual products they produce, and the opportunity to see them used by and benefiting artists on a daily basis.