DAE import with lightmaps
by Adam Billyard · in Technical Issues · 05/23/2013 (10:06 am) · 3 replies
Hi,
I develop a lighting plugin called "LightUp" which exports your model + baked lighting to DAE and FBX format files. Unity imports the multi-layer FBX materials no problem, but I'm having trouble getting Torque to import the .dae correctly.
Looking at the DAE parser source, Torque appears to honor the set= attribute, yet even if I export a .dae with just lightmaps, 2 sets of UVs and bind to the second UV set - which should get me a 'lighting only' imported model, I still get the UV0 coordinates.
So the file has something like this:
<instance_material symbol="LULMAP0" target="#LIGHTMAP0">
<bind_vertex_input semantic="UVSET1" input_semantic="TEXCOORD" input_set="1" />
</instance_material>
where the geometry has been defined as:
<triangles count="12" material="LULMAP0">
<input offset="0" semantic="VERTEX" source="#vert0" />
<input offset="0" semantic="TEXCOORD" source="#uv0_0" set="0" />
<input offset="0" semantic="TEXCOORD" source="#uv1_0" set="1" />
<p>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
</p>
</triangles>
Has anyone get any example DAE files that have multiple UVs that Torque can import that I could look at?
Thanks
Adam
I develop a lighting plugin called "LightUp" which exports your model + baked lighting to DAE and FBX format files. Unity imports the multi-layer FBX materials no problem, but I'm having trouble getting Torque to import the .dae correctly.
Looking at the DAE parser source, Torque appears to honor the set= attribute, yet even if I export a .dae with just lightmaps, 2 sets of UVs and bind to the second UV set - which should get me a 'lighting only' imported model, I still get the UV0 coordinates.
So the file has something like this:
<instance_material symbol="LULMAP0" target="#LIGHTMAP0">
<bind_vertex_input semantic="UVSET1" input_semantic="TEXCOORD" input_set="1" />
</instance_material>
where the geometry has been defined as:
<triangles count="12" material="LULMAP0">
<input offset="0" semantic="VERTEX" source="#vert0" />
<input offset="0" semantic="TEXCOORD" source="#uv0_0" set="0" />
<input offset="0" semantic="TEXCOORD" source="#uv1_0" set="1" />
<p>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
</p>
</triangles>
Has anyone get any example DAE files that have multiple UVs that Torque can import that I could look at?
Thanks
Adam
About the author
Been involved in video games dev since the dawn of time, well 1979.
#2
OK, and this comes in with just albedo too.. try it for yourself.
I'm thinking I'm going to have to make LightUp also output a material.cs to specify the lightmap slots.
Is there any scripting support during importing in Torque? ie a hook I could run some code to fixup the materials..
05/23/2013 (1:07 pm)
ThanksOK, and this comes in with just albedo too.. try it for yourself.
I'm thinking I'm going to have to make LightUp also output a material.cs to specify the lightmap slots.
Is there any scripting support during importing in Torque? ie a hook I could run some code to fixup the materials..
#3
See this post:
https://www.garagegames.com/community/forums/viewthread/135752
12/05/2013 (2:17 pm)
Just to circle back on this thread. I've now got lit models importing from SketchUp to Torque3D.See this post:
https://www.garagegames.com/community/forums/viewthread/135752
Associate Steve Acaster
[YorkshireRifles.com]
yorks.deta.in/download/LMA_chapel_int.dae
Hope it helps.