Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Created my object, exported the mesh......now what?  (Read 3527 times)

0 Members and 1 Guest are viewing this topic.

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Created my object, exported the mesh......now what?
« on: November 18, 2012, 03:52:23 PM »

I've created an Austin Ambulance object.  After much help from these forums (thanks to all) I've managed to run the buggy buggy exporter and have saved the Listener text to a .msh file.
Now, I have no idea what the next step is, something to do with materials and LODs I believe but I have no idea where to start on that.  Can one of the gurus step me through the process please? 
Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Created my object, exported the mesh......now what?
« Reply #1 on: November 19, 2012, 08:09:02 AM »

You need to understand how an existing model works in the game.
The files required vary depending on the type of model.

Best thing is to install an existing mod which is similar then you can swap in your files.

Try this https://www.sas1946.com/main/index.php/topic,19164.0.html

The model mesh is named live.msh
What I call the index file is named live.sim
You will see live.msh named in this file and 2 collision meshes

Try installing a mod like this -- ensure it works.
Then rename your msh live.msh and swap it into the mod
In live.sim you would need to re-write

Code: [Select]
[_ROOT_]
[Body]
Mesh Live
//CollisionObject Collision1
//CollisionObject Collision2

That is if you do not have any collision meshes created yet.

Your skin needs to be named skin512.tga

but in your msh files you must have

Code: [Select]
[Materials]
Skin1o

You do not necessarily need all parts of the model complete to import it into the game at the trial stage. I assume that for your trial you will only have LOD0
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #2 on: November 19, 2012, 04:12:40 PM »

Asheshouse;
thanks for the assistance. I've downloaded the Komatsu bulldozer.  In order to use that in the game I assume the files (.tga, .msh etc) would go into it's own folder such as follows;
/#SAS/Japanese_Bulldozer/3do/vehicles/Kumatsu
Is that correct?  Or should I use /objects  instead of /vehicles (I'm not sure of the correct folder for a static object).
I haven't used any .tga files for my textures but .bmp files, where do the .tga's come in?  Is that part of the 'conversion' process when Exporting?
I understand your comment about the _ROOT_ section and the requirement to 'comment out' the two Collision lines.
What is the 'skin' file in relation to the 'mat' (texture)?  There are quite a few 'mat's I used for texture, are they all 'converted' into one 'skin'?  I'm just trying to understand what's happening during the process.
I believe I only have LOD0 as you say (is that Layer Of Detail so to speak)?

Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Created my object, exported the mesh......now what?
« Reply #3 on: November 20, 2012, 02:14:41 AM »

Download from the first link and you will see all the instructions for installation.
https://www.mediafire.com/?mgdhdcz1yzarqx9

What kind of Mod installation do you have?
Classic mod the folder structure is

root/MODS/any_name_you_want/3do/Cars/ISUZU_FUEL/all_model_files here

The game must have textures in tga format.
You can convert your bmp textures using various graphics programs.
I normally use Photoshop. Some use Gimp.
Max can use tga's as textures. I dont know about GMax

The *.mat file defines the way that the game engine displays the *.tga
Open a *.mat with a text editor and you will see numerous options.
I only understand a few of them, enabling the alpha channel for example.

The material named in the msh file refers to the mat name not the tga name.
The tga name is called up in the mat file.
I normally make them the same name but it is not necessary to and the stock models use a different naming convention.
In the Material Editor in GMax name your material as the *.mat name (excluding .mat). That way the export utility should insert the correct material name into your exported msh file.  --- Or you can edit the file manually later which does not take long for a small model.

LOD is level of detail.
LOD0 is highest detail (most polys)
I'm not sure about vehicles.

For Tanks I have used 4 LOD's

LOD0   0 - 250m
LOD1  250-500m
LOD2  500-1000m
LOD3  1000-2000m

So beyond 2000m the tank becomes a dot.

A complete msh file will have

LOD's
Hooks
Materials
Shadow Meshes
Collision Boxes

But initially to test your object in the game you only need.

LOD0
Material

Other bits can be added as you progress.

Ashe
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #4 on: November 20, 2012, 02:28:41 PM »

I have a standard SAS mod install as well as DBW.  I'm using the standard SAS for this.
I thought I would have a look at the .tga files in the Komatsu folder just to understand but GIMP and two other graphics programs won't open them, strange.
I can't access any *.mat files in gmax (there aren't any to be found but I can see what you are talking about using the Material Editor within gmax).
Here's the one thing that is confusing me at this point:
This is the list of the Materials in my Austin_Ambulance .msh file;

[Materials]
Mtl #22
Mtl #2
Mtl #2
Mtl #3
Mtl #3
Mtl #2
Mtl #20
Mtl #0
Mtl #13
Mtl #7
Mtl #11
Mtl #14
Mtl #3
Mtl #1
Mtl #0
Mtl #10
Mtl #7
Mtl #14
Mtl #9
Mtl #19
Mtl #6
Material #2
Mtl #21

Why is there an Mtl #2 and also a Material #2 (just curious). 
I used different .bmp files to create these various materials/textures do I have to "re-skin" the truck again using .tga files (that would have been good information in the tutorials I used LOL) and then re-export to a mesh file?
Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Created my object, exported the mesh......now what?
« Reply #5 on: November 21, 2012, 02:09:21 AM »

You will not access mat files in GMax, but when you set up the material in the Material Editor slot (I am describing Max) you must give it the name of the mat files which will load the tga in the game.

It seems that you are using duplicates of various materials rather than a single entry.
That is untidy but should not stop things working.

I use a Multi/Sub-Object material, so all the model tga's are in one slot of the Materials Editor.
Reference drawings etc, which will not be exported, are in other slots.
I think you are using many slots in the Materials Editor ---- but it doesn't matter for now.

The Mtl #22 type names are auto generated. You must change them in the Material Editor
Change the name in box where you see Mtl #22

In your [Materials] list.

Find the name of the first one, Mtl #22, in the Materials Editor
Change it to the mat file name, so for skin1o.mat, in the materials editor you will name it skin1o
Now the exporter should use that name. Try a re-export.

If skin1o.mat is the control file for skin512.tga then within the Materials Editor
In Materials Editor in Bitmap Parameters you will see the image file skin512.tga
In your case this will be a bmp. You need to change the source file to tga, at least in the game.

Using Multi/Sub-Object your material editor would look like this



One material slot but with a separate ID for each tga file.
This is much tidier and avoids duplicate material references in the export.
- but its not obligatory.
The example is from the Caio Dulio Battleship model.
If you download it you will see the mat files and tga files which correspond to these entries.
Forget the Multi/Sub-Object stuff for now.

Note: For small models, like your ambulance, only one texture file is normally needed for LOD0, a 512x512 tga file.
If you are using many separate files maybe you should consider combining them into one?

Here is an example of the Material Editor with a single texture material slot highlighted.
skin1o.mat -- named skin1o in the Material Editor, relates to skin1o.tga a 32bit texture with alpha channel used, hence the entry in the opacity part of the Maps section.

Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #6 on: November 21, 2012, 11:43:52 AM »

Asheshouse;
thanks.  Yes it is untidy, I freely admit that.  It is mainly due to me not understanding how it worked and fumbling along :-\.  I definitely need to go back and "re-skin" using the one texture and a .tga at that.  Things are beginning to become more clear as I try different things (and you experts point out my errors, LOL).
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #7 on: December 01, 2012, 02:36:44 PM »

Well, I put all of my reference images in one big template and created a .tga file out of it.  The detail of the skin seems a lot worse (more blurry, less defined) than when I used individual .bmp files.
I've 'attached' all the objects and run the buggy buggy and have the Listener file.  I'm about to switch around so to speak with the Komatsu vehicle.
BTW, copying the text from the Listener file into Notepad, is it supposed to be such a pain in the butt?  :-\  "Select All" does not select all and it took me awhile, bit by bit to copy the text.  What a pain. LOL
Logged

SAS~Loku

  • SAS Team
  • member
  • Offline Offline
  • Posts: 662
Re: Created my object, exported the mesh......now what?
« Reply #8 on: December 01, 2012, 03:02:04 PM »

When you have your listener open select few lines from the top and than click righ mouse button and use "select all" it should make all listener text selected (highlited) as black than click again right mouse button and select "copy" than paste it into a new txt file.It works for me and copying  all content from listener is not so hard.
Logged
P7a/P11c/f/g P24a/b/e/f/g PZL23/42 PWS-10/26 R-XIII RWD-10/14 GeeBeeR1/R2/Granville P-45 , WhippetMkI, Sdkfz-234/1/2, Kurogane, TKS, Wz.29/34 and some other shit XD

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #9 on: December 01, 2012, 03:02:55 PM »

Using the Komatsu_G40 as my "switch" file I've placed the following files into the KOMATSU folder;

Austin_Ambulance_Template.tga  (texture file. This is the main source of my textures, a compilation of various parts of the truck)

Dead.msh  (this still has the Komatsu info in it for now as I'm not sure what to do with it)
Dead.sim (both lines commented out // as there are no collision meshes as yet)
Live.msh (contains the text from my Listener file)
Live.sim (both lines commented out // as there are no collision meshes as yet)
Tire_test.tga (texture file)

I noticed there are adjustments to be made regarding the .ini files
do I need to do all of the following?
ADD_chief
ADD_stationary ---->  that's a given
ADD_technics
ADD_technics_ru
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #10 on: December 01, 2012, 03:04:49 PM »

Loku;
I know about "Select All" but for some reason it only selects so far down the text, it doesn't select everything so I have to Select All, cut, paste go back, Select All (for the next chunk), cut paste and go back etc ad naus.
Logged

tomoose

  • Modder
  • member
  • Offline Offline
  • Posts: 1715
  • Iiiiiiiit's ME! Hurrah!!
    • 71 "Eagle" Squadron
Re: Created my object, exported the mesh......now what?
« Reply #11 on: December 08, 2012, 12:00:56 PM »

I've substituted the .msh files with the Gomatsu file and made all the changes as indicated to the "chief", "stationary", "technics" and "technics_ru" but no joy.  The game starts but my vehicle doesn't show up in Stationary Objects. 
Do I need to alter the "chief", "technics" and "technics_ru" files?  All of them, some of them?
thanks,
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 26 queries.