您的位置:首页 > 其它

我的BSP分割原始数据和结果格式(基本分割+Portal)

2007-01-25 13:25 351 查看
原始数据文件:oribsp

<BSP>
<Materials>
<Material Name="08 - Default" Type="Standard" Texture="Resources/BspScenes/NF/100_1524.jpg"/>
</Materials>
<StructFace>
<Vertices Count="240">
<Vertex Position="0.0 0.0 -100.0" Normal="0.0 1.97569 0.0" TexCoord="0.58325 -0.908682" />
</Vertices>
<SubMeshes Count="2">
<SubMesh MaterialName="02 - Default" SubMeshID="1" UseIndex32="false">
<Face Value="0 1 2" />
</SubMesh>
<SubMesh MaterialName="01 - Default" SubMeshID="1" UseIndex32="false">
<Face Value="126 127 128" />
</SubMesh>
</SubMeshes>
</StructFace>
<DetailMeshes>
<DetailMesh Name="DM_Cylinder1">
<Vertices Count="36">
<Vertex Position="14.0 0.0 -16.0" Normal="1.0 0.0 0.0" TexCoord="0.75 -0.000499547" />
</Vertices>
<SubMeshes Count="1">
<SubMesh MaterialName="03 - Default" SubMeshID="1" UseIndex32="false">
<Face Value="0 1 2" />
</SubMesh>
</SubMeshes>
</DetailMesh>
<DetailMesh Name="DM_Cylinder02">
<Vertices Count="36">
<Vertex Position="-10.0 0.0 -16.0" Normal="1.0 0.0 0.0" TexCoord="0.75 -0.000499547" />
</Vertices>
<SubMeshes Count="1">
<SubMesh MaterialName="03 - Default" SubMeshID="1" UseIndex32="false">
<Face Value="0 1 2" />
</SubMesh>
</SubMeshes>
</DetailMesh>
</DetailMeshes>
</BSP>



结果文件名:*.nfbsp

<BspScene>
<BspMaterials Count="5"> -- 材质表
<Material Name="01 - Default" TexName="Resources/BspScenes/NF/20034242302484698.jpg" />
</BspMaterials>
<BspVertices Count="269"> -- 原始顶点
<Vertex Pos="0 0 -100" Normal="0 1 0" TexCoord="0.58325 -0.908682" />
</BspVertices>
<BspStructPlanes Count="21"> -- 结构化平面
<Plane Normal="0 1 0" Distance="0" />
</BspStructPlanes>
<BspStructFaces Count="126"> -- 结构化三角形
<StructFace Value="0 1 2" PlaneID="0" SubMeshID="1" />
</BspStructFaces>
<BspDetailMeshes Count="12"> -- 细节模型
<DetailMesh Name="DM_Cylinder1">
<Vertices Count="36">
<Vertex Pos="14 0 -16" Normal="1 0 0" TexCoord="0.75 -0.000499547" />
</Vertices>
<SubMeshes Count = "1" FaceCount="12">
<SubMesh MaterialID="2">
<Face Value="33 34 35" />
</SubMesh>
</SubMeshes>
</DetailMesh>
</BspDetailMeshes>
<BspNodes Count="6"> -- Bsp 节点表
<Node NodeType="-1" PlaneID="11" PosChild="1" NegChild="3" />
<Node NodeType="0" PlaneID="6" PosChild="2" NegChild="-3" />
<Node NodeType="0" PlaneID="4" PosChild="-1" NegChild="-2" />
<Node NodeType="1" PlaneID="9" PosChild="-4" NegChild="4" />
<Node NodeType="1" PlaneID="18" PosChild="5" NegChild="-7" />
<Node NodeType="0" PlaneID="16" PosChild="-5" NegChild="-6" />
</BspNodes>
<BspLeafs Count="7"> -- Bsp Leafs叶子表
<Leaf NodeType="0"> -- Leaf 叶子
<StructFaces Count="27"> -- Struct Faces 结构化面
<SubMesh ID="1"> -- SubMesh ID 子SubMesh
<Face ID="0"/>
</SubMesh>
</StructFaces>
<LeafDMID> -- Detail mesh ID 细节面
<ID Value="0"/>
</LeafDMID>
<PortalLinks> -- Portal Links 叶子与哪些Portal连接
<Link PortalID="0"/>
<Link PortalID="1"/>
<Link PortalID="2"/>
<Link PortalID="3"/>
</PortalLinks>
</Leaf>
</BspLeafs>
<BspPortals> -- Portals 入口
<Portal LinkLeaf="3 0" > -- Portal 连接
<Vertex Value="-70 50 -60" /> -- Vertex
<Vertex Value="-40 50 -60" />
<Vertex Value="-40 0 -60" />
<Vertex Value="-70 0 -60" />
</Portal>
</BspPortals>
</BspScene>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: