View Full Version : Where do .msh files go?

09-29-2009, 09:55 AM
I've exported from 3DS Max but I've no idea where to put it.

09-29-2009, 09:55 AM
I've exported from 3DS Max but I've no idea where to put it.

09-29-2009, 10:34 AM
This is my quick guide from other forum:

Quick guide:
Step 1:
Create a model in 3DSMax. Let's call it "house_small_a.max". Name your model "house_small_a_0" in 3DSMax ("0" is for LOD0, "1" is for LOD1 etc.). Make sure that your model will be exported with no errors (you can get one about no material on model - see "Step 2"). Also make sure that your model is Editable Poly and it's mapped (see "Step 2" http://forums.ubi.com/groupee_common/emoticons/icon_wink.gif)


Step 2:
Create a texture and material or use existing textures from game (with materials already created). Let's call our new files as "house_small_a.dds" (optional: normal map as "house_small_a_nrm.dds" and specular as "house_small_a_shn.dds") and "house_small_a.mat".


- Textures should be DXT5 DDS with all MipMaps.
- Material should be like this (with two enters on end!):


import "templates.mtt"

sub material()
use mtt_objects(
s_clr = "house_small_a.dds",
s_nrm = "house_small_a_nrm.dds",
s_shn = "house_small_a_shn.dds",
f_shn_factor = 0.7,

Your .skn file is used to set skins but I'll talk about it later. It should look it like this - it will make default skin:


Skin("House Small A - Skin A")

Replace("house_small_a.mat", "house_small_a.mat")
ReplaceSurface("Wood", "", "")

Step 3:
Assign your texture .dds to your model in max. To do it just create material in 3DSMax ("m" key) and name it "house_small_a" (without ""). Place your model in 0,0,0. Export your model to .msh.

Step 4:
Place this files:

house_small_a_nrm.dds (optional)
house_small_a_shn.dds (optional)

Docs and Settings/COJ2/Data/MapsExtra/<your_map>/Objects/

Now go to 'Mesh browser' and search for your model. Place it on map and see how it works.

- If it's yellow or gray - there's something wrong with .mat file or with assigning your texture in 3DSMax (see material name in 3DSMax)
- If you can't find your model it means that it should be placed in "Data/Objects"
- If it's OK it means that you're lucky guy http://forums.ubi.com/groupee_common/emoticons/icon_wink.gif

09-29-2009, 07:20 PM
I'm having the yellow model issue http://forums.ubi.com/groupee_common/emoticons/icon_frown.gif

Do you give the material and diffuse the same name?

09-30-2009, 01:07 AM
Yellow means "No material" so there's something wrong in 3DS. Material in 3DSMax should be named the same as .mat file.

Grey model means that material is good but there's no .dds

09-30-2009, 07:59 AM
Here's what I did:


09-30-2009, 08:25 AM
You named your texture but not material. Click on the icon shown by red arrows and then name your material.


Also there might be problem if you didn't made _nrm.dds and _shn.dds but signed them in .mat file.

09-30-2009, 09:28 AM
The drop-down box shows the material and the texture names. The parent is named stone_relic.

I'll try basic nrm and shn's.

09-30-2009, 10:12 AM
If this won't work pack all your files and send them to me.

Also: is this .dds is DXT5 with all mipmaps?

09-30-2009, 10:56 AM
Here's the link including the source .max file - http://www.sendspace.com/file/orel0w

The DDS should be DXT5 with all mipmaps using my PS plugin. It's probably something simple I'm missing that makes me look stupid http://forums.ubi.com/groupee_common/emoticons/icon_biggrin.gif

09-30-2009, 01:36 PM
I got it working. I think pressing "Delete shader cache" when choosing which map to open fixed it.

09-30-2009, 01:57 PM
I can't open your .max file. We have 3DSMax 9. Maybe your version is newer...


Remove that "," on the end of this line: "f_shn_factor = 1.0,"

Works fine for me http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

09-30-2009, 02:30 PM
Hey StardogC,

Since you have and know how to use 3DS Max any chance you could create an animation for the community?

I don't know much about animating but I don't think it would be a difficult animation. I need an animation in which an NPC holds their hands up (about chest high) as if someone is pointing a gun at them.


09-30-2009, 02:42 PM
You can't animate NPC without special biped model that we didn't provide (legal stuff).

You can animate only own models.

09-30-2009, 02:53 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by seir:
You can't animate NPC without special biped model that we didn't provide (legal stuff).

You can animate only own models. </div></BLOCKQUOTE>

Oh... OK thanks for letting us know.

***EDITED*** Sorry!

10-01-2009, 12:52 AM
Please, don't make OFFTOPIC. This topis is about getting .max files to .msh in game...

10-01-2009, 04:01 PM
Is there a way to get a .msh with a Multi/Sub material into the game?

10-03-2009, 10:37 AM
Yes, Multi/Sub-object is supported.

03-01-2010, 04:12 AM
hi all..

"Yes, Multi/Sub-object is supported."

but how make the . mat so?
can you make a little tutorial for that?
or a good explain?
i ve a mesh with multi/sub materials (10 dds) but dont know the way to create the file for see in chrome..
can someone help me please?

03-01-2010, 05:59 AM
Every material have its name. Make sure there's a MAT file with that name in file system.

More info here:

03-01-2010, 08:21 AM
humm...sorry i dont understand...
i see that in the manual:
Creating Materials For Textures:

import "templates.mtt"
sub material()
use mtt_objects(
s_clr = "&lt;texturename&gt;.dds",
s_nrm = "&lt;texturename&gt;_nrm.dds",
s_shn = "&lt;texturename&gt;_shn.dds",
s_dye = "&lt;texturename&gt;_dirt.dds",
b_dye_level_color_on = TRUE,
b_clr_usr_on = TRUE,
f_shn_factor = 1.0,
f_nrm_factor = 1.0);

but its only for 1 dds material (standard)
nrm.dds is for normal map
shn.dds is for specular map
but its the same dds with some effects

for my mesh i ve
1 multi/sub mat:loco.mat
with 11

sub materials:
so what's the .mat script?

03-02-2010, 01:08 AM
You have your MAT files and you can't get them into one file. It should look like this:

3DSMax &gt; Materials &gt; Multi/Sub Materials:
- ground
- brick
- window
- wood

These are the textures you used on the model.


These are the files that you have to create. One MAT file for one texture. There is no such thing like Multi/Sub Material in ChromED!

03-02-2010, 03:31 AM
you said that:
"Create one big mesh (Editable Poly, no groups), assign textures to polygons, export your model (if you have some errors while exporting send me the screenshots but on forum, not on PM)), create MAT files for every texture that you used on your model so if you have 11 textures you need to create 11 MAT files."

thanks to give me a little of your time...
my mesh is a steam locomotive..
it has 11 sub materials
(so 11 ID in max)
i understand to create 11 diferents .mat files...
now ,how assign them to only one .msh?
usualy,the .mat has the same name than msh
my .msh name is loco.msh
what's the names of 11 diferents .mat ?
"name of texture id1".mat
"name of texture id2".mat

do i create a special file like .mtt ?
thanks in advance..

03-02-2010, 04:44 AM
No, it's not like you are saying. This is not the way how models are made. First of all 11 textures is a lot. I think you need to otimize your model...

Create one big model of steam locomotive (one model means that when you click on it, every part will be selected), assign textures (Editable Poly &gt; Select Poly &gt; go to "Materials" window &gt; click on the material that should be on selected planes &gt; click on "Assign Material To Selection"). Do it for every texture you want to use on the model. Wnwrap UVW your model and export it. Go to notepad and create MAT file for every texture.

I can't write it more simple...

03-02-2010, 05:48 AM
i think you dont understand me...
or maybe its me?
like i ve said,
i ve my loco.msh (finish)
it's just a single object who has 12 ID and 12 .dds for texture (it's a multi/sub) material
see here the screenshot:
http://www.hostingpics.net/vie...d=980986locopodi.jpg (http://www.hostingpics.net/viewer.php?id=980986locopodi.jpg)
locopodi (http://www.hostingpics.net/viewer.php?id=980986locopodi.jpg)
something is wrong?
what's the names of 12 diferents .mat ?

03-02-2010, 08:18 AM
In "Name" ("Nom" in your 3DSMax) type the name of the texture and create MAT file with the same name and type the same DDS file in it.

03-05-2010, 06:53 AM
today i try to add the normal map textures to my mesh
in 3dsmax,ive for one mesh ,one color texture (color.dds)
and one normal texture(for bump)(relief.dds)

but the UVW have not the same coordonate
my color UVW is on texture channel 1
and my relief UVW is on texture channel 2

see here the 2 screenshots:

http://img7.hostingpics.net/pics/588858color.jpg (http://www.hostingpics.net/viewer.php?id=588858color.jpg)
http://img7.hostingpics.net/pics/982964relief.jpg (http://www.hostingpics.net/viewer.php?id=982964relief.jpg)

my first question:
what can i do for atrib the s_nrm to the channel 2 from 3dmax?

second question:
reliefs textures with nrm or shn depends to player position from solar ingame?
no way to see always this bump from all player positions?

03-08-2010, 02:24 AM
I asked 3D artists and they said:

1) There's no way to use different texture mapping channels on one model. You need to create diffuse, normal and specular texture with only 1 uvw channel.

2) You can only modify the factor of specular and normal visibility.

