Jump to content
Alwarren

Arma Toolbox for Blender - Arma 2/3 exporter script

Recommended Posts

Hi again,

 

Fixed the animation bug with the rifle. ;)  (I used a BVH rig instead)

 

 

I got two more questions about animating:

 

Q1. Can I create a slow animation (thus more detail and frames), and then speed it up within a config? ( e.g. speed = 1; )

 

Q2. I can't seem to get a single animation into CfgGestures, I am currently using the BVH rig here: (I also enabled Arma toolbox, and exported it as a static pose)

 

http://www.armaholic.com/page.php?id=24137

 

 

Thanks,

 

 

Rawner135

Share this post


Link to post
Share on other sites

Q1. Can I create a slow animation (thus more detail and frames), and then speed it up within a config? ( e.g. speed = 1; )

You can. I usually make my anims 30 FPS and adjust the length in game until it looks more or less natural, within the bounds of my animation capabilities.

 

Q2. I can't seem to get a single animation into CfgGestures, I am currently using the BVH rig here: (I also enabled Arma toolbox, and exported it as a static pose)

You should use the "ArmaRig_ATbx.Blend" file for Arma Toolbox. Make sure you add the keyframes to the animation frame box in the Arma Toolbox panel. I usually add all of them.

 

I really need to make some tutorials on how to use this :/

Share this post


Link to post
Share on other sites

You can. I usually make my anims 30 FPS and adjust the length in game until it looks more or less natural, within the bounds of my animation capabilities.

 

You should use the "ArmaRig_ATbx.Blend" file for Arma Toolbox. Make sure you add the keyframes to the animation frame box in the Arma Toolbox panel. I usually add all of them.

 

I really need to make some tutorials on how to use this :/

 

Thanks for the reply, Alwarren.  ^_^

 

 

I will actually make a tutorial sometime this month for getting anims into arma. (including how to set up the config)

but the only thing thats in the way, is that I can't seem to stop the weapon in the AT model, from moving with the hand.  :huh:  (Didn't work when I parented it, I even checked the bone constraints for an option to disable the target)

 

You will notice in the below video that I tried to keep the weapon on the back:

https://youtu.be/lf4pQnawUTc?t=61

Share this post


Link to post
Share on other sites

Hello Ranwer. I'm assuming, by  AT, you mean the ArmaRig_ATbx blend file?   :)

 

Have you disabled the "child of" constraint? 

 

It's not a perfect solution. But at the time I was experimenting with something switchable for the weapon parenting. You could remove the constraints entirely and parent directly to the appropriate bone for the current animation file.

 

Or maybe just parent the weapon bone to the torso by default. And key-frame from there.

 

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

 

By the way Al.

 

I bothered you quite a while ago about unwanted movement in more dynamic animations. Statics are fine 

when exported direct to game. But anything with translation has the movement added to the step value.

 

The only way to cure it was to pass it through O2/Object Builder. I didn't fully understand what was happening at the time. But it was actually very simple. When a file gets imported into O2 from Blender, it has no step values. The translations are in the keyframes. But when it's exported from O2 the translations are stripped out and converted to a step value. So when the file is reopened in O2 there's only the rotations left. The character will move "on the spot".

 

In game, this is what you need.  As the engine will use the step value for translation.

 

At the moment, if you try to export a walk cycle directly, you get the movement in the animation added to the step value. So it plays to the last frame then loops. While at the same time, it's moving forward.

 

So what would cure it is having the translations zero'ed out at export and converted to step values.

It's possible to do it manually in Blender. But it's pretty messy.

Share this post


Link to post
Share on other sites

At the moment, if you try to export a walk cycle directly, you get the movement in the animation added to the step value. So it plays to the last frame then loops. While at the same time, it's moving forward.

 

So what would cure it is having the translations zero'ed out at export and converted to step values.

It's possible to do it manually in Blender. But it's pretty messy.

 

Ah, it starts to make sense now :) I'll see that I can add this. Thanks for the heads-up.

