Tuesday, July 31, 2018

Arma 3 - Still how to import a 3D model into the arma3 engine - Part 3

Arma 3 - Still how to import a 3D model into the arma3 engine - Part 3

So. After my last attempt did not really brought any results, I will now try it with a bit more complex model with no material texture.


The model is very clean designed, all normals are perfect, no playing around, double sided everywhere and fully triangulated.

So what can I do ?

Firstly, I have to check tutorials about import a 3ds model again and try it naively again with Object Builder.

I will make a new folder on the mounted P: project drive for this, call it smallTower for the sake of it.

Right. Now I have this strange KFDATA section missing import error again.



There are not really any options when you export a 3DS from Blender, so I am not sure what to do.

Wow, there seems to be some kind of exporter addon for Blender and Arma ! *excited face*

All right, the FHQ Arma Toolbox for Blender is a thing ! I yet have to figure out if this is still working with Object Builder, since it was made to work with Oxygen.

BUT the O2Script.exe is still there in the Object Builder directory. I have read half through their interesting pdf and well, you have to quite tune some parameters BUT you actually learn a lot, at least I did by understanding them. More or less.

Wow. I cant believe it. The p3d export I did with The Toolbox actually loaded into Object Builder without errors !



Now on to the details :

1. Did it correctly use the Color Material I created in blender with the toolbox or do I need to add an texture texture ?
2. Will it work in Buldozer but more important in Arma with the configs I made before ? And why, if ?

But of course, now Buldozer isn't loading and crashes. Why ? It worked perfectly last time. :-(

I looked into the first post, and found the trashy solution : First you have to select the version of the viewer on your mounted P: drive, let it crash, then restart Buldozer Config, set Path to Viewer inside Game Directory Button Checked and resolution, then restart Object Builder and start Buldozer.

w.t.f. but it works. so. I am as far as I was in post 2, BUT I managed to use the Blender Export Toolbox from some very good community mod tool maker to successfully create a working p3d, at least working inside the Object Builder.

Now to the next details.
First a little break.

So. Same error in the arma rtp.

21:09:23 Warning Message: Cannot open object smalltower.p3d
21:09:23 smalltower.p3d: No geometry and no visual shape

 Hmm. I am making something wrong or miss something elementary.

It might be that I need to add a default LOD (level of detail), since Arma is using some predefined LOD names and sets for various ingame functionality declaration (Convention over configuration meets half documentation- grandiose)

So back to the details after a break. 

So I came up with some sort of hack, that actually works and will be my next point of reference.

I copied the house example add on non-binarized, just added my p3d and change the name in the config.cpp.





Of course the scale is wrong. But well, this means I am on the right track.

Now to the right scale and a basic house texture !

After.... a break....



Friday, July 27, 2018

Arma 3 - How to import a blender model - Part 2

Arma 3 - How to import a blender model - Part 2

So, I added a config.cpp and put the .p3d, the .paa and the config.cpp in one folder. Then I run AddOn Builder on that folder, and it worked.

But the object is not showing up anywhere, which may be cause I used a rather patch-worked config.cpp, which cleary is wrong.

Here is the config.cpp so far :

The Model in my addon has now an entry in the Props=>Structures=>Village, since it is inherited from Building, I guess.

But there is a problem to load the .p3d Model file !


I am not sure why this, cause the AddOn Packer had no errors, I checked all logs. So seems I  have to find out where the log file for this error in arma3 is, which rtp most likely, now.

so its in the common log file in the local windows arma3 folder.

and there are the two lines that matter : 

- import_2.p4d.p3d: No geometry and no visual shape
- Trying to create an invalid center EMPTY 


I am a bit confused by this, but will go back to Object Builder and look what is wrong or missing.

Thursday, July 26, 2018

Arma 3 - How to import a blender model - Part 1

Arma 3 - How to import a blender model - Part 1

In my today's try to get ahead in Arma3 Editing, I want to import a building into Arma 3 which I modeled in Blender.

So as always I took a quick look at tutorials to refresh my memories. I do not want any YouTube tutorials or so, just text and pictures.

On the first I found :

Arma 3 Basic Modeling Import Tutorial for Noobs - Difficulty EASY

and this entry on the bohemia forums.

This seems quite ok for the start. So now I model a quick easy non-accessible building with some texture blocks I extracted today somewhere.

This is my , very basic, building I want to import :


So I had them installed long time ago, but I was missing the Arma3 Tools, *happy sound*, so I got them over Steam.

As far as I understood, it should be fairly easy to import a (blender) model with O2, a tool provided by Bohemia.

Well. Ehm. In the Arma3 Tools, which actually have a pretty menu now and wow.But I cant find O2, and I remember vaguely it was TexView 2 I used, did I ?

