Jump to content

ObjectMeshDynamic vertex data for .node file


photo

Recommended Posts

In a node file containing an ObjectMeshDynamic, a vertex is given 14 values. I have worked out that the first 3 are position and the last 3 are the normal. But what about the middle 8 values? I know some of these are texture coordinates, but are there 4 sets of texture coordinates? How do I generate these values if I have created vertex data in an external application that currently only stores position, normal and one set of UVs?

 

Here is a node file containing a simple 4 vert plane to highlight my question;

<?xml version="1.0" encoding="utf-8"?>
<nodes version="1.14">
<node id="1689" type="ObjectMeshDynamic">
 <mesh name="Plane001" begin="0" end="6"/>
 <vertex num_vertex="4">
 23.6193 23.8566 0  //position
 1 0 0 0 -1.52593e-005 -1.52593e-005 1 1  //texcoords???
 -2.32845e-010 1.52593e-005 -1  //normal

 23.6193 -22.1984 0
 1 1 0 0 -1.52593e-005 -1.52593e-005 1 1
 -2.32845e-010 1.52593e-005 -1

 -22.4358 23.8566 0
 0 0 0 0 -1.52593e-005 -1.52593e-005 1 1
 -2.32845e-010 1.52593e-005 -1

 -22.4358 -22.1984 0
 0 1 0 0 -1.52593e-005 -1.52593e-005 1 1
 -2.32845e-010 1.52593e-005 -1
 </vertex>
 <indices num_indices="6">2 3 0 1 0 3</indices>
 <surface name="Plane001" material="mesh_base" property="surface_base"/>
 <transform>1 0 0 0 0 1 0 0 0 0 1 0 7.79179 -50.1617 -2.42496e-008 1</transform>
</node>
</nodes>

Link to comment

0,1,2 - is position

3,4 - is the first uv set

5,6 - is the second uv set

7,8,9 - is normal

10,11,12 - is tangent

13 - is binormal direction (1.0 for positive dot(normal,cross(tangent,binormal)) product, -1.0 for negative product)

Link to comment
×
×
  • Create New...