Share this post


Link to post
Share on other sites

Thank you so much for your effort in helping me, guys!  ;)

 

Here is a little something I made to prove others that blender is just as good as 3DS Max. (made it last night and finished it just now, ready for exporting)

 

nv6pt0.png

 

My first model in blender btw.  :P  (I have a bit of skill in every corner)

Share this post


Link to post
Share on other sites

That's a great model. I think at this point Blender has gotten to a stage where the artist can spend more time creating than working around the program's eccentricities. So basically the only obstacle to creation is a user's own ability. In that sense, I think it's on a par with the industry standards.

 

@Al

I didn't mind having to use O2 to zero out the anims. That would mean I keep the originals intact within Blender. But recently O2 has been mangling the files. So I've had to resort to manually "zero'ing" any movement before export from Blender. As I mentioned, it works. It's just laborious and counter- intuitive.

 

If you could sort that, it would be the proverbial icing on an already delicious cake. :)

 

As far as I'm concerned, the toolbox is the best "Arma" utility I've ever used. I don't know why people don't

mention it more often.  Especially when you consider that it works across the entire series.

Share this post


Link to post
Share on other sites

It is, indeed, a very good program.  

 

 

The only thing that bothers me is that I have to keep on sub-dividing meshes in order to move more vertices. Because of this, Oxygen suffers from lag and bulldozer will not load the model. (Same effects the above image)  

 

SOLVED:

 

I had to select a mesh, then press the "Delete" key, then I had to select "Limited Dissolve". It is highly recommended to do this for any high poly model. (This also solves the subdivide issue, when it creates too many faces)

 

Again, you can use "Limited Dissolve" to decrease the number of faces, thus maintaining your mesh's appearance.  ;)

Share this post


Link to post
Share on other sites

You can also use "delete Edge loops" to further reduce your polycount. that way you have more control over the topology than using "limited dissolve".

Share this post


Link to post
Share on other sites

"Edge Collapse" is also quite useful.

 

The way I usually model is, I start with the low res model but keep it clean, i.e. quads only. That way, I can later add a subsurf modifier and make the high detail model from it. Once I have copied the mesh for the high detail, I start reducing the poly count. Usually, I cannot delete any edge loops because I don't leave any superfluous edge loops in the model, but I use a combination of point merging, Edge Collapse, and similar tools to reduce the number of cuts I made. At this stage I will happily go for triangles, since the topology isn't very important anymore at this point.

 

(Limited) Dissolve can introduce n-gons. While this isn't a problem for the exporter (it will automatically triangulate b-gons) it will introduce hidden costs, and might cause shading irregularities..

Share this post


Link to post
Share on other sites

Hi there, Alwarren - first off, thanks for the great toolkit! :D

 

However, I'm struggling a bit with a problem! Essentially, I have a model with several LODs that all work correctly - it's a gun cabinet, and it has an illuminated keypad. The trouble I'm having is, for some reason, I can't seem to add multiple textures / materials. At present, it has three UV sets, which have different parts of the model mapped to them. The model also has three materials with face textures and RV materials linked (the P:\ prefix removed). Now, when I export it as a p3d file and then open that p3d file up again as an import in Blender, those 3 material maps have merged into 1. In-game, only one texture appears on 1 uv set.

 

Any ideas why that might be occurring?

 

Thanks matey!

 

Here's the Blender file, if it's of interest: https://www.dropbox.com/s/0jk0t1zo6rljvj4/Gun_Cabinet.blend?dl=0 (you'd have to map some dummy textures to try it out!).

Share this post


Link to post
Share on other sites

Here's the Blender file, if it's of interest: https://www.dropbox.com/s/0jk0t1zo6rljvj4/Gun_Cabinet.blend?dl=0 (you'd have to map some dummy textures to try it out!).

 

Well one problem might be that only one of the materials has actual texture/RVMats set, the other two are empty. When exporting, they appear as "unmapped"

Share this post


Link to post
Share on other sites

