"How to" MPR++ ship models (ogre format)

MPR++; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

"How to" MPR++ ship models (ogre format)

Post by thunderchero »

Hi Everyone,

with all the questions about ogre models I thought I should post some more info on subject. here is the basic "how to" I have used to create models for version MPR++ v0.2.6c

each release this info might change slightly so be sure to check for changes when new versions are released.

DIFFUSED (standard) mapping

This is the same as we always used in hob creation here is an example of a diffused map being used.

Image

I have been also using (texture name).bmp for diffused maps.

BUMP Mapping

Bump (also known as normal) mapping has now been added to the latest non public release of MPR++. I am using NVIDIA Normal Map Filter for adobe CS4 to create the bump map texture. Here is an example of a bump map being used.

Image

I have been also using (texture name)b.bmp for bump maps.

Currently I am just using basic settings to create bump map and applying it to full texture. But we can get a lot more creative on how it is applied by doing overlays of just parts of texture and applying higher/lower values.

LIGHT Mapping

As seen before we can also use light/illumination textures while black and white types can be used the colored ones look much better. Here is an example of a light texture being used

Image

I have been also using (texture name)i.bmp for light maps.

3DS Creation and Mapping

I will not go into any detail on this, But Dr_Breen's tutorial is a great reference.

I will note on mapping any vertical mapping (see below) will display poorly. so use caution to map every polygon.

Note; unwrap can select "Degenerated UV's" so they can be easily remapped.
Note 2; when mirror mapping is used it displays best if mirrored edge is horizontal.

Image

Ship orientation is the same as before as with hob models.

Also it is very important to have only 1 object and 1 material and to keep it simple both should use same name.

Mesh creation/conversion

I am currently using 3ds format for mesh conversion.

First you would need Ogremax for 3ds max (this will install on any version of 3ds max)

I will not even pretend to know everything we need to know about this program, there is still so much to learn.

I will only show you the basics

after you have installed Ogremax you will see a new listing in your toolbar (see image)

Image

After you import your 3ds model you will need to set the Object Settings

Image

The area above in red is what I will set to "YES" other setting are fine. Generate Tangents is very important for bump mapping.

Lod I will not get into this much, but here is the menu.

Image

Currently the Lod levels would need to be created manually and added manully to prevent texture mapping distortion.

The next setting that needs to be set is using the smooth modifier of 3ds max.

Image

In plane on right select modify then in modifier list select Smooth. On most models the "Auto Smooth" should work fine.

Now it is time to export your mesh, here is export dialog.

Image

select location and give name and at bottom be sure to change to "mesh" and save.

This will create 2 files a *******.mesh and a *******.material

The mesh you will need to use the upgrade tool to upgrade mesh to latest version. This is done just by dropping the mesh into the "OgreMeshUpgrader.exe" from the command line tools

Now the material that was generated was only a basic material with only diffiused mapping info, so this will need to be edited.

Code: Select all

// change "galor" to match the material that was generated
material galor
{
	technique
	{
		pass
		{
			// Comment the specular in order to use only diffuse based normal map technique.
			//	specular 1.0 1.0 1.0 32 specular 0.8 0.8 0.8 1 51.8
			ambient 1 1 1 1
			diffuse 1 1 1 1
			specular 0.2 0.2 0.2 1 15.0
			emissive 0 0 0 1

			texture_unit
			{
			  // change "galor" to match the diffiused texture name
				texture galor.bmp
				tex_coord_set 0
				colour_op modulate
			}

			texture_unit
			{
			  // change "galor" to match the light texture name
				texture galori.bmp
				tex_coord_set 0
				colour_op add
			}

			// RT Shader system section.
 			rtshader_system
 			{ 	
 				// Override lighting stage with normal map lighting.
 				// change "galor" to match the bump texture name
 				lighting_stage normal_map galorb.bmp tangent_space 0 bilinear 1 -1.0
 			}
		}
	}
}
Just copy and paste the script above and edit where indicated.

Creating a placeholder and phasers

