Game Development Community

ASE exporter issue

by Steve Acaster · in pureLIGHT · 08/26/2010 (1:50 am) · 4 replies

Whilst exporting an ASE file (created from PL's Blender ASE Exporter) I found that the final LMX_COLLADA file, though fine in PL, is exported with LMCOORDs overwriting TEXCOORDs, thus causing the mesh's diffuse texture to use the lightmaps UVmap coordinates.
<triangles material="detachedhouse_Module_Common_LMX_detached1props-Material2" count="1664">
					<input semantic="VERTEX" offset="0" source="#detachedhouse_Module_Common_LMX_detached1props-Vertex"/>
					<input semantic="NORMAL" offset="1" source="#detachedhouse_Module_Common_LMX_detached1props-Normal"/>
					<input semantic="TEXCOORD" offset="2" set="0" source="#detachedhouse_Module_Common_LMX_detached1props-LMCOORD"/>//LMcoord should be Texcoord!
					<input semantic="TEXCOORD" offset="3" set="1" source="#detachedhouse_Module_Common_LMX_detached1props-LMCOORD"/>
Should be -
<triangles material="detachedhouse_Module_Common_LMX_detached1props-Material2" count="1664">
					<input semantic="VERTEX" offset="0" source="#detachedhouse_Module_Common_LMX_detached1props-Vertex"/>
					<input semantic="NORMAL" offset="1" source="#detachedhouse_Module_Common_LMX_detached1props-Normal"/>
					<input semantic="TEXCOORD" offset="2" set="0" source="#detachedhouse_Module_Common_LMX_detached1props-TEXCOORD"/>//should be this!
					<input semantic="TEXCOORD" offset="3" set="1" source="#detachedhouse_Module_Common_LMX_detached1props-LMCOORD"/>

Only happens with meshes that were imported as ASEs, importing as DAE exports as expected.

Thankfully, even this non-coder can peek inside a COLLADA file and check the differences with a working one!

edit
title edited to reflect proper issue - see below

#1
08/26/2010 (4:40 pm)
What it is doing here, is for any meshes that don't have a texture assigned to them, it clones the lightmap coordinates onto both channels. This would cause problems when adding a texture after the fact though.

I'll see what happens if I change it.

Edit: If there is no texture on the mesh, the lightmap is also being set up on CHANNEL0 (look up in the <library_effects> section).
#2
08/26/2010 (4:55 pm)
Quick test shows that Torque imports it correctly once I change this and you can add a diffuse texture to a previously untextured mesh just fine.
#3
08/26/2010 (5:00 pm)
For some reason my material's texture names never make it into PL with ase import, - they either crash PreLight if I have the full Blender material and textures linked, or the materials come through unnamed - so I have to add the textures to the materials inside PureLight.

edit:
actually that crash is caused by the bitmap coming out as *BITMAP "//my_texture.png"


double edit!

Okay, the actual issue is that the ase exporter is throwing in 2 //'s in the ase file instead of just having *BITMAP "my_texture.png", which works fine...
#4
08/26/2010 (5:30 pm)
Can you send us an example .blend file with this issue? I'm getting normal file paths without any //'s in them. And what version of Blender are you using? (I tested using 2.49) The 2.5 series are all still in beta right?

In any event, I can make it so that a double // at the front of a texture name won't cause problems.