Go Back   AC3D Forums > Technical > AC3D Bugs and Problems
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 29th June 2021, 06:32 PM   #1
sam_hepworth
Junior Member
Junior member
 
Join Date: Feb 2006
Posts: 4
Default Collada Export Crash AC3D

Hi,

Export as Collada file: AC3D crash when I export a scene with two spheres and one of the spheres has a texture. Example attached.

/sam.
Attached Files
File Type: ac Bug.ac (34.8 KB, 6 views)
sam_hepworth is offline   Reply With Quote
Old 30th June 2021, 04:33 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Collada Export Crash AC3D

Hi Sam,


Worked for me under Windows AC3D 8.6.11. Which version and platform are you using?
Andy is offline   Reply With Quote
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
Old 30th June 2021, 10:47 AM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Collada Export Crash AC3D

Thanks - I'll investigate
Andy is offline   Reply With Quote
Old 30th June 2021, 01:06 PM   #5
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Collada Export Crash AC3D

Please replace the plugin with this one:


http://inivis.com/external/test/collada_export126w.zip


Let me know if it fixes the problems.
Andy is offline   Reply With Quote
Old 1st July 2021, 01:41 PM   #6
sam_hepworth
Junior Member
Junior member
 
Join Date: Feb 2006
Posts: 4
Default Re: Collada Export Crash AC3D

Thanks Andy. I have done some initial testing and it seems to work

When I import to SketchUp from AC3D surfaces are only transparent on one side. I would like windows to be transparent on both sides. In order to make surfaces transparent on both sides I have to modify the XML a bit.

<polylist count="2" material="acmat0"> <!-- count="1" changed to count="2" -->
<input offset="0" semantic="VERTEX" source="#ID1-Vertex"/>
<input offset="1" semantic="NORMAL" source="#ID1-Normal"/>
<input offset="2" semantic="TEXCOORD" source="#ID1-TexCoord"/>
<vcount>
4
4 <!-- repeat form above -->
</vcount>
<p>
0 0 0 1 1 1 2 2 2 3 3 3
0 0 0 1 1 1 2 2 2 3 3 3 <!-- repeat from above -->
</p>
</polylist>

Is there a way for me to run a script on the exported XML after export? Or would you consider making it an option to export transparent surfaces that are transparent from both sides? For example if a surface is set to be 2 sided (visible from both sides) then it could be exported so that it is transparent from both sides, and if it set to be 1 sided then it is not?

Quote:
Originally Posted by Andy View Post
Please replace the plugin with this one:


http://inivis.com/external/test/collada_export126w.zip


Let me know if it fixes the problems.

Last edited by sam_hepworth; 6th July 2021 at 04:17 PM.
sam_hepworth is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 01:33 AM.


AC3D Forum
(C) Inivis Limited 2020