Global tangent vectors do not work, assertion when loading

Rak'kar

26-04-2007 20:49:47

On the export screen, if I select "Global Options / Build Tangent Vectors" Tangent vectors are not built. This option does nothing. The lengths of the tangent vectors in the mesh are 0.

If I select the object, check "Generate tangent vectors" then tangent vectors do get built, but the loader asserts because the osm generated is invalid on this line:

<property 1="_TANGENTVECTORS" />

Here are the logs with both options checked.

.osm

<oe_scene>
<sceneManager type="1" />
<bkgcolor r="0" g="0" b="0" />
<lightColor r="0" g="0" b="0" />
<shadowTechnique type="0" tex_size="512" tex_count="1">
<color r="0" g="0" b="0" />
</shadowTechnique>
<entities>
<entity name="NimbleFighterBody01" hidden="false" filename="NimbleFighterBody01.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property type="FighterHull_TANGENTVECTORS" />
<property 1="_TANGENTVECTORS" />
</properties>
</entity>
<entity name="NimbleFighterPhysicsHull01" hidden="false" filename="NimbleFighterPhysicsHull01.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property physicsShape="ConvexMesh" />
<property physicsType="Collidable" />
</properties>
</entity>
<entity name="NimbleFighterShield01" hidden="false" filename="NimbleFighterShield01.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property type="FighterShield" />
</properties>
</entity>
</entities>
<helpers>
<helper name="NimbleFighterExplosionNodes01">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/damageBurn" />
<property chance="1" />
<property trigger="ExplosionStart" />
</properties>
</helper>
<helper name="NimbleFighterRotateCCW01">
<position x="2.0343964" y="-0.42324659" z="0.43303883" />
<rotation x="0" y="0" z="-0.043619387" w="-0.99904823" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/CCWThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="CCWThrust" />
</properties>
</helper>
<helper name="NimbleFighterRotateCW02">
<position x="-2.1421578" y="-0.37153697" z="0.4330388" />
<rotation x="0" y="0" z="0.043619469" w="-0.99904817" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/CWThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="CWThrust" />
</properties>
</helper>
<helper name="NimbleFighterReverseThrust03">
<position x="-2.0806942" y="-0.50928688" z="0.43303883" />
<rotation x="0" y="0" z="-0.08715564" w="-0.99619472" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/ReverseThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="ReverseThrust" />
</properties>
</helper>
<helper name="NimbleFighterReverseThrust04">
<position x="1.9659176" y="-0.50928688" z="0.43303883" />
<rotation x="0" y="0" z="0.087155744" w="-0.99619472" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/ReverseThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="ReverseThrust" />
</properties>
</helper>
<helper name="NimbleFighterForwardThrust03">
<position x="-1.1" y="-7.0624328" z="0.40747193" />
<rotation x="0" y="0" z="-0.99619472" w="0.087155804" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/ForwardThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="ForwardThrust" />
</properties>
</helper>
<helper name="NimbleFighterForwardThrust04">
<position x="1.1978525" y="-7.1274872" z="0.40747193" />
<rotation x="0" y="0" z="-0.99619472" w="-0.087155655" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/ForwardThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="ForwardThrust" />
</properties>
</helper>
<helper name="NimbleFighterRotateCCW02">
<position x="-1.0999999" y="-7.2166467" z="0.40747193" />
<rotation x="0" y="0" z="-0.99619472" w="0.087155655" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/CCWThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="CCWThrust" />
</properties>
</helper>
<helper name="NimbleFighterRotateCW03">
<position x="1.1884451" y="-7.1784229" z="0.40747193" />
<rotation x="0" y="0" z="-0.99619472" w="-0.087155737" />
<scale x="1" y="1" z="1" />
<properties>
<property ParSys="ParSys/CWThrust" />
<property chance="1" />
<property startDelay="0" />
<property trigger="CWThrust" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountLight01">
<position x="4.1759185e-007" y="6.1528344" z="-0.016442034" />
<rotation x="0" y="1" z="-0" w="-7.5497901e-008" />
<scale x="1" y="1" z="1" />
<properties>
<property type="LightWeaponMount1" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountLight02">
<position x="0.77009708" y="7.6999998" z="8.509258e-008" />
<rotation x="0" y="1" z="-0" w="-7.5497901e-008" />
<scale x="1" y="1" z="1" />
<properties>
<property type="LightWeaponMount2" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountLight03">
<position x="-0.76588362" y="7.6999998" z="8.509258e-008" />
<rotation x="0" y="1" z="-0" w="-7.5497901e-008" />
<scale x="1" y="1" z="1" />
<properties>
<property type="LightWeaponMount3" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountHeavy04">
<position x="0" y="-4.0860167" z="2.0925152" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<properties>
<property type="HeavyWeaponMount1" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountMedium01">
<position x="3.7599297" y="-1.9819703" z="-0.23423904" />
<rotation x="-9.4593695e-008" y="-0.25881913" z="2.5346315e-008" w="-0.96592581" />
<scale x="1" y="1" z="1" />
<properties>
<property type="MediumWeaponMount1" />
</properties>
</helper>
<helper name="NimbleFighterWeaponMountMedium02">
<position x="-3.7983496" y="-1.9819703" z="-0.1714949" />
<rotation x="0" y="0.96592587" z="-0" w="0.25881892" />
<scale x="1" y="1" z="1" />
<properties>
<property type="MediumWeaponMount2" />
</properties>
</helper>
</helpers>
<lights>
<light name="NimbleFighterLight" type="omni" on="true" CastShadows="no" intensity="0.4">
<position x="0" y="0" z="50" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<color r="0.4" g="0.4" b="0.4" />
<specular r="0.4" g="0.4" b="0.4" />
<attenuation range="250" constant="0" linear="0.4" quadratic="0" />
</light>
</lights>
</oe_scene>


