View Single Post
Old 30th June 2021, 09:11 AM   #3
sam_hepworth
Junior Member
Junior member
 
Join Date: Feb 2006
Posts: 4
Default Re: Collada Export Crash AC3D

Hi Andy,

I am using version 8.6.11.
If both spheres have a texture it works.
If both spheres do not have a texture it works.
If one sphere has a texture and one do not then there is a crash.

I have also done some more research. It seems that the problem is related to objects without bitmap texture. If I create 3 spheres in AC3D where 2 spheres have a bitmap texture and 1 sphere only has a color then only the 2 spheres with a texture bitmap shows up in Sketchup. I have looked into the file exported by AC3D and have found something interesting. The object without a bitmap texture is has no material information at all (see my comment in the XML below). I think the problem is that AD3D creates a new material in the XML file for all used combinations of AC3D materials and bitmap textures. If an object does not have a bitmap texture then the exporter "forget" to create a material in the XML file without a bitmap texture and forget to insert this material in the node definition.

Example of export from AC3D (only the node part is included):

<node id="ID0inst" name="sphere">
<translate>-0.4 -0.3 0.45</translate>
<instance_geometry url="#ID0">
<bind_material>
<technique_common>
<instance_material symbol="acmat0" target="#acmat0">
<bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="ID1inst" name="sphere">
<translate>0.7 0.375 0.45</translate>
<instance_geometry url="#ID1">
<bind_material>
<technique_common>
<instance_material symbol="acmat1" target="#acmat1">
<bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="ID2inst" name="sphere">
<translate>-0.2 0.5 0.2</translate>
<instance_geometry url="#ID2">
<bind_material> <!-- All material information is missing -->
<technique_common>
</technique_common>
</bind_material>
</instance_geometry>
</node>

If I create 2 spheres without texture bitmaps then materials without texture bitmaps are exported correctly. So the problem is that the exporter exports materials incorrectly if some objects use texture bitmaps and some do not.

<node id="ID0inst" name="sphere">
<translate>-0.75 0.15 0.25</translate>
<instance_geometry url="#ID0">
<bind_material>
<technique_common>
<instance_material symbol="acmat0" target="#acmat0">
<bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="ID1inst" name="sphere">
<translate>0.2 -0.1 0.3</translate>
<instance_geometry url="#ID1">
<bind_material>
<technique_common>
<instance_material symbol="acmat1" target="#acmat1">
<bind_vertex_input semantic="TEX0" input_semantic="TEXCOORD" input_set="0" />
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
</node>


/sam
Attached Thumbnails
Click image for larger version

Name:	Bug.jpg
Views:	7
Size:	110.7 KB
ID:	3816  


Last edited by sam_hepworth; 30th June 2021 at 11:42 AM.
sam_hepworth is offline   Reply With Quote