Results 1 to 3 of 3

Thread: Texture matrix

  1. #1
    Junior Member
    Join Date
    Oct 2008

    Texture matrix

    What's the appropriate way to write out the texture matrix to a dae file?
    What is, I want to define a <matrix> element that is only applied to the vertex input of the bound material, but not the vertex positions and normals of the instance geometry.
    If I have the following library of nodes:
    Code :
        <node id="ID3" name="component_0">
          <instance_geometry url="#ID4">
                <instance_material symbol="Material1" target="#ID5">
                  <bind_vertex_input input_semantic="TEXCOORD" input_set="0" semantic="UVSET0"/>
    how would I write the texture matrix that would be applied to the uv coords?

  2. #2

    Re: Texture matrix


    If I understand you correctly, you would like to have e.g. a 2x2 matrix that will be applied to the 2 dimensional uv coordinates? Than these transformed uv coordinates will be used to place the texture?

    Such a transformation is not supported in COLLADA. We have encountered the same problem, while writing our COLLADAMax and COLLADAMaya plug-ins, as both, 3ds Max and Maya, support rotation and translation of uv coordinates.
    Something that Google wants to champion in the 1.5.1 specification?


  3. #3
    Senior Member
    Join Date
    Aug 2004

    Re: Texture matrix

    Actually, you can store the texture matrix as a <newparam> in the scope of <effect> and also in any COLLADA FX profile except for <profile_BRIDGE>.

    For this use-case, In <effect> scope it can be any supported matrix size. While in <profile_COMMON> the type of parameter can at most be a float4 which is sufficient storage for a 2x2 matrix. You can build a larger matrix using more then one parameter.

    Inside <bind_material> you can use <param> to assist in resolving the binding too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean