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
Importing models - Texture disappears
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#1
Importing models - Texture disappears

Just as my thread name suggests, the texture that I have applied to my model is not read by the model editor when I import the mesh. How do I make it so that it is included?

It's currently transparent by the way.

Also, is there a tutorial on how to import a model (.dae) into Amnesia and make it an entity/static object, etc. The whole process of creation would be awesome to have. Smile

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
(This post was last modified: 06-08-2013, 11:40 PM by Theforgot3n1.)
06-08-2013, 09:32 PM
Website Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#2
RE: Importing models - Texture disappears

(06-08-2013, 09:32 PM)Theforgot3n1 Wrote: Just as my thread name suggests, the texture that I have applied to my model is not read by the model editor when I import the mesh. How do I make it so that it is included?

It's currently transparent by the way.

Also, is there a tutorial on how to import a model (.dae) into Amnesia and make it an entity/static object, etc. The whole process of creation would be awesome to have. Smile

Have you created a material for the texture? You need to do this or the texture will not show up. Also make sure the texture and material have the same name (for some reason if they don't have the same name it won't work, for me anyway)

As for static objects, all you need to do is export the dae file and create a material file for the texture it uses.

To create entities you need to use to model editor - you import the dae file (the texture should show up automatically if you've created the material for the texture and made sure they're in the same folder) then create a body and adjust it so that it's roughly the same shape as the model, then attach the body to the mesh.

If you want the model to have physics - click settings at the top and change type to object, then set the subtype you want. You then need to set properties for the body, e.g mass. Hope this helps, let me know if you get stuck Big Grin It's definitely a pain until you know what to do but once you know it's fairly straightforward.
(This post was last modified: 06-08-2013, 09:43 PM by ExpectedIdentifier.)
06-08-2013, 09:38 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#3
RE: Importing models - Texture disappears

(06-08-2013, 09:38 PM)sonataarctica Wrote: Have you created a material for the texture? You need to do this or the texture will not show up. Also make sure the texture and material have the same name (for some reason if they don't have the same name it won't work, for me anyway)

As for static objects, all you need to do is export the dae file and create a material file for the texture it uses.

To create entities you need to use to model editor - you import the dae file (the texture should show up automatically if you've created the material for the texture and made sure they're in the same folder) then create a body and adjust it so that it's roughly the same shape as the model, then attach the body to the mesh.

If you want the model to have physics - click settings at the top and change type to object, then set the subtype you want. You then need to set properties for the body, e.g mass. Hope this helps, let me know if you get stuck Big Grin It's definitely a pain until you know what to do but once you know it's fairly straightforward.

I haven't made the material file... How would I go about creating it? I think that's what I am missing out on. What I have done is apply the texture onto the model in Maya and then export. Is that right so far?

Thanks for the quick response also! ^_^

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
06-08-2013, 09:51 PM
Website Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#4
RE: Importing models - Texture disappears

(06-08-2013, 09:51 PM)Theforgot3n1 Wrote:
(06-08-2013, 09:38 PM)sonataarctica Wrote: Have you created a material for the texture? You need to do this or the texture will not show up. Also make sure the texture and material have the same name (for some reason if they don't have the same name it won't work, for me anyway)

As for static objects, all you need to do is export the dae file and create a material file for the texture it uses.

To create entities you need to use to model editor - you import the dae file (the texture should show up automatically if you've created the material for the texture and made sure they're in the same folder) then create a body and adjust it so that it's roughly the same shape as the model, then attach the body to the mesh.

If you want the model to have physics - click settings at the top and change type to object, then set the subtype you want. You then need to set properties for the body, e.g mass. Hope this helps, let me know if you get stuck Big Grin It's definitely a pain until you know what to do but once you know it's fairly straightforward.

I haven't made the material file... How would I go about creating it? I think that's what I am missing out on. What I have done is apply the texture onto the model in Maya and then export. Is that right so far?

Thanks for the quick response also! ^_^

Put the texture into the folder that you are going to use it from, then open the MaterialEditor. I'm assuming it's just a diffuse texture so, set the type to soliddiffuse, tick the diffuse box, then select the texture you're using. I always apply the texture to the meshes last as moving/renaming it will mean the texture will not show up. I then export the model into the same folder as the material and texture files. Personally I keep one folder for each model, unless there are several similar models, then I'll just keep them all in the same folder e.g bottles.
(This post was last modified: 06-08-2013, 09:57 PM by ExpectedIdentifier.)
06-08-2013, 09:56 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: Importing models - Texture disappears