I just started using this method and every placeholder so far has been a perfect match scale.

but some editing of combat distance between fleets may be needed as well as starbase/outpost distance. Also Flocke has added to his to do list, for research screen to auto adjust displayed mesh to allow editting of ship to ship distance of same fleet by using hob file combat distance. This will allow much better placement of ships in combat view.

This is something new but most will know basics.

Open Creator (I know don't say it) open my slot.flt then import the same 3ds used while converting to mesh.

Note; the orientation (X, Y, Z) of a 3ds will change when imported into creator (this is same as always) this just a notation.

To scale model to 1.00 (this is what ever is the longest/widest/height of model) to 1 meter and keep aspect ratio.

first your scale in 3ds does not matter when imported to creator.

With model slot.flt and model 3ds loaded in creator select all and open scale window.

Image

In X Y X area of window select the largest value and change to 0.500000

Image

then copy new value across from value you just entered

then paste it into the other two areas

once all value have been changed press ok

Image

If you want to check scale (size of X, Y, Z) open info/statistics.....

Image

also if you want you can compare it to the 3ds in unwrap after model is "scaled to" 1.0

Image

in hierarchy view on bottom click scroll button to open up objects then you should see this

Image

next move o9 next to slot08 and delete low (in this example) and should look like this

Image

next select the polygons you want for phasers to fire from and place 1 in each slot0* object.

next create a new object and place it next to "o9" object like this.

Image

Next you need to select 1 polygon from each of the furthest point of your model (front, rear, left, right, top, bottom) this will be used for selection box while in combat and keep scale correct.

copy the 6 polygons and paste them, next move them into the empty object you created "o10" then delete o9 and default objects.

now "save as" the hob file name that would be used (hh4_a.flt)

Next you will need to convert to hob. here is a great little tool QD created for me. flt2hob folder just extract to a location with no spaces (C:\) is what I use.

copy the flt you just created to flt2hob folder. Then open a command prompt. Next drag and drop "FLTtoHOB.bat" into command prompt, then hit space bar, then drag and drop your flt into command prompt, then hit space bar again, next just type the 100% of the scale you want for your model in meters (in this case the model is 165 meters so enter 165.0) then press enter. A new .hot and .hob file will be created.

Note; on scale the value used should be the largest part of the model so if model is wider than it is longer use width and so on.

Image

As normal create copies of hob for (hh4_a.hob, hh4_b.hob, hh4_c.hob) to add to stbof.res.

btw no other changes are needed to palette or setting of texture.

Now you have a 14 polygon placeholder/phaser slot hobs.

Creating a "NEW" ship pack

first create a new folder in "install location"\mpr++\data\shippacks name it whatever you want in this case it will be "thunder"

open the new folder and create a zip file with all the meshes, materials, and textures for your model or models. name it "gfx.zip"

next create a new xml document and name it "package.xml" (I will show how to edit this file in editing ship pack section)

next in "install location"\mpr++\data folder you will need to edit the "ElementDB.xml" so ogre will use your new ship pack.

here is what is most commonly in ElementDB.xml

Code: Select all

<ElementDB>
   <ref file="database\races.xml"/>
   <package file="shippacks\vanilla_ECMpack\package.xml"/>
</ElementDB>
here is what it would look like edited if both ship packs are to be used. you can have as many ship packs as you want.

Code: Select all

<ElementDB>
   <ref file="database\races.xml"/>
   <package file="shippacks\vanilla_ECMpack\package.xml"/>
   <package file="shippacks\thunder\package.xml"/>
</ElementDB>
Next you would need to edit the "resources.cfg" it is located in the "install location"\mpr++ folder. it is basicly the same as ElementDB.xml but for the zip file for model files.

I will only show first part of file that needs to be edited.

before editing (common)

Code: Select all

#Ressources like meshes and materials to load by Ogre
#use either Zip= or FileSystem=, [] marks a categorie

#ShipPacks:
#======================================
[ShipPacks]
Zip=mpr++/data/shippacks/vanilla_ECMpack/gfx.zip

#SkyBoxes:
#======================================
[SkyBoxes]
Zip=mpr++/data/skyboxes/space01.zip
after editing

Code: Select all

#Ressources like meshes and materials to load by Ogre
#use either Zip= or FileSystem=, [] marks a categorie

#ShipPacks:
#======================================
[ShipPacks]
Zip=mpr++/data/shippacks/vanilla_ECMpack/gfx.zip
Zip=mpr++/data/shippacks/thunder/gfx.zip

#SkyBoxes:
#======================================
[SkyBoxes]
Zip=mpr++/data/skyboxes/space01.zip
Editing/Adding new models to an existing ship pack

All of these files would need to be edited when creating a new ship pack too.

first the package.xml in "install location"\mpr++\data\shippacks\vanilla_ECMpack

here is what is commonly in package.xml if only 1 ship is part of ship pack

Code: Select all

<package unitScale="2.0">
	<data>
		<UnitClasses>
			<ship id="card_Hideki"			  name="Hideki"			    type="Scout"				     mesh="Hideki.mesh"		      sizeX="40.9"    sizeY="8.6"     sizeZ="44.4"/>
		 </UnitClasses>
	</data>
</package>
The first line is for general scale of models so if it is unitScale="2.0" the phasers slots in trek.exe should be set to 2.0 as well.

ship id="card_Hideki" this is what will be most commonly used in most resource files.
name="Hideki" this would be the name of the model as in ship stats of stbof.res
type="Scout" this would be the ship type of the model as in ship stats of stbof.res
mesh="Hideki.mesh" This must match the mesh in the gfx.zip exactly
sizeX="40.9" sizeY="8.6" sizeZ="44.4" This is the size of your scaled model.

here is an example with 5 meshes added

Code: Select all

<package unitScale="2.0">
	<data>
		<UnitClasses>
			<ship id="card_Hideki"			  name="Hideki"			    type="Scout"				     mesh="Hideki.mesh"		      sizeX="40.9"    sizeY="8.6"     sizeZ="44.4"/>
			<ship id="card_cfighter"		  name="CFighter"		    type="Fighter"				   mesh="cfighter.mesh"		    sizeX="24.8"    sizeY="5.9"     sizeZ="47.2"/>
			<ship id="card_Keldon"			  name="Keldon"			    type="Cruiser"				   mesh="Keldon.mesh"		      sizeX="106.8"   sizeY="39.1"    sizeZ="195.3"/>
			<ship id="card_Galor"			    name="Galor"			    type="Cruiser"				   mesh="Galor.mesh"			    sizeX="106.8"   sizeY="30.9"    sizeZ="195.3"/>
			<ship id="card_Hutet"			    name="Hutet"			    type="Command Cruiser"	 mesh="Hutet.mesh"			    sizeX="230.9"   sizeY="95.4"    sizeZ="272.3"/>
		</UnitClasses>
	</data>
</package>
this list can get very long.

next "HobMappings.xml" located in "install location"\mpr++\data\mappings

This file is simple

Code: Select all

<HobMappings>
   <hob name="cs_a.hob"    target="card_teroknor"/>
   <hob name="co_a.hob"    target="card_cardpost"/>
   <hob name="ch1_a.hob"   target="card_Galor"/>
   <hob name="ch3_a.hob"   target="card_Keldon"/>
   <hob name="ch2_a.hob"   target="card_gildron"/>
</HobMappings>
hob name="cs_a.hob" hob used by ship model
target="card_teroknor" this needs to be the same as ship id in package.xml

this list can get very long also.

next the UnitMappings.xml located in "install location"\mpr++\data\mappings

This file is only used by experimental combat but I suggest keeping it up to date :wink:

Code: Select all

<UnitMappings>
   <unit id="0"    target="card_Keldon"/>
</UnitMappings>
unit id="0" ship Id from shiplist of stbof.res
target="card_Keldon" this needs to be the same as ship id in package.xml

this list can get very long also.


I am sure I missed some info so you might want to check back from time to time to see if info has been updated.

thunderchero
User avatar
borgpow
Ensign
Ensign
Posts: 41
Joined: Thu May 08, 2008 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by borgpow »

hi i need help idk if this is where to ask but im asking anyway lol

i have all the tools needed to do all the above i even got creator 3.0 but for some reason my creator program has problems with more then one texture file as soon as i add a second tga or gif it adds the new texture but changes all previous textures to the new one it says its the right file but displays only the new files texture everything ive seen show creator with multi textures

thanks for any help cuz ive been really busy for like 3-4 years with work and family i started a mob bac b4 UE lol i now have plenty of time to mod im unemployed again but for about a week now ive been stuck with the most needed program to mod botf but cant use it

please help!!!
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

Hi borgpow,

nice to see some interest in this post.
borgpow wrote:please help!!!
this is a common problem other have also experienced (siggi and other). if you were creating hob format model it would be tricky.

but since all you need is a placeholder that is transparent anyway it does not matter.

if you were wanting to also create the hob version model just ignore it. The model just needs to know how many textures. (texture assignment is done in UE anyway) as long as you see the proper amount of textures in hot file model should display properly if assigned properly.

thunderchero
User avatar
borgpow
Ensign
Ensign
Posts: 41
Joined: Thu May 08, 2008 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by borgpow »

really i thought since creator was so important for making hobs that if it displayed wrong in creator it was how the hob would also be in botf but thanks ill see how it looks anyway and i dont have a copy of the new mpr++ im kinda starting from scratch i had it when it first came out tried it and never had time to really see any difference but that was the first version like 25(something) lol do u have a copy i can download

thanks for the help it was driving me crazy ill let u know how botf is with my models
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

I sent you the links, but it has not been updated since your last request Jun 12, 2013

thunderchero
User avatar
borgpow
Ensign
Ensign
Posts: 41
Joined: Thu May 08, 2008 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by borgpow »

ok one last question and i think ive got it now that i have mpr++ 0.2.6c thank you for the link i know it hasnt been updated in awhile but its good enough for now u guys are great

my question may sound stupid but im having probs again with textures. i cant seem to get all the textures into one bitmap and show properly in botf. 3ds max renders it fine and it looks great but after saving and reopening its as if the whole model only uses the first piece of the bitmap and never uses the rest ive used 3ds max to load the right parts to render it but everytime goes bac as if i changed nothing. ive tried it with 3 different models and its the same with all them. im trying to get a stargate mod together using mpr++ i only need ship models ive got menus and icons building pics ect. but i dont want to use other peoples work i want it all originally mine lol so the help u give me is going to good use.

idk maybe just a detailed "how to" just for mpr++ texturing i think all other "how to"'s r enough to learn way more then i thought possible for botf

thanks again for ur help
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

The problem is I have never textured in 3ds, and very few do most use unwrap to texture/map models

you might send anjel a PM he is only active member who use 3ds to apply textures.

from your posts it sounds like you are planning on your mod based on MPR++? You might want to talk to Flocke first. I did this when MPR++ was first released with UDM, this was a big mistake and was pulled very quickly.

I suggest a non mpr++ version mod, but keep all files for adaptation to mpr++ patch.

thunderchero
User avatar
borgpow
Ensign
Ensign
Posts: 41
Joined: Thu May 08, 2008 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by borgpow »

ok i was hoping i could do just mpr++ but if u think its would b better to make a non-mpr++ and convert it to mpr++ then i probably should take ur advise i am a advanced noob at this but that means i have another question mapping is different for mpr++ and for a non-mpr++ right so it all comes down to texturing for me what program do u use for the mapping to use a big texture cuz i have found unwrap3d but its demo and i cant save and it also uses a small square as the mapping texture
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

borgpow wrote:i have another question mapping is different for mpr++ and for a non-mpr++ right
yes and no, a single texture will render models in game quicker (higher frame rate) plus it would take a little more editing of "material" file with multi textures.
borgpow wrote:what program do u use for the mapping to use a big texture
I use unwrap for mapping. I broke down and bought full version a long time ago

for model creation/editing I use Newtek lightwave 9.2

I was only using Autodesk 3ds (2011) for conversion to ogre format, it has the best converter I have found.

thunderchero
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3237
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: "How to" MPR++ ship models (ogre format)

Post by Flocke »

well, just be aware that I can't provide much support on mpr++ for now and it has some issues like end game video crash and freezes on long turn compution and fullscreen switch incompatibilities on some systems and autosave sync errors in mp and misaligned combat selection for widescreen resolution and what not
it's not still alpha by request for without reason, and the ship conversion options are not that great yet either as you still need the dummy hobs for phaser and torpedo launcher placement and the selection box
so I'd prefer not to publish this based on mpr++ yet but keep it on request for now
however I'm confident to get an update ready in some time so you can just start to build up on it and see whether to convert the models to hob later :)

cheers
User avatar
borgpow
Ensign
Ensign
Posts: 41
Joined: Thu May 08, 2008 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by borgpow »

ok i have added several models they work fine in mpr++ even phasers work but since u guys said mpr++ isnt at a point where mods can b made based on mpr++ i tried adding it to non-mpr++ botf and ive noticed i cant do anything with hobs textures cuz ue shows a million texture place holders over a full screen and they all have borg texture as default idk what to do but just stick to mpr++ and find a way in the future to fix non-mpr++ hob textures but im not worried an update to mpr++ is coming soon right lol

thank you for the help and as soon as i have a tauri ship list going for my mod ill post it for everyone but it probaby will have to b mpr++ for now

*Edit: wow im stupid i think ive been staring at a computer screen too long i think i skipped a step with the non-mpr++ textures im gona retry it step by step ill let u guys know if i still have a problem
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

this topic is for ogre format models only it has nothing to do with hob format models.

you need to follow instructions here for hob format models
viewtopic.php?f=143&t=1795

the only thing they have in common is the original 3ds file and model textures (it is recommended mpr++ textures be combined to 1 texture)

thunderchero
User avatar
meslinjf
Cadet 4th Year
Cadet 4th Year
Posts: 17
Joined: Sun May 30, 2010 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by meslinjf »

Hello,

I wanted to try, during my free time (and very slowly) to create a ship model of the Federation Sydney Class for MPR++. I did find a .nif file and started editing its texture to match those of other ships here, but I wasn't sure it would be possible after to convert the model I have into something that could be used for BOTF. So far, the model still uses numerous texture files for each part of the model.

Do you think there's anything that could be done regarding the model or it would be prefferable to start from scratch?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: "How to" MPR++ ship models (ogre format)

Post by thunderchero »

meslinjf wrote:I wanted to try, during my free time (and very slowly) to create a ship model of the Federation Sydney Class for MPR++.
what part of the tutorial in first post are you having problems with?
meslinjf wrote:the model still uses numerous texture files for each part of the model.
MPR++ will work with multi texture models.
User avatar
meslinjf
Cadet 4th Year
Cadet 4th Year
Posts: 17
Joined: Sun May 30, 2010 2:00 am

Re: "How to" MPR++ ship models (ogre format)

Post by meslinjf »

what part of the tutorial in first post are you having problems with?
So far, I'm not there yet. I'm still playing with the texture files. I do have some problem though. I've noticed the mesh for the Nacelles is far too complex compared to the other ships in MPR++. I wanted to replace them with the nacelles that came from a more simple Miranda class ship. I haven't taken the time to download Bender and Python yet to do that. If you could give me some tips, that would greatly help me.

Here are two folders containing both models:

- Sydney Class
https://drive.google.com/open?id=0B-hoE ... FdONjhnSE0

- Miranda Class
https://drive.google.com/open?id=0B-hoE ... ml4aVNlQ0E
MPR++ will work with multi texture models.
That is very good to know though. I'm getting more confident I could actually make my own model for the mod. I've been thinking for quite some time that the Sydney Class could make a good (and cannon) transport ship for the Federation.
Post Reply

Return to “MPR++”