PDA

View Full Version : Where do .msh files go?



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

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

seir
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)

http://img199.imageshack.us/img199/6403/modelname.jpg

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".

http://img10.imageshack.us/img10/386/materialst.jpg

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

house_small_a.mat:

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:

house_small_a.skn:

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.dds
house_small_a_nrm.dds (optional)
house_small_a_shn.dds (optional)
house_small_a.mat
house_small_a.msh
house_small_a.skn

In:
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

StardogC
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?

seir
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

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

http://img223.imageshack.us/img223/9640/34073410.gif

seir
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.

http://img242.imageshack.us/img242/5427/34073410.jpg

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

StardogC
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.

seir
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?

StardogC
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

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

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

OHH I SEE NOW!

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

Groucho2
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.

Thanks!

seir
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.

Groucho2
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!

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

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

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

podi2
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?

seir
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:
http://www.cojmodding.com/?id=tutorials&sub=manuals

podi2
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)
right?
after:
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:
a4ccbc78.dds.mat
c1eecbf6.dds.mat
0861d3a0.dds.mat
78d3a010.dds.mat
e9fcc643.dds.mat
6babf432.dds.mat
3e71b89d.dds.mat
0d2432cf.dds.mat
c0f98f79.dds.mat
fbd1603f.dds.mat
4660c945.dds.mat
so what's the .mat script?

seir
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.

ChromED:
ground.mat
brick.mat
window.mat
wood.mat

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!

podi2
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
so?
my .msh name is loco.msh
what's the names of 11 diferents .mat ?
"name of texture id1".mat
"name of texture id2".mat
etc...?

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

seir
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...

podi2
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?
so..
what's the names of 12 diferents .mat ?

seir
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.

podi2
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)
and
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?
right?
no way to see always this bump from all player positions?

seir
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.

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

seir
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.

podi2
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...)

hmmm...
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.. )

seir
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.

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

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

podi2
03-16-2010, 05:40 AM
humm..
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..
http://forums.ubi.com/images/smilies/16x16_smiley-wink.gif

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