Yeah. That seems to be it. Material 3 is the only one with a reference in the toolbox material settings. Once you link the other 2 the materials should be present in the P3d. I can see them in O2.

Share this post


Link to post
Share on other sites

Wow guys! :D That simple?! I was just testing one bit at a time, but I'll go the whole hog and see if I can get it up and running!

 

Again, Alwarren - thanks so much for the toolkit - you're a star!

Share this post


Link to post
Share on other sites

Sorry chaps, I've now linked all the correct textures and RVMATs and I'm still having trouble with them showing up. Only one texture appears. I've got 3 materials. 2 have RVMATs and colour textures assigned. The final one is just a material map - it's for an illuminated screen, so, I just need the RVMAT to make it shine. I've checked the RVMATs and they all appear to be correct. I also tried a dummy texture to compliment the 3rd material, but no luck. Any thoughts? I'm terribly sorry if it's me doing something frightfully silly!  

 

https://www.dropbox.com/s/6a3s9qvw8t3o4yu/Gun_Cabinet.pbo?dl=0

 

 

Outside texture's fine (first material texture): http://steamcommunity.com/sharedfiles/filedetails/?id=497579064

 

Inside texture's missing: http://steamcommunity.com/sharedfiles/filedetails/?id=497579376

 

As is the keypad texture (though the light material's working splendidly!):

http://images.akamai.steamusercontent.com/ugc/631980743385641922/8D9991DEB12802955665FA334F54D7615DE9AE73/

Share this post


Link to post
Share on other sites

Sorry chaps, I've now linked all the correct textures and RVMATs and I'm still having trouble with them showing up. Only one texture appears. I've got 3 materials. 2 have RVMATs and colour textures assigned. The final one is just a material map - it's for an illuminated screen, so, I just need the RVMAT to make it shine. I've checked the RVMATs and they all appear to be correct. I also tried a dummy texture to compliment the 3rd material, but no luck. Any thoughts? I'm terribly sorry if it's me doing something frightfully silly!  

 

https://www.dropbox.com/s/6a3s9qvw8t3o4yu/Gun_Cabinet.pbo?dl=0

 

You will always have to assign a texture. The face texture you assign in Blender is ignored. The only thing that matters is the entries in the Material that is assigned to a face, and since each face can only have one material, any material that only contains an RVMat will not show up correctly.

Share this post


Link to post
Share on other sites

Thanks for your help, mate - hugely appreciated :) I understand that the face texture you assign in Blender is ignored - however, I'm assigning a face texture and a material texture in the section titled 'Arma Toolbox Material Settings' and they're not appearing. Let me re-read everything and try again :P

 

EDIT: https://www.dropbox.com/s/6a3s9qvw8t3o4yu/Gun_Cabinet.pbo?dl=0 (Materials assigned, both face / RVMAT together. No RVMAT on its own, or face texture on its own.)

Share this post


Link to post
Share on other sites

Has anyone had any luck getting a simple gesture or hand anim into arma 3 with blender toolbox, and how?  :blink: (I'm creating a tutorial for those to know how, but this is the only problem that's blocking it's path)

Share this post


Link to post
Share on other sites

Thanks for your help, mate - hugely appreciated :) I understand that the face texture you assign in Blender is ignored - however, I'm assigning a face texture and a material texture in the section titled 'Arma Toolbox Material Settings' and they're not appearing. Let me re-read everything and try again :P

 

EDIT: https://www.dropbox.com/s/6a3s9qvw8t3o4yu/Gun_Cabinet.pbo?dl=0 (Materials assigned, both face / RVMAT together. No RVMAT on its own, or face texture on its own.)

 

I'll take a look when I get the time.

 

 

