Trouble with custom models, need tutorial - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Trouble with custom models, need tutorial (/thread-11955.html) |
Trouble with custom models, need tutorial - Mr Robville - 12-19-2011 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/printthread.php?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: 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! RE: Trouble with custom models, need tutorial - Statyk - 12-19-2011 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! RE: Trouble with custom models, need tutorial - Mr Robville - 12-20-2011 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: 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) RE: Trouble with custom models, need tutorial - Acies - 12-20-2011 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 :> RE: Trouble with custom models, need tutorial - BlueFury - 12-20-2011 WOW, this staircase looks really good! RE: Trouble with custom models, need tutorial - Mr Robville - 12-20-2011 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. RE: Trouble with custom models, need tutorial - Statyk - 12-20-2011 (12-20-2011, 09:31 PM)Mr Robville Wrote: Thanks for the (fast) replies!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. RE: Trouble with custom models, need tutorial - Mr Robville - 12-20-2011 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. 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. RE: Trouble with custom models, need tutorial - Mr Robville - 12-26-2011 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: Thanks a lot for the kind help all! |