• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
« Previous 1 2 3 4
YafaRay UV Cube XML Code

 
  • 1 Vote(s) - 5 Average
YafaRay UV Cube XML Code

oort
Offline

3D Obsessed

Posts: 1,184
Threads: 69
Joined: Nov 2012
#1
01-22-2013, 07:40 AM (This post was last modified: 01-22-2013, 06:55 PM by oort.)
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

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"/>
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)



Messages In This Thread
YafaRay UV Cube XML Code - by oort - 01-22-2013, 07:40 AM
RE: YafaRay UV Cube XML Code - by Wegg - 03-19-2013, 03:08 PM
RE: YafaRay UV Cube XML Code - by ggaliens - 03-20-2013, 04:36 PM
RE: YafaRay UV Cube XML Code - by oort - 03-20-2013, 04:57 PM
RE: YafaRay UV Cube XML Code - by ggaliens - 03-22-2013, 07:40 PM
RE: YafaRay UV Cube XML Code - by micheus - 03-26-2013, 06:36 PM
RE: YafaRay UV Cube XML Code - by oort - 03-26-2013, 07:31 PM
RE: YafaRay UV Cube XML Code - by Wegg - 03-27-2013, 03:35 AM
RE: YafaRay UV Cube XML Code - by micheus - 03-27-2013, 06:38 PM
RE: YafaRay UV Cube XML Code - by Wegg - 03-27-2013, 10:00 PM
RE: YafaRay UV Cube XML Code - by oort - 03-28-2013, 12:59 AM
RE: YafaRay UV Cube XML Code - by micheus - 03-28-2013, 04:18 AM
RE: YafaRay UV Cube XML Code - by ggaliens - 03-28-2013, 05:09 PM
RE: YafaRay UV Cube XML Code - by mljuboja - 10-24-2013, 05:10 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode