Jump to content
Alwarren

Arma Toolbox for Blender - Arma 2/3 exporter script

Recommended Posts

Alwarren did you ever release an updated version of you're toolbox?  In the youtube video comments you mentioned that you had created a newer version allowing you to delete proxies but that you hadn't released it.  I was looking around to see if I could find a newer version and the only one I could see was v1.5.  Thanks again for the toolbox its a great help.

 

No, I haven't. I really have too much work. I wish there was more hours in the day.

Share this post


Link to post
Share on other sites

That's cool man just wanted to check. Keep up the good work tho.

Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

Hello. I did the animation with tutorial: https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Bones But RTM cant be exported. Сould you help me?

What do you mean with "RTM a cant be exported"? Is the option not available in the menu? If that is the case make sure your Armature object is selected before trying to export.

Send from my tablet, so pardon any autocorrect bollocks

Share this post


Link to post
Share on other sites

What do you mean with "RTM a cant be exported"? Is the option not available in the menu? If that is the case make sure your Armature object is selected before trying to export.

Send from my tablet, so pardon any autocorrect bollocks

lvAB8mERYis.jpg

 

Sorry for bad English

Share this post


Link to post
Share on other sites

Select the skeleton/armature/bones that has the animation, then use the .rtm export. You now have the mesh of the model selected, but that does not contain the animation data.

Share this post


Link to post
Share on other sites

As HG suggested.

 

97Ih6XE5.jpg

Bringing up the properties panel ( Shortcut key N) on the right of the viewport will show the "Arma Object Properties" section. Armatures have their own properties . Just as object meshes do. With the armature selected, preferrably in pose mode, you make sure it's properties are tagged as you see in the image. Then you will have access to the frames and the exporter.

  • Like 1

Share this post


Link to post
Share on other sites

Hello,

 

I am getting this error when attempting to properly export my model along with a Custom, Geom, Geom PhysX, Roadway, and Memory LOD. I have done it this way many of times however I appear to be getting an error which I have yet to have previously received.

 

JfwCxg6.png

Share this post


Link to post
Share on other sites

I think that happens when you add a material slot to an object but no material. Try to delete any unused slots.

Send from my tablet, so pardon any autocorrect bollocks

Share this post


Link to post
Share on other sites

I've been exporting pile of map objects for the past few days and came up with a couple feature of suggestion I thought to share:

Could there be a way to save some sort of profiles for different LODs that would have named properties set up? Now that I've written autocenter/0 and class/building and such a hundred times it is getting faster, but it could be easier too. Like set LOD to geometry - have a default named properties saved for the .blend/global settings or read globally saved profile set.

Other thing is batch export for objects with maybe using Blenders custom properties. Ie Im exporting object coordinates and have bunch of dummy objects with custom property named "class" that has the objects .p3d/class name as its value, which works like a charm for writing up a TB importable file. Could something like this be used to export multiple .p3ds?

Also while it could be considered user error, exporting object that has quads do not always triangulate all of them. And I'm having some normal troubles too as 9/10 objects seem to have faulty surface normals that cause them to bug in game if packed as is and I have to got to Object Builder to recalculate them.
 

Another thing is that all edges seem to export sharp on visual LODs which I also need to fix in OB, maybe if there could be export flags for all sharp/soft and maybe even edge detect with angle. I've got a edge detecting sharp script that I use in OB but would save a lot of time in the long run if the exporter handled all this.

Share this post


Link to post
Share on other sites

The normals I always have to recalculate. But I don't have any issues with sharp/smooth edges. I get what I see in the viewport. The importer adds an edge split modifier to P3ds. So that might interfere with edges if you also switch on autosmooth while you work. I don't know.

 

Since autosmooth was added, I've stopped using the edge split modifier, and remove it from anything I'm working on. So all I have in the mesh are the edges marked as sharp, and autosmooth on and set to 180 degrees. This works reliably for me.

 

