




免费预览已结束,剩余2页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
.BVH 文件格式说明(中英文对照)版本信息版本号作者时间备注1.0卢弋2011-5-16完成目录1 Biovision BVH12 Parsing the file解析文件13 Interpreting the data解读数据4IBVH 文件格式说明(中英文对照)1 Biovision BVHThe BVH file format was originally developed by Biovision, a motion capture services company, as a way to provide motion capture data to their customers. The name BVH stands for Biovision hierarchical data. This format mostly replaced an earlier format that they developed, the BVA format which is discussed in the next section, as a way to provide skeleton hierarchy information in addition to the motion data. The BVH format is an excellent all around format, its only drawback is the lack of a full definition of the basis pose (this format has only translational offsets of children segments from their parent, no rotational offset is defined), it also lacks explicit information for how to draw the segments but that has no bearing on the definition of the motion.BVH文件格式最初是由从事动画捕捉服务的公司Biovision开发,用于向其客户提供动画捕捉数据的方法。BVH这个名字代表Biovision层次数据。这种格式最大化的取代了他们以前开发的BVA格式(我们在下一节中讨论BVA格式)作为除了提供骨骼层次信息以外的动画数据的方法。BVH格式在所有格式里面是优秀的,它唯一的缺陷是对基础姿势缺乏完整定义(这种格式仅仅有来自父节点的子segments的水平偏移,没有定义旋转偏移),它还缺乏对如何绘制在动画定义中没有方位的部分的精确的信息。2 Parsing the file解析文件A BVH file has two parts, a header section which describes the hierarchy and initial pose of the skeleton; and a data section which contains the motion data. Examine the example BVH file called Example1.bvh. The start of the header section begins with the keyword HIERARCHY. The following line starts with the keyword ROOT followed by the name of the root segment of the hierarchy to be defined. After this hierarchy is described it is permissable to define another hierarchy, this too would be denoted by the keyword ROOT. In principle, a BVH file many此处应为may contain any number of skeleton hierarchies. In practice the number of segments is limited by the format of the motion section, one sample in time for all segments is on one line of data and this will cause problems for readers which assume a limit to the size of a line in a file.BVH文件包含两部分,文件头描述骨骼层次和初始姿势;数据部分包含动画数据。查看示例BVH文件名为“Example1.bvh”。文件头部开始于关键字“HIERARCHY”。下一行起始于关键字“ROOT”,紧接着“ROOT”关键字层次结构的root segment的名称被定义。在这个被描述的层次结构之后,允许定义另一个层次结构,它也将以关键字“ROOT”进行标记。原则上,一个BVH文件可以包含任意数量的骨骼层次结构。实际上segment数是被动画部分的格式所限制的,对于所有segments的一次即时采样就是一行数据,这样会造成读者(假设文件一行的大小被限制)的问题。The BVH format now becomes a recursive definition. Each segment of the hierarchy contains some data relevant to just that segment then it recursively defines its children. The line following the ROOT keyword contains a single left curly brace , the brace is lined up with the ROOT keyword. The line following a curly brace is indented by one tab character, these indentations are mostly to just make the file more human readable but there are some BVH file parsers that expect the tabs so if you create a BVH file be sure to make them tabs and not merely spaces. The first piece of information of a segment is the offset of that segment from its parent, or in the case of the root object the offset will generally be zero. The offset is specified by the keyword OFFSET followed by the X,Y and Z offset of the segment from its parent. The offset information also indicates the length and direction used for drawing the parent segment. In the BVH format there isnt any explicit information about how a segment should be drawn. This is usually inferred from the offset of the first child defined for the parent. Typically, only the root and the upper body segments will have multiple children.BVH格式现在演变成一个递归定义。层次结构中的每一segment包含仅仅关联该segment的部分数据,然后递归定义其子段。“ROOT”关键字的下一行包含一个左大括号,该括号跟“ROOT”关键字并列。紧接着大括号的下一行是一个tab字符的缩进,这些缩进大多使得文件更可读,也有一些BVH文件解析器预期tab符号,所以你创建一个BVH文件应该确定使用tab符号而不只是空格。Segment的第一条信息就是对于其父segment的偏移,或者在root对象的情况下,偏移量为0。偏移被关键字“OFFSET”指定,紧接着就是该segment对父segment的X,Y和Z的偏移量。偏移量信息也指示了用于绘制其父segment的长度和方向信息。在BVH格式中,没有任何关于如何绘制一个segment的明确信息。通常从父定义中的第一个子的偏移开始推断。典型的,只有根和上半身segment会有多个孩子。The line following the offset contains the channel header information. This has the CHANNELS keyword followed by a number indicating the number of channels and then a list of that many labels indicating the type of each channel. The BVH file reader must keep track of the channel count and the types of channels encountered as the hierarchy information is parsed. Later, when the motion information is parsed, this ordering will be needed to parse each line of motion data. This format appears to have the flexibility to allow for segments which have any number of channels which can appear in any order. If you write your parser to handle this then so much the better, however, I have never encountered a BVH file that didnt have 6 channels for the root object and 3 channels for every other object in the hierarchy.偏移的下一行包含通道的头部信息。它具有“CHANNELS”关键字,紧接着是一个数字指示数量,然后是一个标签列表指示每一个通道的类型。BVH文件阅读器必须保持跟踪通道数量以及遇到的被解析为层次结构信息的通道类型。然后,当动画信息被解析,这个顺序需要解析每一行动画数据。这种格式显示出允许包含任意数量通道的segments能够出现在任意顺序中的灵活性。如果编写自定义的解析器去处理那就更好了,但是,我还没有遇到过一个BVH文件的层次结构中,root对象没有6个通道以及每一个其它对象3个通道的情况。You can see that the order of the rotation channels appears a bit odd, it goes Z rotation, followed by the X rotation and finally the Y rotation. This is not a mistake, the BVH format uses a somewhat unusual rotation order. Place the data elements into your data structure in this order.你可以看到旋转通道的顺序有一点奇怪。它开始于Z旋转,接下来是X旋转,最后是Y旋转。这不是错误,BVH格式使用有些不通寻常的旋转顺序。将数据元素按照这个顺序放到你的数据结构中。On the line of data following the channels specification there can be one of two keywords, either you will find the JOINT keyword or you will see the End Site keyword. A joint definition is identical to the root definition except for the number of channels. This is where the recursion takes place, the rest of the parsing of the joint information proceeds just like a root. The end site information ends the recursion and indicates that the current segment is an end effector (has no children). The end site definition provides one more bit of information, it gives the length of the preceding segment just like the offset of a child defines the length and direction of its parents segment.紧接着通道规范的数据行可以有一个或者两个关键字,你可以找到“JOINT”关键字,你也可以看到“End Site”关键字。Joint定义跟root定义相同,除了通道的数量。这就是发生递归的地方,其余的解析joint信息的处理就像root一样。End site信息终止递归并指示当前segment终止(无子节点)。End site的定义提供了一些信息,它给出了前一segment的长度,就像子节点的偏移定义了它的父segment的长度和方向。The end of any joint, end site or root definition is denoted by a right curly brace . This curly brace is lined up with its corresponding right 此处应为leftcurly brace.任意joint,end site或root定义的最后标记一个右大括号“”。这个括号于其相对应的左括号并列。One last note about the BVH hierarchy, the world space is defined as a right handed coordinate system with the Y axis as the world up vector. Thus you will typically find that BVH skeletal segments are aligned along the Y or negative Y axis (since the characters are often have a zero pose where the character stands straight up with the arms straight down to the side).最后一点关于BVH结构需要注意的是,世界坐标系被定义成右手坐标系,也就是Y轴作为向上的方向。因此,你通常会发现,BVH骨骼segments沿Y轴或负Y轴对齐(因为人物通常有一个0姿势,也就是人物笔直站立并且双臂自然下垂)。The motion section begins with the keyword MOTION on a line by itself. This line is followed by a line indicating the number of frames, this line uses the Frames: keyword (the colon is part of the keyword) and a number indicating the number of frames, or motion samples that are in the file. On the line after the frames definition is the Frame Time: definition, this indicates the sampling rate of the data. In the example BVH file the sample rate is given as 0.033333, this is 30 frames a second the usual rate of sampling in a BVH file.Motion部分开始于关键字“MOTION”的行。接下来一行指定帧数,该行使用关键字“Frames:”(冒号是该关键字的一部分)以及一个数字指定帧数,motion示例参考前文示例文件。帧定义的下一行是“Frame Time:”定义,它指定数据采样率。在示例BVH文件的例子中给出的采样率是0.033333,这是BVH文件的常规采样率(30帧每秒)。The rest of the file contains the actual motion data. Each line is one sample of motion data. The numbers appear in the order of the channel specifications as the skeleton hierarchy was parsed.文件的其余部分包含实际的motion数据。每行都是一个motion数据的采样。这些数字按照channel规范的顺序显示,作为骨架结构被解析。3 Interpreting the data解读数据To calculate the position of a segment you first create a transformation matrix from the local translation and rotation information for that segment. For any joint segment the translation information will simply be the offset as defined in the hierarchy section. The rotation data comes from the motion section. For the root object, the translation data will be the sum of the offset data and the translation data from the motion section. The BVH format doesnt account for scales so it isnt necessary to worry about including a scale factor calculation.为了计算一个segment的位置,你首先要从segment的本地平移和旋转信息中创建一个交换矩阵。对于任意骨骼segment,平移信息简单的就是定
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年驾照三力测试试题题库及答案
- 阿里地区2024-2025学年七年级上学期语文期中模拟试卷
- 安徽省2024年高二学业水平合格性考试物理考试题目及答案
- 2025 年小升初太原市初一新生分班考试英语试卷(带答案解析)-(人教版)
- 2025 年小升初承德市初一新生分班考试数学试卷(带答案解析)-(人教版)
- 天津2025年上半年造价工程师考试造价管理:工程项目目标控制的内容试题
- 社区老年食品安全知识培训课件
- 北师大版四年级上册数学第七-八单元 生活中的负数、数学好玩 可能性检测题 (无答案)
- 代销服装协议合同范本
- 法院卫生保洁合同范本
- 医院检验科实验室生物安全程序文件SOP
- 新入辅导员职员工培训
- IPS内置保温体系施工方案(经典)
- 房屋买卖合同范本Word模板下载
- 授权委托书保险理赔
- 保安公司安全生产培训课件
- 光伏发电项目技术标投标文件
- 普通话声母资料
- 社区开展康复护理知识讲座
- 《测量降水量》教学课件
- 楼顶发光字采购安装投标方案
评论
0/150
提交评论