03-08-2010, 02:47 AM
ok ...thanks for ask..
hmm..one last question
can i make my locomotive drivable?
(with anim etc...)

03-08-2010, 05:54 AM
Yes, soon I'll prepare some example models and you'll be able to check how wagon is made and modify locomotive to work as wagon. Now you can move your loco on cinematic movie and play animation of moving wheels... A lot of work but possible to do.

03-15-2010, 03:08 AM
hi seir..
have you work on your's example model?
like stagecoach or coal-car?

can i open a map from game with chrome? for see coal-car in use?(waypoints ,actions etc..)

have you a the meshes 3dmax with bones?
(better for understand animations...)

can you make for me (and the team who want work on this project)
a little map with a coal-car can be use on little railway?
and maybe a vehicule like stagecoach with another name(train.msh , train.dds etc) for see how many files i need create?
another time,sorry for my poor english..
thanks in advance..
(i think you dont want work with me on this train vehicule add-on,so if you can help.. )

03-15-2010, 04:06 AM
First of all I can't work with you because I'm a Techland employee. We can collaborate in any kind of projects.

The example models are on the way but I can't tell you when they will be ready. I'm taking my private time to do that and I have a lot of other private work to be done so it might take a bit long.

03-15-2010, 04:32 AM
oh..ok thanks..
for now,im working on a static train..

03-15-2010, 09:03 AM
Good, as soon as it will be online I'll tell you.

03-16-2010, 05:40 AM
maybe since that time i can work on my train animations whith bones in 3dmax
but ...
if you have a little time
can you just create a small example:
a simply cylinder like a wheel (or two wheel with axle) whith rolling anim and bones in .max extention(ready for export) and upload it somewhere?
if you can attach the .anm ,.msh and .src its better..

03-17-2010, 07:06 PM
I'm a Level Designer, not 3D Artist and that's the problem. Everyone is busy now...