HOW DO I INTO EXPORTING VIA BLENDER 2.8 I CANNOT EVEN INTO BLENDER 2.8?

3rd party tools like asset generators, editors.
10 posts Page 1 of 1
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Sat Aug 17, 2019 10:09 pm
So there is a new version of Blender out, with some wholesale changes ... like left and right mouse buttons have been inverted for selection, space plays animations, 'A' is no longer a toggle but only select all and you have to use 'ALT A' to deselect all ...

But let's stick to the important stuff ... getting a rigged model, multiple meshes for LODs and an animation exported via COLLADA.

First up install Blender 3D version 2.8. I installed mine into a different directory than the previous 2.78c. This didn't matter as 2.8 deleted my older version anyway ... which was just f******* great.

Image

So, in the good old days, you'd have your armature, your LOD meshes parented to this armature via 'CTRL P' and select 'armature deform' so the meshes would be able to move with the armature bones via their vertex. This would automatically add the armature connection with vertex groups into the modifiers for the mesh.

Image

And it would look something kinda like that. SO let's export via the standard COLLADA exporter, apply modifiers and see how that works ...

Image

Okay maybe not ... :o

Let's try again without apply the modifier.

Image

Well, that's an ... improvement ..kinda ... :?

The obvious issue is some sort of magnification of scaling and rotation of nodes. :ugeek:

The solution is not to have the meshes parented to the armature, and just use the armature modifier for each mesh on it's own.

Image

But there's still a problem. There is a SECOND armature being exported. Torque renames this "armatureB" and it just sits on the model not doing anything.

Image

The solution to this is to go into the exporter's "extras" tab and select 'Sort By Object Name'.

Image

And then it all comes through as it should do ... hopefully. :mrgreen:

Image

The case is solve-ed!

Image
Duion
Posts: 1392
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Aug 20, 2019 6:58 pm
Are .blend files no longer working of why you need to use Collada?
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Thu Aug 22, 2019 1:38 am
Assimp has some problems with .blend files for 2.8, can read the file but seem to be unable to find objects to import.
Duion
Posts: 1392
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Thu Aug 22, 2019 2:45 am
What does that have to do with Assimp? You import .blend files into Blender and from Blender you export Collada files into Torque, or did I miss something?
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Thu Aug 22, 2019 3:22 am
Assimp could import .blend files pre-2.8 directly into Torque - which is what I thought you meant.

I'm exporting collada out of blender and into Torque - as usual, but the setup has changed in Blender 2.8.
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Sat Aug 31, 2019 11:23 pm
A note on exporting animations.

