Collada Study Notes

Source: Internet
Author: User

1.

<library_geometries>
    <geometry>....</geometry>//geometric structure unit </library_geometries of a model
>
Semantic: Semantics
VERTEX: fixed point
Normal: Fixed-point normals (you can determine how much light you can get for each, such as a triangle)
Texcoord: Map Texture coordinate value (1) <triangles> node P data, expressed as three data group (several input, then offset, you can know a few groups)
(2) The attribute materials in the <triangles> node indicates that the triangle group Map ID
(3) This map ID corresponds to the top <library_materials> sub-section <material>,<material> in <instance_effects> The URL attribute in the node represents the <material> corresponding effectid. However, the effectid is also stored in the <library_effects> node.
(4) Sub-nodes of the <effect> node <newparam> describes the path of the material map, specified by Init_from, the value of this init_from can be in the <library_images> To find the corresponding match in the
(5) <effect> under <profile_COMMON> <technique> node, this section describes the material's diffuse (diffuse), ambient light (ambient), Information such as transparency (transparent), and whether double-sided (double_sided) (1) <scene> node equivalent to the root node of all objects of the scene,<scene> ID value corresponds to <library_ ID value of <visual_scene> node in visual_scenes>
(2) <visual_scene> node There is a <node> sub-node, a child that node can understand as an object, such as a part of a person's hand, whereas 16 data in the matrix can hold the position of the hand, rotation properties. The key <instance_geometry> and <instance_node> subnodes represent which geometry the node refers to, where the URLs correspond to <library_geometries> and < IDs in <geometry> and <node> nodes that appear in library_nodes>
(3) The structure of the entire model is easily established by recursive <library_visual_scenes> and the node hierarchy of <library_nodes> (if any).
Note: Setting the ID of node to the Name property of the object is easy to debug
(4) node and its child node implement position, rotation, and scaling properties through matrix multiplication

Skin Controller:<library_controllers>
(1) The properties of the <skin> child node source indicates the geometric model ID of the skinning controller
(2) <skin> sub-nodes: <bind_shape_matrix> acts on the entire geometric model of the matrix, that is, the human appearance of the entire skeleton on the face <joins> there are two input, The semantic properties are joint and Inv_bind_matrix, respectively, representing the URL of the bone node name information source, the URL of the transformation matrix for each bone <vertex_weights> two input below. Joint and weight represent the source ID of the node name, respectively, and the function weight source ID

(3) In short, imagine that a model has multiple fixed points, and a vertex is generally affected by multiple bone nodes, so you need to know the bone ID of a vertex and the corresponding weight
(4) The Count of the <vertex_weights> node represents the number of vertices. <vertex_weights> the first value of the child node Vcount, which indicates that the first vertex is affected by several bones

e.g
<vcount>
    3 6 4 ...
.. </vcount>
<v>
    1 2 0 3 4
</v>
//<vcount> 3 for the first three sets of data in <v>: 34 1, 35 2, 0
//of which 34 corresponds to the joint,1 corresponding to the weight
//The first vertex is affected by 3 bones. The index of the first bone is 34, and the bone Weight is index 1 (221 groups)

(1) Each geometry model (geometry) has several source data Objects (source) sources
Floatsource Idrefsource Namesource
(2) Each geometric model (geometry) also has several primitive objects (primitive) primitive
Lineset polylist
Polygones Triangleset

<lines>
    <input semantic= "VERTEX" ..../>
    <p>0 1</p>
</lines>
// Note: These data are just index values, not real values
<triangles>
    <input semantic= "VERTEX" source= "# ..."/>
    <input semantic= "NORMAL" source= "# ..." />
    <p>0 0 1 0 2 0</p>
</triangles>
//Each three index group determines a triangle in which each index group (e.g [0 0])
// The first 0 represents the index of the vertex (the index number starts at 0), and the vertex is (x, Y, z), which is the index of three values for one vertex
//second 0 for vertex normals
Read <library_images> under the <image> node "id", under the ID of the <init_from> store the full path of the map, and then according to the ID value up, go to <library_ Effects> to find the true material value in <library_effects> sub-nodes <effect>, various parameters such as "Emission (radiant)", "Ambient (ambient Light)", " Diffuse (diffuse light) "," Transparency (transparency) "in <lambert> node (Lambert: Lambert, Brightness unit)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.