Skip to main content
GameDev.net gamedev.net
🔒 Locked

Collada load object - polygons element

Started by martinperry Sep 18, 2010 at 8:39 AM 1 replies 1.3k views
Original Post
martinperry
martinperry
Hi,

I have problem with collada import
	<geometry id="Cube-Geometry" name="Cube-Geometry">			<mesh>				<source id="Cube-Geometry-Position">					<float_array count="24" id="Cube-Geometry-Position-array">1.00000 1.00000 -1.00000 (.... etc)</float_array>					<technique_common>						<accessor count="8" source="#Cube-Geometry-Position-array" stride="3">							<param type="float" name="X"></param>							<param type="float" name="Y"></param>							<param type="float" name="Z"></param>						</accessor>					</technique_common>				</source>				<source id="Cube-Geometry-Normals">					<float_array count="18" id="Cube-Geometry-Normals-array">0.00000 0.00000 -1.00000 0.00000 -0.00000 1.00000 1.00000 -0.00000 0.00000 -0.00000 (.... etc )</float_array>					<technique_common>						<accessor count="6" source="#Cube-Geometry-Normals-array" stride="3">							<param type="float" name="X"></param>							<param type="float" name="Y"></param>							<param type="float" name="Z"></param>						</accessor>					</technique_common>				</source>				<vertices id="Cube-Geometry-Vertex">					<input semantic="POSITION" source="#Cube-Geometry-Position"/>				</vertices>				<polygons count="6" material="Material">					<input offset="0" semantic="VERTEX" source="#Cube-Geometry-Vertex"/>					<input offset="1" semantic="NORMAL" source="#Cube-Geometry-Normals"/>					

0 0 1 0 2 0 3 0

4 1 7 1 6 1 5 1

0 2 4 2 5 2 1 2

1 3 5 3 6 3 2 3

2 4 6 4 7 4 3 4

4 5 0 5 3 5 7 5

</polygons> </mesh> </geometry>


From Blender I got this.
Problem is with and

element. "Faces" are not triangles, but quads :/ How could that be converted to triangleList for usage with DX IndexBuffer ?

[Edited by - martinperry on September 18, 2010 11:13:57 AM]

Juanxo
Juanxo
Blender gives you an option to transform all polygons to triangles when exporting.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.