Well. It is the object builder I am after it seems, but the first time I pressed on it, nothing happened and the arma3 tools crashed. :(

After trying a lot I must admit that nothing works with the arma3 tools.

I get a strange .net error in the windows logs and the logs of arma3 tools itself are saying nothing.

I have to read further into this. Stay tuned !!!


Well, it chained my mind to it, so I read on, despite being terrible fatigue. What do you do when you do not know what do to ? Yes. RTFM. So.

Arma_3_Tools_Installation

Maybe, just maybe, I find the reason for the Object Builder crashing here. And I did, it seems.

Buldozer, the 3D Viewer Module (previous Oxygen, I remember that !) of Arma3 has to be installed on a virtual drive. And yes, an actual virtual drive with the letter P: ! Click here to read the full tragedy or what they call documentation :D !


Hurrai ! Now lets import my .obj 3D File which I exported from Blender !!

We got our first error message !!! At least the infrastructure seems now to be solidish.


So, I triangulated my model in Blender. And while I was there, I exported the model as 3ds_max .3ds format, but I got this error message :


I never worked with max, well I did hunderts of years ago. Hmm. Then again as obj !

HEUREKA ! I imported my model into the object builder as obj. (Always triangulate !)


Of course the texture is missing and the normals seem to be turned around. Have to read up upon that after a extensive short break.

In Blender, I exported the file again to obj, and before that I revered the normals. But it still looked like that inside-out, so I reveresed it with the Reverse Option under Faces inside the Object Builder. And now it looks correct, still missing the texture, and when I start Buldozer alias Arma3 as viewer, it still crashes.



But I think I just need to add some very basic project respective addon definition files to make it work inside Arma3. *reads up*

Well, now Arma crashed and I know why. I had to change to path of the arma3 buldozer viewer to that of its version inside the game path !!! And I set the resolution to default, also.

And now it works and the model is loaded, yet without the texture, but the UV Map is inside the object builder, I saw that.



Hmm The UV is fine.

So what the bush is going. I converted the .png texture to a .tga, cause it seems this is one of the formats the object builder can use, png is not.


I converted the png to 256x256 non-compressed tga. Then I started Buldozer, which converted the "resources", then in the Object Builder I activted DirectX (via the Atomic Icon) and Textures (via another icon, hover !) and voila, the texture work in the work windows of Object Builder ! *dances*


I then used the good old Tex View ... 2 ! to convert the tga to a paa, which is a packed texture format for arma3's engine. I then assigned the paa to the object, which turns the texture off in the object builder BUT it then works in the Buldozer Viewer, which depends on a working addon format on the fly as far as I understand that right now.



So now I need to pack it and before that I think I need to find some templates for placable object definition files somewhere...*close to sleep cause late* .... *mobilizes reserve energy*

I put the p3d and the paa into one directory and tried to run the AddOn Builder on that directory.
As excepted now the last thing is a missing description of some sort, like a hhp file, I remember only vaguely.

So. I am downloading the official steam example arma3 file, but I will google this before I go sleep and I need to seriously get hydrated.


Wednesday, July 25, 2018

Arma3 Beginner Mission Editing : Non-Fly-Zone Message

Hidiho !

Lets do some Arma3 Mission Editing ! (we <= me !)


I played GTA5 a bit over the last weeks to finally get this monstrosity under the hood. I am quite disappointed by its story and its obvious single reason to condition the player for the GTA5 online money grap experience.

BUT I finally am good in computer helicopter flying. For some reason I now like the Arma3 helicopter fly model. So now I am playing around and do a flying training course for civilian helicopters on Stratis and then Malden.

Level: Beginner

So, first I wanted areas where players can fly over like cities or military areas, at least not without an official reason.

My arma scripting is still on arma2 level and still quite rusty. So, assuming yours is too, I do this bit by bit. Remember, this is mainly for me to log the process here :D

1. The voice

First, you want to have a radio message like "Ey, don't fly here or we shoot" or something.
Eventually I used :  "Unidentified aircraft. You are entering a restricted air zone. Turn around or be fired upon."

So where to get a voice ? I am not a native english speaker, and I like temporary voice acting more than some half solid work, so I used naturalreaders.com  but any text-to-speech should do.

I used Audacity to convert it into the .ogg Soundfile format.

To make the sound available ingame, you have to edit the description.ext in the scenario folder, create the file if it does not exist.

Then this works for me :

class CfgSounds
{
     sounds[] = {};
   
     class RestrictedAirzone  {
         name = "RestrictedAirzone";
         sound[] = {"\sound\arma_voice_syn_restrictedAirspace.ogg", db+5, 1.0};
         titles[] = {1,"Unindentified aircraft. You are entering a restricted air zone. Turn around or be fired upon."};
     };

};

2. Play it

Then you put a trigger according to your needs and for the sake of convenience I most of the time put player say2D "RestrictedAirzone"; in the activation field of the trigger to start the sound playing and the title showing up.