Phoroneus
Member
Posts: 141
Threads: 12
Joined: Feb 2011
Reputation:
0
|
Model trouble.
http://i53.tinypic.com/14eb9m0.png
This is as close as I've come to having a functional model in-game. The top right is how the model appears in ModelView, the bottom right is the ModelEditor view (all of the meshes in the model are centered on the origin with 0, 0, 0 rotation), and the left is the level editor view.
The .mat files (and the .dds files before them) are named for the .dae file with extensions (<name>_copper.mat, <name>_silver.mat, <name>_steel.mat) and are in the same folder as the .dae and .msh files, which is in the static_objects folder in the base Amnesia directory.
As you can see, the model does not actually appear in the level editor, only its wireframe is visible.
The ModelEditor program consistently squashes all the component meshes of the model into the center, and when I combine them all in Blender into one mesh, it only shows the main wall plane (the backside of which is visible by wireframe in the linked image).
Additionally, the modeling tutorial on the FG wiki is less than helpful in this area, and the dozens of other threads on modeling have been essentially aimed at very specific issues rather than an overall explanation (i.e. "do this and it'll fix it" rather than a step-by-step process).
If anyone who has successfully exported custom models from scratch could help, that'd be much appreciated. I don't believe Blender is causing this issue (since ModelView works just fine), it seems like it's just something completely undocumented that must be done in order to get the models to appear in-game and not be butchered by the model editor.
Upon doing the same thing with just a one meter square cube, I get the same result. ModelView shows up fine, ModelEditor brings the mesh to the center (but being just a cube this doesn't matter), and attempting to place it in the level editor gives me a wireframe if I select it, and nothing (invisible) otherwise.
(This post was last modified: 08-09-2011, 10:08 PM by Phoroneus.)
|
|
08-09-2011, 09:47 PM |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
RE: Model trouble.
I've had issues with the reset pivot point, as well as the model sometimes becoming huge.
There are a few things you should check. First, even though the modelview loaded fine, check it's log for any warnings. The problems I mentoned before, well I'm not completely sure, but there are a few things to do that might fix it:
-Make sure your textures are pow2 dimensions
-Freeze transformations on your model
-Possibly reset pivot point on model?
This page on the wiki has a lot of info on the engine. It was made for HPL1, but a lot of it seems to still apply: http://wiki.frictionalgames.com/hpl1/doc...ment.chap2
(This post was last modified: 08-09-2011, 10:41 PM by MrBigzy.)
|
|
08-09-2011, 10:41 PM |
|
Phoroneus
Member
Posts: 141
Threads: 12
Joined: Feb 2011
Reputation:
0
|
RE: Model trouble.
Thanks. I'll give those a check. My textures are 2^n dimensions so I know that's not it (I spent half an hour scaling and cropping them all to 512 or 1024 or 2048 squares yesterday) but I'll see what else I can find out. Thanks for the link, I'll see if that does it.
Bah, no luck. Downloading Maya 2011 now to try the OpenCOLLADA plugin and see if it really is Blender that's causing trouble.
If anyone who has released models wouldn't mind putting up a step-by-step overview, I'd be much obliged.
(This post was last modified: 08-10-2011, 12:00 AM by Phoroneus.)
|
|
08-09-2011, 11:29 PM |
|
Endlvl
Junior Member
Posts: 28
Threads: 4
Joined: Aug 2011
Reputation:
0
|
RE: Model trouble.
Hang on I gotcha what ur missing is obv u need a body for the mdoel this can be done with the shape creation tools in model editor look it up in the tutorial page on the wiki this defines the body of the model as well as giving it mass and tangebility so for a box imported as a dae u would create another box in the editor to encompas it change that to a body and then edit its properties u can see how a body looks if u load up any other ent file
|
|
08-10-2011, 02:54 AM |
|
plutomaniac
Super Moderator
Posts: 6,368
Threads: 45
Joined: May 2011
Reputation:
183
|
RE: Model trouble.
the problem is that you cannot see it textured in ModelEditor and you can only select it while being invisible?
|
|
08-10-2011, 08:17 AM |
|
Phoroneus
Member
Posts: 141
Threads: 12
Joined: Feb 2011
Reputation:
0
|
RE: Model trouble.
I can see the models in ModelEditor, with textures, but all of the separate meshes which make up the models are rotated to 0, 0, 0 and placed at the origin in ModelEditor (see the pic in my first post for what I mean ModelEditor is bottom right, ModelView is top right and is displayed properly). I've done a test in which I assigned a body to a basic textured cube, and even that doesn't show up in the level editor. Besides that, the entity in the image is a static object, not an .ent, so should be usable by the level editor in .dae format.
The only model I have functioning is an edited version of the regular torch_static entity (essentially I took away the sconce, leaving just the torch itself). It functions perfectly in all of the editors and in-game. I think it has something to do with the texture itself, since the texture of the torch is already in-game (and I didn't add any new textures to the torch, just remapped the UVs of the torch to cover the bare spots).
Problem is, I've made .mat files of all the materials using MaterialEditor, so I don't know what else could be holding them back. If it's any help, the mesh textures appear to be correctly rendered in ModelEditor, they're just all centered at the origin instead of properly relative to each other.
|
|
08-10-2011, 10:08 AM |
|
plutomaniac
Super Moderator
Posts: 6,368
Threads: 45
Joined: May 2011
Reputation:
183
|
RE: Model trouble.
For the 0,0,0 thing, fix the model in the ModelEditor and create a .ent file. In general, you can delete the .msh files since they are useless. Well, if the textures cannot be seen in ModelEditor it seems like the .dae file is searching for the textures in the wrong place. Go to Documents\HPL2 and see ModelEditor.log. It should show some Texture not found warnings. If I am correct then that can be fixed in blender hopefully.
|
|
08-10-2011, 12:02 PM |
|
Endlvl
Junior Member
Posts: 28
Threads: 4
Joined: Aug 2011
Reputation:
0
|
RE: Model trouble.
My last post was an educated guess looking further into it we can assume that ur model.dae and texture aare working so by order of elimination its the mat file or the entity file. If all the files are placed in one folder in the entities>>category (I'm assuming that's what u ment by base directory) u shud open up the dae in notepad and find the initialize file for me it was set to a file I had on my desktop but even after I delelted said file it functioned because the name matched the end of the initialize file (/init) if the model editor opens it correclty but overlaps them try moving them manually or combining them in blender. Once the ent is exported correctly then I'm faairly certain it shud work as long as all are in one place
|
|
08-10-2011, 04:10 PM |
|
Phoroneus
Member
Posts: 141
Threads: 12
Joined: Feb 2011
Reputation:
0
|
RE: Model trouble.
(08-10-2011, 12:02 PM)plutomaniac Wrote: For the 0,0,0 thing, fix the model in the ModelEditor and create a .ent file. In general, you can delete the .msh files since they are useless. Well, if the textures cannot be seen in ModelEditor it seems like the .dae file is searching for the textures in the wrong place. Go to Documents\HPL2 and see ModelEditor.log. It should show some Texture not found warnings. If I am correct then that can be fixed in blender hopefully.
Textures are working in ModelEditor, actually, it's just the level editor that doesn't show them. ModelEditor only has a problem with setting meshes to origin, and when I combine the meshes in Blender they all fail to render in ModelEditor apart from the "joined to" mesh (i.e. the one selected in Blender when the Join function is used).
(08-10-2011, 04:10 PM)Endlvl Wrote: My last post was an educated guess looking further into it we can assume that ur model.dae and texture aare working so by order of elimination its the mat file or the entity file. If all the files are placed in one folder in the entities>>category (I'm assuming that's what u ment by base directory) u shud open up the dae in notepad and find the initialize file for me it was set to a file I had on my desktop but even after I delelted said file it functioned because the name matched the end of the initialize file (/init) if the model editor opens it correclty but overlaps them try moving them manually or combining them in blender. Once the ent is exported correctly then I'm faairly certain it shud work as long as all are in one place
I'll try both. The .ent solution should work, but the model is supposed to be for a static object (direct from .dae) so I hope the "combine in Blender" solution has better success this time than last.
Development:
Using built-in Amnesia textures (tiledfloor under the castlebase category) works fine. Apparently the only thing I'm doing wrong has to do with the textures. I'll see what I can figure out and report back.
Success! Well, sort of. I got the static_object version of a test cube to render properly in the editor. Apparently the trick is just to include the texture in the same folder as the .dae rather than calling a texture from another folder. Trying to call the static_object texture from an identical entity (in the entities folder) does not work.
Hopefully this concludes my difficulties. Hopefully.
(This post was last modified: 08-11-2011, 03:55 PM by Phoroneus.)
|
|
08-11-2011, 03:38 PM |
|
plutomaniac
Super Moderator
Posts: 6,368
Threads: 45
Joined: May 2011
Reputation:
183
|
RE: Model trouble.
Of course! In .dae the textures must be in the same folder. At least that's how Amnesia works. That's why I told you that the .dae file is searching for the textures in the wrong place.
(This post was last modified: 08-11-2011, 04:47 PM by plutomaniac.)
|
|
08-11-2011, 04:47 PM |
|
|