Home   Help Search Login Register  

Advertisement

Author Topic: [newbie]Aliens Colonial Marines M577 and UD4L importing troubles.  (Read 4965 times)

0 Members and 1 Guest are viewing this topic.

Offline Otreum

  • Members
  • *
Hi all.

I am new to ARMA modding and have been following the tutorials at:
http://ofp.gamepark.cz/_hosted/brsseb/tutorials.htm

I am obviously trying to learn how to import models to ARMA, specifically the M577 APC and the UD4L dropship from the "Aliens" franchise.
I have all the tools I need (as far as I know), and everything seems to be set up correctly in O2.
I have read through the first 2 parts of the tutorials on the link above and am currently doing the "Making your first car" tutorial and having troubles.

But before I explain the troubles, I want to summarize what i've done so far so that you all have a better idea of where I am at and what I need help with.

Below is the summary of what I have done so far:

Ok, here is just an update on my progress. I am currently trying to do the car tutorial with my own model.

- I have imported my .obj APC into O2.
- I have converted my textures (512x512 single colour WIP textures) to .paa
- I have textured my APC
- I have got a 0.000 LOD and a 1.000 LOD (1.000 LOD is .95 scaled down)
- I have made my 1.000 LOD weighted
- I have saved the project as a .p3d file to P:/apc577/apc577.p3d
- I have copied the land vehicle config file (.cpp file) from the tutorials as instructed by the tutorial and edited the file by changing the "firstCar" words to apc577. Below is the config file.

Code: [Select]
class CfgModels
{
class default {};
class Vehicle: default {};
class Car: Vehicle {};
class Jeep: Car {};
class apc577: Jeep {};
};


class CfgPatches
{
     class apc577
     {
         units[] = {apc577};
         weapons[] = {};
         requiredVersion = 1.0;
     };

};

class CfgVehicles
{

     class All {};
     class AllVehicles: All {};
     class Land: AllVehicles {};
     class LandVehicle: Land {};
     class Car: LandVehicle {};
     class Jeep: Car {};

     class apc577: Jeep
     {                               
                displayName="apc577";     // Displayname in editor
model= \apc577\apc577; // our p3d model path
             
side=3; // Its on the civilian side
crew="Civilian2"; // The default driver are civilians
maxSpeed=300; // Max speed
                transportSoldier=0;     // Right now just driver, no cargo                                                                                   
      };
}

- I have placed the .paa texture file that i'm using into the P:/apc577/ directory.
- In the P:/apc577/ there are the following files:
apc577.p3d
green.paa
config.cpp

- I have then gone to BinPBO and converted the P:/apc577 folder to a .pbo which was placed into the armed assault addons folder.
- I try to find the vehicle by going to empty -> cars in the editor unit placement menu but I don't see anything. I have also looked at the other menu's and can't find my vehicle in there either.

-I have checked the apc577.log file in the addons folder to check for errors, and it says the following:
Quote
Parse: 0 ms
C:\Program Files\Bohemia Interactive\Tools\BinMake\Pal2PacE\Pal2PacE.exe returned error 1
W:\c\Poseidon\Lib\fileServer.cpp(2010) : Assertion failed '_workerThread.Size() == _nRequestsLoading'


That is where i'm up to, I cannot load my model in game,and no matter what I try, I can't seem to figure out what to do on my own at this point.
Any help would be greatly appreciated, and i'm sure you would all love to drive and fly these 2 vehicles around in ARMA and eventually ARMA 2.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Hi ya Otreum
As the Tut is really of OFP, not ArmA, it generally might work, but we probably back up a little, need to trim you config a little and add some other;

- You didn't mention any other LODs. Do you have a Geometry LOD and a Memory LOD? You should.

You should use 2 separate config files
MODEL.CFG
and
CONFIG.CPP

MODEL.CFG example for simple car
http://pastebin.com/fb8c226c

