《机械专业毕业设计(论文)外文翻译延长搅拌机:开发触觉工具.doc》由会员分享,可在线阅读,更多相关《机械专业毕业设计(论文)外文翻译延长搅拌机:开发触觉工具.doc(23页珍藏版)》请在三一办公上搜索。
1、Extending Blender: Development of a Haptic Authoring ToolAbstract -In this paper, we present our work to extend a well known 3D graphic modeler - Blender - to support haptic modeling and rendering. The extension tool is named HAMLAT (Haptic Application Markup Language Authoring Tool). We describe th
2、e modifications and additions to the Blender source code which have been used to create HAMLAT Furthermore, we present and discuss the design decisions used when developing HAMLAT, and also an implementation road map which describes the changes to the Blender source code. Finally, we concludewith di
3、scussion of our future development and research avenues. Keywords - Haptics, HAML, Graphic Modelers, Blender, Virtual Environments. I. INTRODUCTION A. Motivation The increasing adoption of haptic modality in human-computer interaction paradigms has led to a huge demand for new tools that help novice
4、 users to author and edit haptic applications. Currently, the haptic application development process is a time consuming experience that requires programming expertise. The complexity of haptic applications development rises from the fact that the haptic application components (such as the haptic AP
5、I, the device, the haptic rendering algorithms, etc.) need to interact with the graphic components in order to achieve synchronicity.Additionally, there is a lack of application portability as the application is tightly coupled to a specific device that necessitates the use of its corresponding API.
6、 Therefore, device and API heterogeneity lead to the fragmentation and disorientation of both researchers and developers. In view of all these considerations, there is a clear need for an authoring tool that can build haptic applications while hiding programming details from the application modeler
7、(such as API, device, or virtual model).This paper describes the technical development of the Haptic Application Markup Language Authoring Tool (HAMLAT). It is intended to explain the design decisions used for developing HAMLAT and also provides an implementation road map, describing the source code
8、 of the project.B. BlenderHAMLAT is based on the Blender 1 software suite, which is an open-source 3D modeling package with a rich feature set. It has a sophisticated user interface which isnoted for its efficiency and flexibility, as well as its supports for multiple file formats, physics engine, m
9、odem computer graphic rendering and many other features.Because of Blenders open architecture and supportive community base, it was selected as the platform of choice for development of HAMLAT. The open-source nature of Blender means HAMLAT can easily leverage its existing functionality and focus on
10、 integrating haptic features which make it a complete hapto-visual modeling tool, since developing a 3D modeling platform from scratch requires considerable development time and expertise in order to reach the level of functionality of Blender. Also, we can take advantage of future improvements to B
11、lender by merging changes from its source code into the HAMLAT source tree.HAMLAT builds on existing Blender components, such as the user-interface and editing tools, by adding new components which focus on the representation, modification, and rendering of haptic properties of objectsin a 3D scene.
12、 By using Blender as the basis for HAMLAT, we hope to develop a 3D haptic modeling toolwhich has the maturity and features of Blender combinedwith the novelty of haptic rendering.At the time of writing, HAMLAT is based on Blender version 2.43 source code.C. Project Goals As previously stated, the ov
13、erall goal for the HAMLAT project is to produce a polished software application which combines the features of a modem graphic modeling tool with haptic rendering techniques. HAMLAT has the look and feel of a 3D graphical modeling package, but with the addition of features such as haptic rendering a
14、nd haptic property descriptors. This allows artists, modelers, and developers to generate realistic 3D hapto-visual virtual environments. A high-level block diagram of HAMLAT is shown in Figure 1. It illustrates the flow of data in the haptic modeling. HAMLAT assists the modeler, or application deve
15、loper, in building hapto-visual applications which may be stored in a database for later retrieval by another haptic application. By hapto-visual application we refer to any software which displays a 3D scene both visually and haptically to a user in a virtual setting. An XML file format, called HAM
16、L 2, is used to describe the 3D scenes and store the hapto-visual environments built by a modeler for later playback to an end user. Traditionally, building hapto-visual environments has required a strong technical and programming background. The task of haptically rendering a 3D scene is tedious si
17、nce haptic properties must be assigned to individual objects in the scene and currently there are few high-level tools for accomplishing this task. HAMLAT bridges this gap by integrating into the HAML framework and delivering a complete solution for development of hapto- visual applications requirin
18、g no programming knowledge. The remainder of the paper is organized as follows: in Section 2, we present the proposed architecture extensions and discuss design constraints. Section 3 describes the implementation details and how haptic properties are added and rendered within the Blender framework.
19、In Section 4 we discuss related issues and future work avenues. II. SYSTEM OVERVIEW AND ARCHITECTURE The Blender design philosophy is based on three main tasks: data storage, editing, and visualization. According to the legacy documentation 3, it follows a data- visualize-edit development cycle for
20、the 3D modeling pipe line. A 3D scene is represented using data structures within the Blender architecture. The modeler views the scene, makes changes using the editing interface which directly modifies the underlying data structures, and then the cycle repeats.To better understand this development
21、cycle, consider the representation of a 3D object in Blender. A 3D object may be represented by an array of vertices which havebeen organized as a polygonal mesh. Users may choose to operate on any subset of this data set. Editing tasks may include operations to rotate, scale, and translate theverti
22、ces, or perhaps a re-meshing algorithm to cleanup redundant vertices and transform from a quad to a triangle topology. The data is visualized using a graphical 3D renderer which is capable of displaying the object as a wireframe or as a shaded, solid surface. The visualization is necessary in order
23、to see the effects of editing on the data. In a nutshell, this example defines the design philosophy behind Blenders architecture.In Blender, data is organized as a series of lists and base data types are combined with links between items in each list, creating complex scenes from simple structures.
24、This allows data elements in each list to be reused, thus reducing the overall storage requirements. For example, a mesh may be linked by multiple scene objects, but the position and orientation may change for each object and the topology of the mesh remains the same. A diagram illustrating the orga
25、nization of data structures and reuse of scene elements is shown in Figure 2. A scene object links to three objects, each of which link to two polygonal meshes. The meshes also share a common material property. The entire scene is rendered on one of several screens, which visualizes the scene.We ado
26、pt the Blender design approach for our authoring tool. The data structures which are used to represent objects in a 3D scene have been augmented to include fields for haptic properties (e.g., stiffness, damping); user interface components (e.g., button panels) which allow the modeler to change objec
27、t properties have also been updated to include support for modifying the haptic properties of an object. Additionally, an interactive hapto-visual renderer has been implemented to display the3D scene graphically and haptically, providing the modeler or artist with immediate feedback about the change
28、s they make to the scene. in the current version of the HAMLAT. the modifications to the Blender framework include: data structures for representing haptic properties, an editing interface for modifying haptic properties, an external renderer for displaying and previewing haptically enabled scenes,
29、scripts which allow scenes to be imported/exported in the HAML file format. A class diagram outlining the changes to the Blender ramework is shown in Figure 3. Components which are ertinent to HAMLAT are shaded in gray. HAMLAT builds on existing Blender sub-systems by extending them or haptic modeli
30、ng purposes. Data structures for representing object geometry and graphical rendering areaugmented to include field which encompass the tactile properties necessary for haptic rendering.To allow the user to modify haptic properties GUI Components are integrated as part of the Blender editing panels.
31、 The operations triggered by these componentsoperate directly on the d ata structures used for representing hatic cues and may be considered part of the editing step of the Blender design cycle.Similarly to the built-in graphical renderer, HAMLAT uses a custom rendlerer for displaying 3Ds scenes grp
32、hcal and haptcall, an is ineedn of the Blender renderer. This component is developed independently since haptical and graphical rendering must be performed simultaneously and synchronously. A simulation loop is used to update haptic rendering forces at a rate which maintains stability and quality. A
33、 detailed discussion of the implementation of these classes and their connectivity is given in the next section.III IMLIEMENTATIONA Data StructureA.1 Mesh Data TypeBlender uses many different data structures to represent the various types of objects in a 3D scene a vertices; a lamp contains colour a
34、nd intensity values; and camera a object contains intrinsic viewing parameters.The Mesh data structure iS used by the Blender inframework to describe a polygonal mesh object. It iS of particular interest for hapic rendering since many solid objects in a 3D scene may be represented using this type of
35、 data structure. The tactile and kinesthetic cues, which are displayed due to interaction with virtual objects, are typically rendered based on the geometry of the mesh. Hptic rendering is performed based primary on data stored in this data type. Other scene components such as lamps, cameras, or lin
36、es are not intuitively rendered using force feedback haptic devices and are therefore not of current interest for haptic rendering. An augmented version of the Mesh data structure is shown in Figure 4. It contains fields for vertex and face data, plus some special custom data fields which allow data
37、 to be stored to/retrieved from disk and memory. We have modified this data type to include a pointer to a MHaptics data structure, which stores haptic properties such as stiffness, damping, and friction for the mesh elements (Figure 5).A.2 Edit Mesh Data TypeIt should be noted that the Mesh data ty
38、pe has a comPlimentary data structure, called EditMesh, which is used when editing mesh data. It holds a copy of the vertex, edge ,and face data for a polygonal mesh. when the user switches to editing mode, the Blender copies the data from a Mesh into an EditMesh and when editing is complete the dat
39、a is copied back.Care must be taken to ensure that the hapic property data structure remains intact during the copy sequence. The EditMesh data structure has not been modified to contain a copy of the hapic property data ,but this mayproperties in edit mode is required). The editing mode is mainly u
40、sed to modify mesh topology and geometry, not the haptic and graphical rendering characteristics, A.3 Haptic Properties In this section well briefly discuss the haptic properties which may currently be modeled using HAMLAT. It is important for the modeler to understand these properties and their bas
41、is for use in haptic rendering. The stiffness of an object defines how resistant it is to deformation by some applied force. Hard objects, such as a rock or table, have very high stiffness; soft objects, such as rubber ball, have low stiffness. The hardness-softness of an object is typically rendere
42、d using the spring-force equation: Where the force feedback vector f which is displayed to the user is computed using ks the stiffness coefficient (variable name stiffness)for the object and x the penetration depth (displacement) of the haptic proxy into an object. The stiffness coefficient has a ra
43、nge of 0,1, where 0 represents no resistance to deformation and 1 represents the maximum stiffness which may be rendered by the haptic device. The damping of an object defines its resistance to the rate of deformation due to some applied force. It is typically rendered using the force equation:Where
44、 kd is the damping coefficient (variable nameMHaptics; damping) anddepdt is the velocity ofthe haptic proxy as it;penetrates an object. The damping coefficient also has a range of 0,1 and may be used to model viscous behaviour of a material. It also increases the stability of the hapticrendering loo
45、p fordstiffmaterials.The static friction (variable name stjriction) and dynamic friction (variable name dyjriction) coefficient are used to model the frictional forces experienced whileexploring the surface of a 3D object. Static friction is experienced when the proxy is not moving over the objects
46、surface, and an initial force must be used to overcome static friction. Dynamic friction is felt when the proxy moves across the surface, rubbing against it.Frictional coefficients also have a range of /0,1, with a value of 0 making the surface of a 3D object feel slippery and a value of 1 making th
47、e object feel veryrough. Frictional forces are typically rendered in a direction tangential to the collision point of the hapticproxy at an objects surface. B. Editing Blender uses a set of non-overlapping windows called spaces to modify various aspects of the 3D scene and its objects. Each space is
48、 divided into a set of areas andpanels which are context aware. That is, they provide functionality based on the selected object type. Forexample, if a camera is selected the panel will display components which allow the modeler to change the focal length and viewing angle of the camera, but these c
49、omponents will not appear if an object of another type is selected. Figure 6 shows a screen shot of the button space which is used to edit properties for a haptic mesh. It includes user-interface panels which allow a modeler to change the graphical shading properties of the mesh, perform simple re-meshing operations, and to modify the haptic properties of the selected mesh. HAMLAT follows the context-sensitive behavior of