As for triangulation. The only way to be sure, is to triangulate the mesh before you export with CTRL-T in edit mode. That's the only reliable way to do it. The triangulate modifier would be really handy here, for a non-destructive process. But that modifier and others aren't applied by the toolbox on export. I'm not a coder by any means but I assume the target format would need some support for certain modifiers to be applied by an exporter.    :)

  • Like 1

Share this post


Link to post
Share on other sites

The normals I always have to recalculate. But I don't have any issues with sharp/smooth edges. I get what I see in the viewport. The importer adds an edge split modifier to P3ds. So that might interfere with edges if you also switch on autosmooth while you work. I don't know.

 

Since autosmooth was added, I've stopped using the edge split modifier, and remove it from anything I'm working on. So all I have in the mesh are the edges marked as sharp, and autosmooth on and set to 180 degrees. This works reliably for me.

 

As for triangulation. The only way to be sure, is to triangulate the mesh before you export with CTRL-T in edit mode. That's the only reliable way to do it. The triangulate modifier would be really handy here, for a non-destructive process. But that modifier and others aren't applied by the toolbox on export. I'm not a coder by any means but I assume the target format would need some support for certain modifiers to be applied by an exporter.    :)

 

Well it is more like a non-coders wishlist really. Don't know either if stuff like this could be possible, but thought I'd put the idea out there.

I did already find out that with little trick the named properties can be copied from one object to others and also the LOD type I noticed to be copyable so that sped up my process a lot already. 

I think you are correct with the autosmooth as sometimes I get my edges as I want them. Gotta try it out at some point to see what I can improve with my export workflow.

Share this post


Link to post
Share on other sites

In case anyone else is reading this and wondering, autosmooth can replace the edge split modifier. But if you mark edges without it on, and you don't use an edge split modifier, your sharp edges won't display in the viewport. Essentially,setting the angle to 180 tells blender you want the object smooth shaded, except where you have defined sharp edges. 

MRwoASNB.jpg

 

One of the first things I do with any mesh is set autosmooth on and specify an angle of 180. I also remove any existing edge split modifiers. Which will appear when you import a P3d with the toolbox. The exporter will process the sharpened edges without the need for an edge split modifier.

Share this post


Link to post
Share on other sites

The normals I always have to recalculate. But I don't have any issues with sharp/smooth edges. I get what I see in the viewport. The importer adds an edge split modifier to P3ds. So that might interfere with edges if you also switch on autosmooth while you work. I don't know.

This shouldn't happen, and it surely doesn't happen to me. Did you set the path to O2script.exe correctly? When I export I always get correct normals.

 

Since autosmooth was added, I've stopped using the edge split modifier, and remove it from anything I'm working on. So all I have in the mesh are the edges marked as sharp, and autosmooth on and set to 180 degrees. This works reliably for me.

 

Yeah, I need to find out how to set this from Python and remove the automatic edge split modifier, I am not using it anymore either.

 

As for triangulation. The only way to be sure, is to triangulate the mesh before you export with CTRL-T in edit mode. That's the only reliable way to do it. The triangulate modifier would be really handy here, for a non-destructive process. But that modifier and others aren't applied by the toolbox on export. I'm not a coder by any means but I assume the target format would need some support for certain modifiers to be applied by an exporter.    :)

I plan to rework some stuff in the export/import, namely I want to move all the export code to a C++ or C# program which will be able to load blend files directly, this should dramatically cut the import/export time, eliminate the need to have O2script, and also allow to apply certain modifiers during export.

 

I don't triangulate automatically, as you pointed out, only if the mesh contains polygons with more than four vertices.

Share this post


Link to post
Share on other sites

One of the first things I do with any mesh is set autosmooth on and specify an angle of 180. I also remove any existing edge split modifiers. Which will appear when you import a P3d with the toolbox. The exporter will process the sharpened edges without the need for an edge split modifier.

 

Yeah, the edge split modifier was ever only required to make it look correct in the viewport. It isn't used nor applied. It would have been better if Blender had supported the display of sharp edges from the beginning, I found it a bit weird that you can mark edges as "sharp" and they still remain visually non-sharp.

Share this post


Link to post
Share on other sites
This shouldn't happen, and it surely doesn't happen to me. Did you set the path to O2script.exe correctly? When I export I always get correct normals.

 

 

There may have been some changes to the exe when the newer tools arrived on the scene. I'm still using the older versions.

 

 

I don't triangulate automatically, as you pointed out, only if the mesh contains polygons with more than four vertices.

 

 

I don't bother with it either unless I get the odd edge that's not turned correctly. But that doesn't happen very often.

 

It would have been better if Blender had supported the display of sharp edges from the beginning, I found it a bit weird that you can mark edges as "sharp" and they still remain visually non-sharp.

 

 

Maybe it was just to facilitate the edge split mod to begin with. And they just kept it in there. It certainly would be more intuitive to mark sharp edges on a smooth shaded model and have them display regardless. Although It doesn't bother me too much now as I'm used to it, it's a valid point. :)

Share this post


Link to post
Share on other sites

hi all and thanks for the great tool Alwarren!

 

I imported mlod of CDF_Commander.p3d from original Arma 2 and noticed Vertex Groups, I assumed this is weights for the skeleton. Is it possible to import skeleton (or use already created one even though it'll not fit the model) for apply this vertex info as actual weights? would be really cool!

 

Thanks again!

Share this post


Link to post
Share on other sites

Well you don't really need any specific character for animating it in Arma. There is Macsers awesome Blender rig for that. 

 

The A2 weight groups are little different though from A3 so they won't work in game properly without fixing. Some bone names have changed and so the group names need changing too.

For testing weights you can set any character to follow the Macsers armature/skeleton or make your own if you like and use that.

Share this post


Link to post
Share on other sites

Well you don't really need any specific character for animating it in Arma. There is Macsers awesome Blender rig for that. 

 

The A2 weight groups are little different though from A3 so they won't work in game properly without fixing. Some bone names have changed and so the group names need changing too.

For testing weights you can set any character to follow the Macsers armature/skeleton or make your own if you like and use that.

Thank you for reply, really appreciated!
The thing is that I want to get original weights of the characters (or even animals) and NOT to create them. Is there a way to do that?

Share this post


Link to post
Share on other sites

Thank you for reply, really appreciated!

The thing is that I want to get original weights of the characters (or even animals) and NOT to create them. Is there a way to do that?

You can copy the weights from the sample model

Send from my tablet, so pardon any autocorrect bollocks

Share this post


Link to post
Share on other sites

You can copy the weights from the sample model

Send from my tablet, so pardon any autocorrect bollocks

you mean the one from ArmaRig_V6_1.blend?

Share this post


Link to post
Share on other sites

Yeah. That's exactly how my rig was done. Using the sample character unedited. The weights used for the rig are from the mesh itself. The existing vertex groups are simply assigned to the appropriate bones in the rig. Rather than binding the mesh to the armature by bone heat or envelopes.

 

I created my rig to accommodate the toolbox. But other than that, there's no connection between them. Any model or rig, properly set up, will work with it. Al's video goes through the process of making the adjustments for a ported asset.

 

An alternative is to just import the res lods for your A2 mesh into the Armarig blend file and put an armature modifier on it. This should work fine for the res lods. And will give you an automatic way of testing the mesh deformation on the parts you need. From there you can sort out any "clipping" as Al does in the video. And also make any necessary changes to the weights.

Share this post


Link to post
Share on other sites

thanks for the replies, guys!

 

I'm nearly done the process of set up the character. Learned a lot about blender toolbox and CUP project and have a question - can I get somehow blender sample character you talking about? I saw one in Al's video tutorial part 2, named CUP_TK_officer.blender, tried to search it through the web with no luck. You should understand that I want to follow your steps as accurate as I can and according this video I mentioned above and some other web resources sample character would help me a lot.

 

thanks again!

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

×