I finally figured out the YafaRay.xml code needed to get image textures to render correctly. The only part that I had wrong was the uv vector values as in <uv u="0.0" v="0.0"/>. After looking at the code exported from the Sketchup YafaRay plug-in I noticed that the code didn't have to be as complicated as the .xml code produced by Blender. I also noticed that it looked very much like the code exported by the Wings3D Pov-Ray plug-in. I wonder if the YafaRay.xml code is based on Pov-Ray??? The code needed for YafaRay is different in the "vertex vectors" section compared to Pov-Ray. If I am not mistaken the uv indices are simply references to the uv vector values??? Below is the code for the mesh section of the .xml code.
Edit: In the code below you will notice that the material is listed once. You can also list the material before each individual face. I am listing the material multiple times in the current version of the Wings3D YafaRay plug-in. Since it works, I will leave it that way for now.
This may not be specific to programming for Wings3D but it may help someone else in the future.
oort
Edit: In the code below you will notice that the material is listed once. You can also list the material before each individual face. I am listing the material multiple times in the current version of the Wings3D YafaRay plug-in. Since it works, I will leave it that way for now.
This may not be specific to programming for Wings3D but it may help someone else in the future.
oort
Quote:<!-- Section Objects -->
<mesh vertices="8" faces="12" has_uv="true" type="0">
<p x="-1.0" y="-1.0" z="-1.0"/>
<p x="1.0" y="-1.0" z="-1.0"/>
<p x="-1.0" y="-1.0" z="1.0"/>
<p x="1.0" y="-1.0" z="1.0"/>
<p x="-1.0" y="1.0" z="-1.0"/>
<p x="1.0" y="1.0" z="-1.0"/>
<p x="-1.0" y="1.0" z="1.0"/>
<p x="1.0" y="1.0" z="1.0"/>
<uv u="0.0000000000" v="0.333333"/>
<uv u="0.0" v="0.66666"/>
<uv u="0.0" v="1.0"/>
<uv u="0.0" v="0.3333333333"/>
<uv u="0.0" v="0.666666"/>
<uv u="0.0000000000" v="0.0"/>
<uv u="0.3333333333" v="0.3333333333"/>
<uv u="0.3333333333" v="0.3333333333"/>
<uv u="0.3333333333" v="0.6666666666"/>
<uv u="0.3333333333" v="1.00"/>
<uv u="0.3333333333" v="0.000"/>
<uv u="0.3333333333" v="0.3333333333"/>
<uv u="0.3333333333" v="0.6666666666"/>
<uv u="0.3333333333" v="0.00"/>
<uv u="0.3333333333" v="0.3333333333"/>
<uv u="0.6666666666" v="0.3333333333"/>
<uv u="0.6666666666" v="0.6666666666"/>
<uv u="0.6666666666" v="0.6666666666"/>
<uv u="0.6666666666" v="1.0"/>
<uv u="0.6666666666" v="0.0"/>
<uv u="0.6666666666" v="0.3333333333"/>
<set_material sval="w_Cube2_auv"/>
<f a="3" b="7" c="6" uv_a="5" uv_b="10" uv_c="6"/>
<f a="6" b="2" c="3" uv_a="6" uv_b="0" uv_c="5"/>
<f a="0" b="4" c="5" uv_a="16" uv_b="12" uv_c="11"/>
<f a="0" b="5" c="1" uv_a="16" uv_b="11" uv_c="15"/>
<f a="1" b="5" c="7" uv_a="3" uv_b="7" uv_c="8"/>
<f a="7" b="3" c="1" uv_a="8" uv_b="1" uv_c="3"/>
<f a="2" b="6" c="4" uv_a="9" uv_b="2" uv_c="4"/>
<f a="2" b="4" c="0" uv_a="9" uv_b="4" uv_c="8"/>
<f a="4" b="6" c="7" uv_a="17" uv_b="18" uv_c="9"/>
<f a="4" b="7" c="5" uv_a="17" uv_b="9" uv_c="8"/>
<f a="1" b="3" c="2" uv_a="19" uv_b="20" uv_c="14"/>
<f a="2" b="0" c="1" uv_a="14" uv_b="13" uv_c="19"/>
</mesh>
<smooth ID="0" angle="60.000"/>