Skip to main content
deleted 493 characters in body
Source Link
Ninjabdou
  • 371
  • 2
  • 8
 <library_images><library_effects>
<image<effect id="Diff_png"id="Material-effect">
 name="Diff_png"> <profile_COMMON>
  <init_from>Diff.png<  <newparam sid="Diff_png-surface">
      <surface type="2D">
        <init_from>Diff_png</init_from>
      </surface>
    </image>newparam>
<image id="Normal" name="Normal">  <newparam sid="Diff_png-sampler">
  <init_from>Normal.png<    <sampler2D>
        <source>Diff_png-surface</source>
      </sampler2D>
    </newparam>
    <newparam sid="Spec-surface">
      <surface type="2D">
        <init_from>Spec</init_from>
      </surface>
    </image>newparam>
<image id="Spec" name="Spec">  <newparam sid="Spec-sampler">
  <init_from>Spec.png<    <sampler2D>
        <source>Spec-surface</source>
      </sampler2D>
    </newparam>
    <newparam sid="Normal-surface">
      <surface type="2D">
        <init_from>Normal</init_from>
      </surface>
    </image>newparam>
    <newparam sid="Normal-sampler">
      <sampler2D>
        <source>Normal-surface</source>
      </sampler2D>
    </newparam>
    <technique sid="common">
      <phong>
        <emission>
          <color sid="emission">0 0 0 1</color>
        </emission>
        <ambient>
          <color sid="ambient">0 0 0 1</color>
        </ambient>
        <diffuse>
          <texture texture="Diff_png-sampler" texcoord="UVMap"/>
        </diffuse>
        <specular>
          <texture texture="Spec-sampler" texcoord="UVMap"/>
        </specular>
        <shininess>
          <float sid="shininess">50</float>
        </shininess>
        <index_of_refraction>
          <float sid="index_of_refraction">1</float>
        </index_of_refraction>
      </phong>
      <extra>
        <technique profile="FCOLLADA">
          <bump>
            <texture texture="Normal-sampler" texcoord="UVMap"/>
          </bump>
        </technique>
      </extra>
    </technique>
  </profile_COMMON>
</effect>

</library_images> <library_effects> <profile_COMMON> <init_from>Diff_png</init_from> Diff_png-surface <init_from>Spec</init_from> Spec-surface <init_from>Normal</init_from> Normal-surface 0 0 0 1 0 0 0 1 50 <index_of_refraction> 1 </index_of_refraction> </profile_COMMON> </library_effects> <library_materials> <instance_effect url="#Material-effect"/> </library_materials>

 <library_images>
<image id="Diff_png" name="Diff_png">
  <init_from>Diff.png</init_from>
</image>
<image id="Normal" name="Normal">
  <init_from>Normal.png</init_from>
</image>
<image id="Spec" name="Spec">
  <init_from>Spec.png</init_from>
</image>

</library_images> <library_effects> <profile_COMMON> <init_from>Diff_png</init_from> Diff_png-surface <init_from>Spec</init_from> Spec-surface <init_from>Normal</init_from> Normal-surface 0 0 0 1 0 0 0 1 50 <index_of_refraction> 1 </index_of_refraction> </profile_COMMON> </library_effects> <library_materials> <instance_effect url="#Material-effect"/> </library_materials>

 <library_effects>
<effect id="Material-effect">
  <profile_COMMON>
    <newparam sid="Diff_png-surface">
      <surface type="2D">
        <init_from>Diff_png</init_from>
      </surface>
    </newparam>
    <newparam sid="Diff_png-sampler">
      <sampler2D>
        <source>Diff_png-surface</source>
      </sampler2D>
    </newparam>
    <newparam sid="Spec-surface">
      <surface type="2D">
        <init_from>Spec</init_from>
      </surface>
    </newparam>
    <newparam sid="Spec-sampler">
      <sampler2D>
        <source>Spec-surface</source>
      </sampler2D>
    </newparam>
    <newparam sid="Normal-surface">
      <surface type="2D">
        <init_from>Normal</init_from>
      </surface>
    </newparam>
    <newparam sid="Normal-sampler">
      <sampler2D>
        <source>Normal-surface</source>
      </sampler2D>
    </newparam>
    <technique sid="common">
      <phong>
        <emission>
          <color sid="emission">0 0 0 1</color>
        </emission>
        <ambient>
          <color sid="ambient">0 0 0 1</color>
        </ambient>
        <diffuse>
          <texture texture="Diff_png-sampler" texcoord="UVMap"/>
        </diffuse>
        <specular>
          <texture texture="Spec-sampler" texcoord="UVMap"/>
        </specular>
        <shininess>
          <float sid="shininess">50</float>
        </shininess>
        <index_of_refraction>
          <float sid="index_of_refraction">1</float>
        </index_of_refraction>
      </phong>
      <extra>
        <technique profile="FCOLLADA">
          <bump>
            <texture texture="Normal-sampler" texcoord="UVMap"/>
          </bump>
        </technique>
      </extra>
    </technique>
  </profile_COMMON>
</effect>

</library_effects>

Source Link
Ninjabdou
  • 371
  • 2
  • 8

Blender export collada with normal map

I'm trying to export a collada file including maps, diffuse and specular work fine but normal map doesn't, I'm using the blender internal, I know exporting from cycles doesn't work, I check 'include material maps' when exporting, I set the normal map as 'normal' in the geometry section, I set the mapping, I even made the edit in the text editor like said in this thread: https://gamedev.stackexchange.com/questions/62245/blender-exporting-to-collada-assimp-and-normal-maps

This is the text of my file:

 <library_images>
<image id="Diff_png" name="Diff_png">
  <init_from>Diff.png</init_from>
</image>
<image id="Normal" name="Normal">
  <init_from>Normal.png</init_from>
</image>
<image id="Spec" name="Spec">
  <init_from>Spec.png</init_from>
</image>

</library_images> <library_effects> <profile_COMMON> <init_from>Diff_png</init_from> Diff_png-surface <init_from>Spec</init_from> Spec-surface <init_from>Normal</init_from> Normal-surface 0 0 0 1 0 0 0 1 50 <index_of_refraction> 1 </index_of_refraction> </profile_COMMON> </library_effects> <library_materials> <instance_effect url="#Material-effect"/> </library_materials>