NOTE: The bit in this that goes;
Quote
class CfgModels
{
   class hmmwv;
   class MyCar: hmmwv
   {

The "MyCar" bit here MUST be changed to be exactly the same name as your P3D file.
i.e. in your case it probably has to be "class apc577: hmmwv"

All the extra named bits in the file are so, if you name your P3D model bits (wheels, steering wheels, suspension etc) the same way BIS names them, then it will work properly first go. But you don't have to do this first up. Even with no naming, you model should appear ingame, its just things like wheels turning around may not work straight away.

If you want to see how BIS names all their vehicle bits (left front wheel, right front wheel etc etc) Download and look at the example P3Ds provided by BIS to help Addon Makers.

The benefit of using the MODEL.CFG file is, in O2 you can use the MIDDLE MOUSE BUTTON & WHEEL to change and simulate the animations on the model in front of your eyes.


CONFIG.CPP
To get the model to work ingame, only a simple config should be needed. Example
Quote
class CfgPatches
{
   class OTR_apc577
   {
      units[] = {apc577};
      weapons[] = {};
      requiredVersion = 1.0;
   };
};
class CfgVehicles
{
   class HMMWV; // extend & copy existing definition
   class  apc577: HMMWV
   {

      model=\apc577\apc577.p3d;
      displayName= "My  apc577";
   };
};

Instead of using BinPBO first up, you can simply just create an archive PBO. If you have CPBO installed all you have to do is Right-Click the apc577 directory and select "create PBO".
The PBO it generates can be cut and pasted into your ArmA game directory (make sure you place it in a correct directory otherwise ArmA wont see it at startup)

Any probs with just these steps, post them here again or send me the files and I'll have a look for the problem(s).
Best of Luck! Good to see people still having a go at addons :)


PS: CPBO Tool
http://www.ofpec.com/addons_depot/index.php?action=details&id=15

« Last Edit: 05 Jul 2009, 10:04:23 by Gnat »

Offline Otreum

  • Members
  • *
Hi Gnat.

Thankyou heaps for your help! :)

You would not believe this, but even doing all of what you said didn't work at first.....at first...;)

I was on the armaholic forums, asking for the same help, and it was suggested that I download someone elses M577 APC which has the name of apc.pbo, which is different to my apc577.pbo file, so I figured all should be ok.

Well, at a guess, I figured the person who did the code for THAT apc, might also have an apc577.p3d file which the config and cpp files point at, and that could have been conflicting.
So in order to confirm if this was the case, I simply removed that addon from the addons folder and VOILA....I see "My apc577" on the list! :D

So that obstacle is now broken through thanks to you :D
But the next obstacle is that when I go to preview with my apc on the map, it complains that there is a missing phong3sg texture, but continues to go into the game anyway, and my apc is the green colour I gave it, so I figure all is well.

One thing I noticed about my apc though was strange shadowing on the side of the apc that the sun shone on, but I just put that down to a fault in the model or something up with the p3d file since it's not exactly complete.
So then I proceeded to walk around the apc, it is perfectly sized, which is great.
I then tried to jump into the APC which then resulted in my game freezing...I could not drive the APC.
One other thing I noticed was that I could walk through the body of my apc but not the actual wheels, I have no idea why that is, but i'm sure i'll figure that out later. Right now I need to get this thing drive-able.

BTW, the actual M577 model exterior is almost finished, I have a few little bits to go before texturing.
I'm thinking I will use a 2048x2048 texture map for the exterior, and a 2048x2048 map for the interior as well if that's possible.

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Good stuff Otreum  :good:

On the shading, this might be a fake shadow thing going on. The Shadow LODs (especially the highest detailed ones) need to follow the shape of the Resolution LODs very closely otherwise you'll find it casing a shadow onto itself, hence odd shades.

On the "walking through it", in the GEO LOD either
- You didn't do menu; Structure -> Topology -> Find Components (This "sets" bits as solid)
- Your GEOMETRY LOD has shapes that aren't "closed" (ie the Body isn't but the Wheels are).
    Select menu; Structure -> Topology -> Find Non-Closed
  Any highlighted structure means they need repairs.

On crashing when you board; You probably don't have a "View - Cargo" LOD
Easiest solution for testing, copy a Resolution and make it the View - Cargo LOD
Add 1 DRIVER proxy and 3 CARGO proxies (under menu; Create -> Proxy)


Offline Otreum

  • Members
  • *
I'm not too sure what the shadow LOD or resolution LOD is, could you explain how to create a shadow LOD and resolution LOD or point me in the right direction (link to tutorial) or something.
In the mean time, i'll look for these as well.

Now that you mention the geometry LOD needing a fully closed mesh, it makes sense. My apc body has an open section where the doorway is on the side for when I do the interior, I could close that off for the time being until I make the interior of the APC. Also alot of the little bits and pieces on the APC aren't closed off, so that makes perfect sense, thanks for telling me that :D

