PDA

View Full Version : Blender XML Export



steff517
04-17-2009, 12:20 AM
Hi,

I'm a beginner and I created a simple object with blender and exported to xml. My sample program parses the XML. The object appears in the scene but is plain white. In blender it had a colored surface. Is the color information exported with XML or not? It's not a picture texture but just a simple color.
How can I get this color surface in openGL?

Thanks,
Steff517

ZbuffeR
04-17-2009, 01:06 AM
"exported to xml" -> which format ?

steff517
04-17-2009, 01:27 AM
The file looks like this:


<scene>
<mesh name="figure">
<vertex>228.662903, -91.278587, 168.798706, -0.373669, 0.843959, -0.384777, 0.000000, 0.000000</vertex>
<vertex>228.494995, -91.040688, 170.561401, -0.738151, 0.441237, -0.510300, 0.000000, 0.000000</vertex>
<vertex>229.647995, -90.822609, 169.408493, -0.509140, 0.571154, -0.643818, 0.000000, 0.000000</vertex>
<vertex>230.512497, -90.701797, 169.067596, -0.175787, 0.467299, -0.866421, 0.000000, 0.000000</vertex>

...

<face vcount="3" uv="1">4338, 4335, 4336, 0, 0.000000, -1.000000, 0.000047, 3.784697, 6.159583, 3.108985, 6.288667, 3.108985, -5.288670, 0.000000, 0.000000</face>
<face vcount="3" uv="1">4312, 4311, 4339, 0, 0.000000, -1.000000, -0.000027, 4.838585, 5.739711, 3.784697, 5.941038, 3.784697, -4.941042, 0.000000, 0.000000</face>
<face vcount="3" uv="1">4339, 4313, 4312, 0, 0.000000, -1.000000, -0.000027, 3.784697, -4.941042, 4.838585, -4.739717, 4.838585, 5.739711, 0.000000, 0.000000</face>

</mesh>
</scene>

ZbuffeR
04-17-2009, 02:03 AM
This does not look to have color information.
vertex : pos x y z, normal x y z, texcoord s t
face : vertexid 1 2 3, ? , normal, ? ? ? ? ? ?, texcoord s t

Anyways, that not what I meant by "which format".
Where did you click in blender to select the export to this particular xml format ?