### Blender to Torque Update

Level design, models, animations, physics, etc.

#### Blender to Torque Update

Steve_Yorkshire
Posts: 328
Joined: Tue Feb 03, 2015 10:30 pm

Update on getting Blender models into Torque as DAE. Just a few things I've noticed by paying attention to console spam.

Originally I just used the same COLLADA layout as Max with base01, start01, detail#, etc. (see image below)

Turns out Torque can never find the detail markers - however importing with "detectDTS" or "TrailingNumber", Torque still identifies the mesh LODs from the trailing numbers and just adds it's own detail nodes automatically. Also you don't need base01 or start01.

Console informs you of this:
Object mesh "meshLOD300" has no matching detail ("detail300" has been added automatically)
Object mesh "meshLOD200" has no matching detail ("detail200" has been added automatically)
Object mesh "meshLOD100" has no matching detail ("detail100" has been added automatically)
Object mesh "meshLOD2" has no matching detail ("detail2" has been added automatically)

The following image example will import LODs 300, 200, 100, and 2 just fine, with the console log informing you that detail nodes have been automatically added for each.

------------------------------------------------------------------------------

If models are scaled using mesh object scaling (eg: xyz scale = 0.01) this will trigger a console warning when importing.
Warning: <bind_shape_matrix> in Armature_meshLOD300-skin <controller> is not invertible (may cause problems with skinning)

I am not sure this warning actually does anything, as I have yet to see any problems - yet, in the great crusade against console spam, if you go into Blender edit mode and set scale to 1.0 and then manually resize and reposition the mesh to the correct scale - this warning will cease. Protip: duplicate the mesh so you have some reference of the correct scale and original position).

-------------------------------------------------------------------------------
Warning: Collada <lines> element in Untitled.008 is not supported.

Torque is complaining about the actual mesh geometry here and is referencing the actual "Mesh Data" of the object in Blender. You can discount the *.008 auto naming convention that Blender uses as the problem. This warning is caused by having an open mesh - eg: not hull sealed. So check those verts are joined!

---------------------------------------------------------------------------------

This has been a Public Information Broadcast on behalf of Frazzled Blender To Torque Devs Against Console Warnings ...

#### Re: Blender to Torque Update

Duion
Posts: 1370
Joined: Sun Feb 08, 2015 1:51 am

Why detail 16? I never understood that part. Some default models have lowest LOD at detail 2, but you can use anything. I use 1 I think.

Also I do not understand what bounds are for and why you have a shape file outside of the hierarchy.

#### Re: Blender to Torque Update

rlranft
Posts: 306
Joined: Thu Feb 05, 2015 3:11 pm

That is the size in rendered pixels at which the LOD system switches to that mesh. So, when the object is far enough away that it is 16 pixels across or less, that detail mesh LOD will be used for rendering.

Use whatever sizes work for you, but at 1 that mesh will not be displayed until the object is quite distant indeed....

#### Re: Blender to Torque Update

Duion
Posts: 1370
Joined: Sun Feb 08, 2015 1:51 am

@
rlranft

That was not my question, of course I know how it works, but the last detail level number is kind of irrelevant, since it is the last and it will never switch to another one below that anyway. So it could be 1 or 2 or 3 etc.
That is why I asked why some people use specific numbers. I found out that there is also a nulldetail level which can be used below that, so the model will not be displayed anymore at all, but even that is pointless, since the engine has a global pref variable, which can make all models disappear below a certain pixel rate, so the last detail level number is kind of meaningless anyway.
So I just use 1 now as the lowest detail level, which indeed it is.

#### Re: Blender to Torque Update

rlranft
Posts: 306
Joined: Thu Feb 05, 2015 3:11 pm

Any particular number used would be if the developer intended to allow the system to handle it in the default manner after that size was reached. For many cases it is irrelevant, as you point out. so using 16 would mean that the developer assumes that the end user would leave the settings such that this LOD would be reached, and also that this would be sufficient between this LOD range and default cull.

From my perspective you can use whatever number you want.

#### Who is online

Users browsing this forum: No registered users and 12 guests