我的BSP分割未經處理資料和結果格式(基本分割+Portal)

來源:互聯網
上載者:User

未經處理資料檔案: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>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.