Skinned Mesh or SubMesh Format of the Json 3D Format    ver 1.1

Example:

{    
  "model":
  {
    "version": "1.0",
    
    "meshes":
    [
      {           
        "name": "subMesh1",
        
        "type": "triangle",
        
        "node": 1,    //index in the nodes array
      
        "vertices": [-25, 0, 5, ...],

        "normals":  [0, 1, 0, ...],

        "uvs":  [ [0, 1, ...] ],
        
        "face":
        {
          "vertexIndices": [0, 1, 2, ...],
          
          "materialIndices": [0, 0, ...]  
        }        

        "skin":
        {
          "maxWeightsPerVertex": 4,
          
          "vertexIndices": [...],
        
          "boneIndices": [...],
          
          "weights": [...]
        }        
       
      },
      
      {         
        "name": "subMesh2",
        
        "type": "triangle patch",
        
        "node": 2,     
      
        "vertices": [...],

        "normals":  [...],

        "uvs":  [ [...] ],

        "face":
        {
          "vertexIndices": [0, 1, 2, ...],
          
          "materialIndices": [0, 0, ...]
        }         

        "skin":
        {
          "maxWeightsPerVertex": 4,
          
          "vertexIndices": [...],
        
          "boneIndices": [...],
          
          "weights": [...]
        }
      }
    ]
  },   
 
  "hierarchy":
  {  
    "nodes":  
    [
      {
        "name":"Scene_Root",
        
        "parent":-1,            
        
        "pos": [0,0,0],
        
        "scl": [1,1,1],
        
        "rot": [0,0,0,1],
      },        
      {
        "name":"node1",
        
        "parent":0,           
        
        "pos": [0,0,0],
        
        "scl": [1,1,1],
        
        "rot": [0,0,0,1],
      },        
      {      
        "name":"node2",
        
        "parent":0,
        
        "pos": [0,0,0],
        
        "scl": [1,1,1],
        
        "rot": [0,0,0,1],
      }
    ]
  }
  
  "animation":
  {
     ...
  }
2016-03-21 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *