Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with custom models, need tutorial
Mr Robville Offline
Junior Member

Posts: 11
Threads: 3
Joined: Dec 2011
Reputation: 1
#1
Trouble with custom models, need tutorial

Hello all,

For some time I have been trying to import my custom models into a custom map I made.
The custom map works (just a flat surface with a lantern and that's it.)

but as soon as I want to add some own models I get stuck.

There is no import function in the level editor, neither is there an easy to read tutorial of how to do this.

now I did found this topic:
http://forum.frictionalgames.com/printth...p?tid=8514

but I still am stuck with the following things:
. my models appear grey-textured in the model viewer.
. I don't know how to setup the .dds values in photoshop (if it's the case)
. what's the checklist I must go through when the model viewer does not generate the .mat and .ent files?
. what's the diffrence between using .JPG files and .DDS files?
. After the model viewer.. what's next? I still see no objects appear inside the library.


here's the model I'm talking about:

[Image: stair-1.jpg]

It normaly has more textures, but for the test I just applied one to it.
as you can see there is some texture on it, but it's grey.. the actual texture is oak colored.

Any help would be greatly appreciated!
(This post was last modified: 12-26-2011, 08:19 PM by Mr Robville.)
12-19-2011, 10:33 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Trouble with custom models, need tutorial

An exported model must be a .dae, which I'm assuming it is because it's in the viewer. Did you apply the UV map in the 3D modeling program FIRST? It won't apply correctly if you apply the .mat in the ModelEditor alone. Open it in the 3D program again and apply the UV mapping, THEN make a .mat, open the .dae in ModelEditor (you should see the texture now), and arrange your .ent the way you need it. Save in your "entities" folder and it SHOULD show up in the level editor library.

Also, you can use .jpg, .png, .dds, or .tga... Only differences are that jpgs do NOT support transparent alpha channels. I'd stay away from those as much as possible, because they even wear down the picture quality =\... I usually use .png because they DO support alpha channels and are high quality. I'm not exactly sure about DDSs, though I feel they hold layers and higher details, as well as mipmaps (i have no idea what those are either >> ) and .TGAs... I don't know. I never use them.

Hope this helps ya =]

Model looks amazing by the way!
(This post was last modified: 12-19-2011, 11:15 PM by Statyk.)
12-19-2011, 11:13 PM
Find
Mr Robville Offline
Junior Member

Posts: 11
Threads: 3
Joined: Dec 2011
Reputation: 1
#3
RE: Trouble with custom models, need tutorial

Thanks a lot (both help and compliment)

Yes I apply the texture and UV map inside the modelling tool (Cinema 4D is what I use)
I'm not sure how you mean this: "...e UV mapping, THEN make a .mat, open the .dae i..."

I don't have any .mat files, the only 2 files I have now is the Oak.PNG texture, and the staircase.DAE
when I used the .PNG file, the model was finaly shown in color, and a .MSH file is now created inside the folder of the staircase.


, in the meantime I have been trying a bit.
The model opened fine in the Model Editor. and I exported it to an .ENT file.
But when I load the map in the level editor, I can't find my model anywhere.


EDIT-------------
Alright, I still couldn't find the model when it's saved in the custom missions folder. but as soon as I copied it to the original game file entities... well take a look at this:

[Image: Amnesia2011-12-2021-13-07-11.jpg]

huray!
Collissions still don't work, but I figured I can add these in the model editor.

Still I want to know how to make it appear in the entities list when it's in the custom missions folder.
(saved to D:\Steam\SteamApps\common\amnesia the dark descent\custom_stories\Titanic\entities\Staircase)
(This post was last modified: 12-20-2011, 09:18 PM by Mr Robville.)
12-20-2011, 09:04 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#4
RE: Trouble with custom models, need tutorial

The .mat file is created upon viewing the model in modelview or ModelEditor, as long as it has a texture assigned within your modeling program. The .mat file tells amnesia where to look for the texture of it. Photoshop has a .dds plugin which will allow you to save your images as the ".dds" format. It is free to download. Why use it? It is far more effective performance wise to have your textures in ".dds" than in ".jpg".

Finally; The staircase has no need of an .ent file, just have it as a static object.

Edit: Save it in the static objects folder. Collision is automatically added to the mesh then.
Edit2: The models looks nice but the textures look awfully stretched :>

[Image: mZiYnxe.png]


(This post was last modified: 12-20-2011, 09:29 PM by Acies.)
12-20-2011, 09:11 PM
Find
BlueFury Offline
Senior Member

Posts: 470
Threads: 30
Joined: May 2011
Reputation: 9
#5
RE: Trouble with custom models, need tutorial

WOW, this staircase looks really good!

Sticks and stones may break our bones, but words will break our hearts. – Robert Fulghum
12-20-2011, 09:14 PM
Find
Mr Robville Offline
Junior Member

Posts: 11
Threads: 3
Joined: Dec 2011
Reputation: 1
#6
RE: Trouble with custom models, need tutorial

Thanks for the (fast) replies!

I'll try to play with the .dds settings, so far it didn't show right once loaded in the model viewer.

I don't see a .mat file created after I loaded the model into the model viewer, I use .PNG for this one, maybe that has something to do with it?

but if .ENT files are not meant for static models, how do I create collissions for them then? Should I use the level editor for it?

Also can you still explain why the model isn't shown on the objects/entities list in the editor when added to the custom missions folder only?


Sorry for all of these questions, but I'm really curious of how to add these models ingame.
12-20-2011, 09:31 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#7
RE: Trouble with custom models, need tutorial

(12-20-2011, 09:31 PM)Mr Robville Wrote: Thanks for the (fast) replies!

I'll try to play with the .dds settings, so far it didn't show right once loaded in the model viewer.

I don't see a .mat file created after I loaded the model into the model viewer, I use .PNG for this one, maybe that has something to do with it?

but if .ENT files are not meant for static models, how do I create collissions for them then? Should I use the level editor for it?

Also can you still explain why the model isn't shown on the objects/entities list in the editor when added to the custom missions folder only?


Sorry for all of these questions, but I'm really curious of how to add these models ingame.
okay, I'll explain these one at a time...

1) Always apply the texture in the modeling program before exporting it as a .dae.

2) .mat must be made in the MaterialEditor. Open it and change "decal" to "soliddiffuse". Check off "diffuse" in the bottom section and pick the little "..." button. Find the image and save it in the same folder as the staircase.

3) Then there's your issue with the level editor... The level editor's resources are ONLY found in the folders that are supported in the LevelEditor window. For example, "entities", "static_objects", "billboards", "particles", etc hold the necessary files to place in the program. Make a folder in the "static_objects" folder named "Rob_Staircase" and place EVERY file concerning the new staircase in there. you should have the .png, .dae, .msh (this appears automatically when you open the model in the ModelEditor), .mat, and possibly .ent. But like Acies said, the .ent isn't really necessary for static objects like this, my mistake. .ent are only necessary for models that have abilities or info, like a monster, key, door, boxes that are picked up, any object touched or able to be scripted.
(This post was last modified: 12-20-2011, 10:09 PM by Statyk.)
12-20-2011, 10:00 PM
Find
Mr Robville Offline
Junior Member

Posts: 11
Threads: 3
Joined: Dec 2011
Reputation: 1
#8
RE: Trouble with custom models, need tutorial

Thanks a lot!
things are much more clear for me now.

I noticed that I don't need to make any collissions when the model is static.

I did another test with a smoking room, the model viewer crashed at first (probably because textures were .jpg aswell as .bmp) so I deleted them all.
but then the model kept crashing. Is there a polygon limit?

After I split up the model and this time exported it into the same folder as the one texture of wood I applied to it, it worked. but the texture was grey again. I'll try the .mat file now to see if that does some change to that.

[Image: Amnesia2011-12-2022-26-27-99.jpg]
[Image: Amnesia2011-12-2022-21-27-42.jpg]





EDIT---------
I can't load any texture in the material editor when I click on the"..." button, it only seems to find exstising textures. I guess all textures need to be .DDS


Quote: Edit2: The models looks nice but the textures look awfully stretched :>
The Model originaly has multiple textures, the UV layout is kept the same.
To see screenshots of the fully textured staircase, see this page:
http://www.moddb.com/mods/mafia-titanic-mod
this is where it's originaly created for.

(This post was last modified: 12-20-2011, 10:57 PM by Mr Robville.)
12-20-2011, 10:44 PM
Find
Mr Robville Offline
Junior Member

Posts: 11
Threads: 3
Joined: Dec 2011
Reputation: 1
#9
RE: Trouble with custom models, need tutorial

Ok, I finally managed to get the models fully working ingame.
It seems that all textures must have an equal resolution.
that means that textures with 300X400 pixels or 530X890 pixels don't work, only if you change their resolutions to 512X512 or 700X700. it must be absolute squares.

so the .mat trick hasn't been used.
I kept all textures in .PNG format. result:
[Image: 2011-12-24_00002.jpg]
[Image: 2011-12-24_00001.jpg]


Thanks a lot for the kind help all!
12-26-2011, 08:24 PM
Find




Users browsing this thread: 2 Guest(s)