you dont need to create a material file first.
What you need to do is to not use the model editor to import your mesh because its not made for that.
Instead export your model as collada with the texture assigned and in the right location, then open it in the model viewer and if everything is done right it should generate a new mat. with the name of your texture, which you can then open and edit with the material editor.
If you cant get it to generate a material though it wont hurt to make it manually like sona suggested
06-08-2013, 09:59 PM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#6
RE: Importing models - Texture disappears

(06-08-2013, 09:59 PM)The Mug Wrote: you dont need to create a material file first.
What you need to do is to not use the model editor to import your mesh because its not made for that.
Instead export your model as collada with the texture assigned and in the right location, then open it in the model viewer and if everything is done right it should generate a new mat. with the name of your texture, which you can then open and edit with the material editor.
If you cant get it to generate a material though it wont hurt to make it manually like sona suggested

Is that the way most people do it? Lol, the modelviewer has NEVER opened for me. It always crashes, I've downloaded it a few times and it made no difference, didn't even work on my old laptop! Madness! Tongue
06-08-2013, 10:02 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#7
RE: Importing models - Texture disappears

When I load the texture, called "images.jpg" it only gives a purple texture going back and forth between other colors and basically just bugging up. I'm assuming I need to make my texture into a ".dds" but how do I do that?

I opened the model viewer and got a new file named .msh in the end. Though, opening my TriangulateCube.dae it merely had what seemed to be the "default" texture (some metal or stone).

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
(This post was last modified: 06-08-2013, 10:12 PM by Theforgot3n1.)
06-08-2013, 10:04 PM
Website Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#8
RE: Importing models - Texture disappears

(06-08-2013, 10:04 PM)Theforgot3n1 Wrote:
(06-08-2013, 09:56 PM)sonataarctica Wrote: Put the texture into the folder that you are going to use it from, then open the MaterialEditor. I'm assuming it's just a diffuse texture so, set the type to soliddiffuse, tick the diffuse box, then select the texture you're using. I always apply the texture to the meshes last as moving/renaming it will mean the texture will not show up. I then export the model into the same folder as the material and texture files. Personally I keep one folder for each model, unless there are several similar models, then I'll just keep them all in the same folder e.g bottles.

When I load the texture, called "images.jpg" it only gives a purple texture going back and forth between other colors and basically just bugging up. I'm assuming I need to make my texture into a ".dds" but how do I do that?

Use some software like photoshop, I use GIMP personally because it's free and pretty similar to photoshop. The issue isn't that it's jpg though, more than likely it's because you're using an invalid image size (this happens if it's not an even number for me) A multiple of two would work, however, it's best to always use a size that's a power of 2 eg. 128x128, 256x256, 512x512, 128x512 or something similar as this allows for mip-mapping to be used.
(This post was last modified: 06-08-2013, 10:10 PM by ExpectedIdentifier.)
06-08-2013, 10:07 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#9
RE: Importing models - Texture disappears

I just wanna get my thoughts arranged... okay, so I'm trying to make a model; what I need, in order to create the body with modeleditor is a material file and the .dae file, right? The .dae file I already got, so how do I get the material file? When I open the model viewer, loading my .dae, all I get is my model but with a stone texture that seems to be the "default" or so. In addition, it generates a .msh file, and not a .mat file. Sad

And you are correct, the image is not in the power of 2. It is in 259x194.

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
(This post was last modified: 06-08-2013, 10:20 PM by Theforgot3n1.)
06-08-2013, 10:19 PM
Website Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#10
RE: Importing models - Texture disappears

(06-08-2013, 10:19 PM)Theforgot3n1 Wrote: I just wanna get my thoughts arranged... okay, so I'm trying to make a model; what I need, in order to create the body with modeleditor is a material file and the .dae file, right? The .dae file I already got, so how do I get the material file? When I open the model viewer, loading my .dae, all I get is my model but with a stone texture that seems to be the "default" or so. In addition, it generates a .msh file, and not a .mat file. Sad

To create an entity you need a dae file, a texture (formats: dds,jpg,png,tga), and a material which the texture is assigned to. When creating the material, an msh file will also be generated. As for the modelviewer, no idea as I've never been able to open it. The other option is doing it the way I do it, which I've already explained.
(This post was last modified: 06-08-2013, 10:28 PM by ExpectedIdentifier.)
06-08-2013, 10:23 PM
Find




Users browsing this thread: 1 Guest(s)