Has anyone had any luck getting a simple gesture or hand anim into arma 3 with blender toolbox, and how?  :blink: (I'm creating a tutorial for those to know how, but this is the only problem that's blocking it's path)

 

There is no RTM import. Different rigs and IK will make it very very difficult to import these. The only thing that would be possible is to recreate a skeleton but this would not have any sort of control rig, and be practically useless.

 

I was faced with the same issue for making reload anims, I wanted the default stances so I could have smooth reload and the soldier wouldn't jerk into an awkward position when reloading. What I did was:

 

  1. I applied the sample RTM's to one of the stick figure skeletons (Check the edit LODs of the sample files) and exported a standing and prone stick figure.
  2. I then took the raw stick figure skeleton and parented it to the rig I use, hiding the default character so that only my stick figure is visible.
  3. I then adjusted the stance to fit the stick figure. You can use vertex snapping to move the bones into place, then rotate them so that they fit.

It's a bit tedious, but afterwards I saved the stances as blend files so I have a basis for future work.

Share this post


Link to post
Share on other sites

I'll take a look when I get the time.

 

Don't trouble yourself too much, matey! :) I still have a lot to learn and it's probably silly stuff I've missed! The toolkit is marvellous, anyhow  - thanks so much for your work on this!  

Share this post


Link to post
Share on other sites

 

It's a bit tedious, but afterwards I saved the stances as blend files so I have a basis for future work.

 

You can also save the poses/animations as actions via the dopesheet. That way you can keep a collection within one blend file. Besides keeping everything in one place, it allows for quick switching between animations, for previewing. When you want to export, load the frames of the currently active action into the toolbox and go.

 

SIbisyyl.jpg

Share this post


Link to post
Share on other sites

There is no RTM import. Different rigs and IK will make it very very difficult to import these. The only thing that would be possible is to recreate a skeleton but this would not have any sort of control rig, and be practically useless.

 

I was faced with the same issue for making reload anims, I wanted the default stances so I could have smooth reload and the soldier wouldn't jerk into an awkward position when reloading. What I did was:

 

  1. I applied the sample RTM's to one of the stick figure skeletons (Check the edit LODs of the sample files) and exported a standing and prone stick figure.
  2. I then took the raw stick figure skeleton and parented it to the rig I use, hiding the default character so that only my stick figure is visible.
  3. I then adjusted the stance to fit the stick figure. You can use vertex snapping to move the bones into place, then rotate them so that they fit.

It's a bit tedious, but afterwards I saved the stances as blend files so I have a basis for future work.

 

Ok, I guess I'll have to test out how you did it, thanks Alwarren.  ;)

 

Also, is it possible to deal with this issue by just modifying the animation in O2? (I also tried the mask, and it doesn't seem to work.  :huh: )

 

But again, will try it out.  :)

 

 

 

 

You can also save the poses/animations as actions via the dopesheet. That way you can keep a collection within one blend file. Besides keeping everything in one place, it allows for quick switching between animations, for previewing. When you want to export, load the frames of the currently active action into the toolbox and go.

 

SIbisyyl.jpg

 

 

Interesting, If I recall Autodesk MoBu had a feature like that. (Very handy if you want to reuse the same pose as before)

 

I guess blender is full of surprises as you learn more of its features.  :D

 

 

 

In my video below, you can see why the first animation needs to be a gesture. (But in any case, these were made with the BVH but exported directly as .RTM)

 

Share this post


Link to post
Share on other sites

inside the motionbuilder rig in the FBX2RTM folder they have all the default stances saved nicely, i wonder if you could somehow transfer those to blender (its humanIK so i doubt it) but im still a noobie with blender i only use it because the 3ds max toolbox is no longer supported by its creator and the documentation is gone.   i know there is a VBS3 rig for blender i wonder if it uses the same skeleton and has the stance's for rifles/pistols/binocs/etc saved in it as well...

 

either way, if your looking for a good base for your animation check the FBX2RTM filebank in motionbuilder (you can get it for free off the autodesk education site)

Share this post


Link to post
Share on other sites

Already got MoBu 2015, doesn't work at all for FBX2RTM. (Don't know why BI says you need Mobu 2009 when its off the shelves.... -_- )

Probably not possible to get MoBu poses into blender. :(

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×