oExporter.log

12:40:45: == Exporting Objects ==

12:40:45: Exporting Object: NimbleFighterBody01

12:40:45: Object has 1 texture sets

12:40:45: Compiling material NimbleFighterMaxMaterial

12:40:45: New texture unit Nimble01DM.dds

12:40:45: Building Tangent Vectors....
12:40:45: done

12:40:45: Mesh: NimbleFighterBody01_mesh.... done

12:40:45: Exporting Helper: NimbleFighterExplosionNodes01
12:40:45: , of type: PointHelper

12:40:45: Exporting Object: NimbleFighterPhysicsHull01

12:40:45: Compiling material NimbleFighterPhysicsHull01_mesh_material

12:40:45: Building Tangent Vectors....
12:40:45:
Unable to create tangent vectors

12:40:45: Object dont have texture coords

12:40:45: Mesh: NimbleFighterPhysicsHull01_mesh.... done

12:40:45: Exporting Object: NimbleFighterShield01

12:40:45: Object has 1 texture sets

12:40:45: Compiling material NimbleFighterShield01_mesh_material

12:40:45: Building Tangent Vectors....
12:40:45: done

12:40:45: Mesh: NimbleFighterShield01_mesh.... done

12:40:45: Exporting Helper: NimbleFighterRotateCCW01
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterRotateCW02
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterReverseThrust03
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterReverseThrust04
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterForwardThrust03
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterForwardThrust04
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterRotateCCW02
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterRotateCW03
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountLight01
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountLight02
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountLight03
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountHeavy04
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountMedium01
12:40:45: , of type: PointHelper

12:40:45: Exporting Helper: NimbleFighterWeaponMountMedium02
12:40:45: , of type: PointHelper

12:40:45:
== Exporting Materials ==


ogre.log