The new (it's actually still the old 1.4.1) Blender3D 2.8 COLLADA exporter has a whole lot of new options.

Image
Some of these options work better than others ...

Under the "Animation" tab, deselect "Include All Actions" as you only want a single "ambient" animation exporting, and tick "Keep Keyframes" or your animation isn't going anywhere.
Under the "Extra" tab, select "Sort By Object Name" to prevent duplicate armatures appearing, and select "Keep Bind Info" to prevent the above mangling from occuring.

And hopefully all will be well once it gets into Torque.

Image

:mrgreen:
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Thu Sep 05, 2019 3:28 pm
Image describing the export hierarchy:
Image
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Thu Sep 05, 2019 4:34 pm
Just a note on animations:

I export the character model without any animations. Select the armature, set the TimeLine to 0, go into the Dope Sheet->Action Editor and hit "x" to disable/deselect the current action, in armature Properties->Object Data put it in the Rest Position, then from the Viewport select Pose Mode, select all bones, in Pose tab Apply->Apply Visual Transform To Pose, back to the Properties->Object Data and deseclt Rest Position by pressing Pose Position button, and then select all objects that I want exporting and export. This way the character model exports without an ambient animation.

For export you only need selected the base01-start01-armature-bounds, no meshes, no LODs.

For each animation, I select it in the Dope Sheet->Action Editor. In the Timeline select the start and end frames - this is new to Blender 2.8 and it will either cut off your animation if it is too short or add empty frames if too long.

NOTE: keyframe 0 is the Rest Position, so animations start at 1. This helps with transforms, especially for blend animations. For a blend animation the root pose is 2, and the blend animation starts at 3.

For cyclic animations like run, 0 is the Rest Position, 1 is the start of the loop animation and the last frame is a copy of this. In tsShapeConstructor the start and end frames are selected, so for looping animations the end frame is the last minus 1.

So ehre's what the tsShapeConstructor looks like; note animations start at 1, thus missing the Rest Pose to help transforms, blends start at 2 to miss Rest Pose and Root pose reference, looping animations end at the frame before they finish so not to replay it, all other animations end at -1, the finish.

There are no Death, Head, Headside, or Look animations because this is set up for a topdown character who only shoots forwards.
singleton TSShapeConstructor(GunGirlPlayerDae)
{
   baseShape = "./gunGirlPlayer.dae";
   lodType = "TrailingNumber";
   loadLights = "0";
};

function GunGirlPlayerDae::onLoad(%this)
{
   %this.addSequence("./anims/gunGirlPlayer_landx.dae", "land", "1", "-1", "1", "0");
   %this.setSequenceCyclic("land", "0");
   %this.setSequencePriority("Land", "0");
   %this.addSequence("./anims/gunGirlPlayer_fallx.dae", "fall", "1", "-1", "1", "0");
   %this.setSequencePriority("Fall", "1");
   
   %this.addSequence("./anims/gunGirlPlayer_sprint_backwardx.dae", "sprint_backward", "1", "24", "1", "0");
   %this.setSequencePriority("sprint_backward", "2");
   %this.addSequence("./anims/gunGirlPlayer_sprint_left_sidex.dae", "sprint_side", "1", "24", "1", "0");
   %this.setSequencePriority("sprint_side", "3");
   %this.addSequence("./anims/gunGirlPlayer_sprint_right_sidex.dae", "sprint_right", "1", "24", "1", "0");
   %this.setSequencePriority("sprint_right", "4");
   %this.addSequence("./anims/gunGirlPlayer_sprint_forwardx_static.dae", "sprint_forward", "1", "16", "1", "0");
   %this.setSequencePriority("sprint_forward", "5");

   %this.addSequence("./anims/gunGirlPlayer_backx.dae", "back", "1", "98", "1", "0");
   %this.setSequencePriority("Back", "6");
   %this.addSequence("./anims/gunGirlPlayer_side_leftx.dae", "side", "1", "50", "1", "0");
   %this.setSequencePriority("Side", "7");
   %this.addSequence("./anims/gunGirlPlayer_side_rightx.dae", "side_right", "1", "50", "1", "0");
   %this.setSequencePriority("Side_Right", "8");
   %this.addSequence("./anims/gunGirlPlayer_runx.dae", "run", "1", "98", "1", "0");
   %this.setSequencePriority("Run", "9");
   %this.addSequence("./anims/gunGirlPlayer_rootBase.dae", "root", "1", "60", "1", "0");
   %this.setSequencePriority("root", "10");
   
   %this.addSequence("./anims/gunGirlPlayer_heavy_recoilx.dae", "heavy_recoil", "2", "-1", "1", "0");
   %this.setSequenceCyclic("heavy_recoil", "0");
   %this.setSequencePriority("heavy_recoil", "11");
   %this.setSequenceBlend("heavy_recoil", "1", "root", "0");

   %this.addSequence("./anims/gunGirlPlayer_medium_recoilx.dae", "medium_recoil", "2", "-1", "1", "0");
   %this.setSequenceCyclic("medium_recoil", "0");
   %this.setSequencePriority("medium_recoil", "12");
   %this.setSequenceBlend("medium_recoil", "1", "root", "0");
   
   %this.addSequence("./anims/gunGirlPlayer_light_recoilx.dae", "light_recoil", "2", "-1", "1", "0");
   %this.setSequenceCyclic("light_recoil", "0");
   %this.setSequencePriority("light_recoil", "13");
   %this.setSequenceBlend("light_recoil", "1", "root", "0");
}
Now note I use sequencePriorities just to make sure things don't have to think too much about what should be playing. These are based on what the engine would expect to play in order. eg: if Land comes before Fall because if you have landed you are no longer falling, etc
0 Death, Land, Head, Headside, Look
1 Fall
2 Jump
3 Crouch_Back
4 Crouch_Side
5 Crouch_Right
6 Crouch_Forward
7 Crouch_Root
8 Sprinting_Back
9 Sprinting_Side
10 Sprinting_Right
11 Sprinting_Forward
12 (Standing_)Back
13 (Standing_)Side
14 (Standing_)Right
15 (Standing_)Run
16 (Standing_)Root
17 Light_Recoil
18 Medium_Recoil
19 Heavy_Recoil
20+ Others after this...
So why export animations seperately?

If you export a single ambient animation, either on it's own, or with the character model, Torque has to load the entire animation EVERY TIME you want to add or modify a single animation and this takes time, even on my i7 there are seconds of twiddling thumbs while it loads it EVERY TIME. By having smaller, more numerous animations it's over in an instant, and you barely see the "loading collada animation" popup.

Secondly, if you have seperate animations you can reuse them for other character which have the same armature set up rather than loading the same files over and over again.

Hopefully this helps and isn't too complicated. :?
Steve_Yorkshire
Posts: 332
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Fri Nov 29, 2019 8:46 pm
Update:
Apparently @ Bloodknight was having some issues with his workflow for importing FBX with collision meshes via assimp (Preview 4.0 Build 5) whilst he upgraded to the latest version of Blender.

It appears that when importing FBX format naming is more required than when just using DAE. Anyhow I had a play around with exporting FBX from Blender and here's what I found.

1: It really likes the DAE heirarchy if you want working collision meshes when exporting FBX. :|

Image

2: If you import as SingleSize your object meshes require trailingNumber LOD else the collision meshes will not work. :o Weird right? :?

3: It will import working collision meshes when using DetectDTS or TrailingNumber (even when you have no trailingNumber) without trailing numbers for LOD. :shock: Did I mention trailing number in that sentence at all? :?

4: FBX is HUUUUUUUUUUUUUUUUUGE. :o Importing at scale 0.01 is the same as importing a DAE at 1.0.

It still feels like there are some sort of shennanigans going on with FBX - or at least FBX from Blender 2.8 but I'm not entirely certain what ... :ugeek:
Bloodknight
Posts: 251
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Fri Nov 29, 2019 10:18 pm
as far as scale, I export from blender at 0.1, and import to torque at 0.1 this seems to get the correct size meshes in the game
10 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest