Closed marekjedrzejewski closed 5 years ago
/ping @gkjohnson
I worked around it by adding profile="" to technique in extra in generated file and Blender and Sketchup imports it fine now.
It looks like profile
is a required attribute for <technique>
in the spec (see page 5-122) so we should probably add that to the "technique" node.
This wiki on Collada extension describes "profile" as the platform or application that the extra information is relevant to but double sidedness is pretty general. Issue #2280 gives examples of "MAYA" and "GOOGLEEARTH". Maybe we should just export "THREEJS"? It looks like profile
is not allowed to be empty.
<extra>
<technique profile="THREEJS">
<double_sided sid="double_sided" type="int">1</double_sided>
</technique>
</extra>
Maybe we should just export "THREEJS"?
As far as I understand the spec, the value can be arbitrary. So THREEJS
sounds good to me.
@marekjedrzejewski Can SweetHome3d load the file if the profile field is set to a non-empty string?
@marekjedrzejewski Can SweetHome3d load the file if the profile field is set to a non-empty string?
Unfortunately not, I think it's not connected to technique tag. I also tried to remove whole extra before, which loaded fine in blender and sketchup too, but sweethome3d also didn't work with this. I will try with some really simple models tommorow, cause collada exported from blender works. If I'll use something simple, then it would be easy to see differences berween the one from blender and one from threejs.
@marekjedrzejewski
Okay -- I'm unfamiliar with SweetHome3d but feel free to open another issue if you find more details on what's causing the problem.
For reference here are the Collada loader source for that project:
Found it. It's problem with empty names. I opened pull request here: https://github.com/mrdoob/three.js/pull/17291
Exported Collada file crashes Blender and Sketchup
Problem can be seen even with example in documentation: https://threejs.org/examples/?q=collada#misc_exporter_collada
I tried several different 3d programs and Modo, Max, Maya and Archicad handles exported file just fine, Blender and Sketchup crashes and SweetHome3d just refuses to import the model. I worked around it by adding
profile=""
to technique in extra in generated file and Blender and Sketchup imports it fine now.I don't know if that's not breaking something elsewhere, but from what I've seen it's fine. SweetHome3d still doesn't import it, but I don't know how to debug it as nothing comes up in console.
Three.js version
Browser
OS