12:40:45: Creating resource group General
12:40:45: Creating resource group Internal
12:40:45: Creating resource group Autodetect
12:40:45: Registering ResourceManager for type Mesh
12:40:45: Registering ResourceManager for type Skeleton
12:40:45: Registering ResourceManager for type Material
12:40:45: Material NimbleFighterMaxMaterial was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
12:40:45: MaterialSerializer : writing material NimbleFighterMaxMaterial to queue.
12:40:45: MaterialSerializer : parsing texture layer.
12:40:45: MaterialSerializer : done.
12:40:45: WARNING: Mesh instance 'NimbleFighterBody01_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
12:40:45: MeshSerializer writing mesh data to NimbleFighterBody01.mesh...
12:40:45: File header written.
12:40:45: Writing mesh data...
12:40:45: Writing submesh...
12:40:45: Exporting submesh texture aliases...
12:40:45: Submesh texture aliases exported.
12:40:45: Submesh exported.
12:40:45: Exporting bounds information....
12:40:45: Bounds information exported.
12:40:45: Exporting submesh name table...
12:40:45: Submesh name table exported.
12:40:45: Mesh data exported.
12:40:45: MeshSerializer export successful.
12:40:45: Material NimbleFighterPhysicsHull01_mesh_material was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
12:40:45: MaterialSerializer : writing material NimbleFighterPhysicsHull01_mesh_material to queue.
12:40:45: MaterialSerializer : done.
12:40:45: WARNING: Mesh instance 'NimbleFighterPhysicsHull01_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
12:40:45: MeshSerializer writing mesh data to NimbleFighterPhysicsHull01.mesh...
12:40:45: File header written.
12:40:45: Writing mesh data...
12:40:45: Writing submesh...
12:40:45: Exporting submesh texture aliases...
12:40:45: Submesh texture aliases exported.
12:40:45: Submesh exported.
12:40:45: Exporting bounds information....
12:40:45: Bounds information exported.
12:40:45: Exporting submesh name table...
12:40:45: Submesh name table exported.
12:40:45: Mesh data exported.
12:40:45: MeshSerializer export successful.
12:40:45: Material NimbleFighterShield01_mesh_material was requested with isManual=true, but this is not applicable for materials; the flag has been reset to false
12:40:45: MaterialSerializer : writing material NimbleFighterShield01_mesh_material to queue.
12:40:45: MaterialSerializer : done.
12:40:45: WARNING: Mesh instance 'NimbleFighterShield01_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
12:40:45: MeshSerializer writing mesh data to NimbleFighterShield01.mesh...
12:40:45: File header written.
12:40:45: Writing mesh data...
12:40:45: Writing submesh...
12:40:45: Exporting submesh texture aliases...
12:40:45: Submesh texture aliases exported.
12:40:45: Submesh exported.
12:40:45: Exporting bounds information....
12:40:45: Bounds information exported.
12:40:45: Exporting submesh name table...
12:40:45: Submesh name table exported.
12:40:45: Mesh data exported.
12:40:45: MeshSerializer export successful.
12:40:45: Unregistering ResourceManager for type Mesh
12:40:45: Unregistering ResourceManager for type Skeleton
12:40:45: Unregistering ResourceManager for type Material

Lioric

26-04-2007 22:50:25

I will review this immediately

Lioric

28-04-2007 17:39:08

Actually Generate Global Tangent Vectors are working correctly, probably your tangent buffer is empty because tangent vectors are created in the TextureCoord buffer, as Dagon version used this method as default (create Tangent vectors in Texcoord buffers), and some existing might users rely on this support

We will do some tests to implement an optional setting to define where the tangent vectors are created

Rak'kar

28-04-2007 18:32:53

What about the problem where I can't even load the OSM with the OSM loader from assert I pointed out?

Lioric

01-05-2007 02:06:21

Could you post or send me the "User Properties" text of the "NimbleFighterBody01" object?

It seems the properties were manually modified and this produced an incorrect properties string

In any case, we will add additional tests to verify the integrity of prop strings, and export only correct properties

Rak'kar

02-05-2007 17:51:26

type=FighterHull