As for the crashing, the tutorial i'm doing doesn't mention needing to do a view - cargo LOD or anything initially, but I'm guessing that because it's a tutorial designed for OFP, I should just continue through the tutorial and focus on making it fully functional with turning tires and so on.

I have another question. Is there a way that I can do all my texture work outside of O2, because I REALLY hate how I have to texture things inside of O2 :S

I am using Maya 8.5 for my 3d modelling, and the model i'm using was an imported obj file directly from maya, however it only loaded the mesh inside O2, not the actual textures.
« Last Edit: 07 Jul 2009, 07:06:50 by Otreum »

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Resolution LODs:
Just the LODs you have already been doing, the visible ones. ie they are numbered like 0 or 1 then maybe another at 5 and another at 12 etc etc

Shadow LODs:
-It also a numbered LOD (but starts with the words "ShadowVolume"
-They are typically non-textured, expect is you want to use a semi-transparent texture.
-The lowest number S-LOD has the most detail, so it casts the most detailed shadow on the ground
-The higher the number, the less detail you should have.
-All structures MUST be closed like GEO LOD
-All edges MUST be SHARP EDGE
-The structure only really needs to be the external shape of the vehicle
-At the lowest numbers, the shape AND location of the Shadow LOD needs to follow exactly the Resolutions LOD, so no odd shading occurs with "self-shadows"

The easiest way (sometimes) to do the first level Shadow LOD:
- Copy the main Resolution LOD
- Trim out any "internal detail" that will technically never actual cast a shadow outside (like maybe Seats)
- Remove all textures
- Close any open faces to make a Closed structure (ie seal any doors, blank off open ended "tubes" etc)
- Rememeber Shadow parts need to be "named" too so they are also animated. ie when the wheels turn left, the same "shadow" of the wheels need to turn also.

Note there are also ShadowVolume definitions for Internal Cargo views too. In that case you don't need worry about wheels etc that you CANT see from the driver/cargo position, just stuff that would cast a shadow inside. Like Steering Wheel, Gear Shift, Dashboard etc.
But hey! You can do these ones last once all the other pretty bits work :D

Maybe http://forums.bistudio.com/showthread.php?t=69434


Textures outside O2: Sorry mate, not sure myself but I'm know others do textures in Max, but not seen much about Maya.
Will Maya export a 3DS file?
If it does, with the right version of O2 you can import that into O2 and it drags texture mapping with it (mostly).
Also maybe: http://www.ofpec.com/forum/index.php?topic=22375.0



Offline Otreum

  • Members
  • *
Thanks for your help again :D

I'll try and go through these things and get them to work, however i'm still not sure about the actual process of making each of these...

Firstly i'll talk about texturing.
Maya can export as an obj file, and that is what I use to import my Maya model to O2, I also previously imported my obj to 3ds max, then exported as a 3ds file and imported back to O2, but there is really no difference between importing the 3ds and obj file to O2.
I'm wondering if I need to actually select the .paa file as the texture file inside of Maya instead of a tga file, THEN export as obj and import to O2....I don't think that'll work, but i'll give it a shot.

Anyway, it wasn't the texture itself that I was asking about, more so the UV map. Because if I had a detail texture...for example a grid texture, and I tried to texture my model in O2, I would go to the side view, select say...the base of the model, press A, drag an area out thats bigger than the base, right click it, select the paa file, then press B.
However I get the impression that this would create a planar projection, so if it's done in the side view, the grid might look ok on the side, but on top, it would be stretched. Or does it work differently, does it detect the UV's and just apply the texture to the surfaces?
I think I understand what you mean about how to make the shadow LOD's and so on, I just right click in that box on the side, then "new", and rename to ShadowLOD 0.000 and have lower and lower detailed models as each number LOD gets higher...right?

I'm checking out the links you provided and also some links provided in the forum link you provided, just reading the O2 manual now and learning a few new things already.

Thanks :)
I will keep you postedon my progress.

Offline IllustratorMD

  • Members
  • *
If only you could export 3ds files from maya.... it is silly you can't, since they are both made by Autodesk. Mabe the new one lets you, I have Maya 2008. Does anyone know if you convert a maya file to 3ds file, and then import that into O2, will the UV layouts and textures be maintained?

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Quoting Adumb from the BIS forums
Quote
Load the Maya OBJ Plug-In, you can do this in the plugin manager.
Windows> Settings Preferences> Plugin Manager> objexporter

O2 can import OBJ