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
Model Editor Help Merging custom entities textures into one?
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#1
Merging custom entities textures into one?

So I was making some models for my CS, and every model is divided to a number of bodies, that each has its own texture from its own file, and then the outcome is that my single object has around 4 texture files, and 8 more normal maps + spec maps, making it total of 14/15+ files per entity which is insane.
Now I've seen how some entites have only one texture that is merged into one, and I'm wondering how it's done. Any clue, anyone?
03-23-2013, 06:48 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Merging custom entities textures into one?

Proper UV placement/layout. If you're making this object into one whole thing, then you can combine it all into one mesh. Do you have a screenshot of this thing?
03-23-2013, 07:49 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#3
RE: Merging custom entities textures into one?

I don't get what you're saying. Here is the model:
Spoiler below!

[Image: 596b94bbf9.png] [Image: 4a969065e5.png]


As you see, 3 of the walls use the Wall_01 texture, the last one uses Wall_02, and the roof uses roof.dds.
Total of 3 textures.
03-23-2013, 07:57 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: Merging custom entities textures into one?

What is done a lot of times is having the two textures as a one, like in static_objects/dungeonbase/dungeonbase.dds, which is quite big but only one image.

That way, you use less disk space.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
03-23-2013, 08:49 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#5
RE: Merging custom entities textures into one?

(03-23-2013, 08:49 PM)The chaser Wrote: What is done a lot of times is having the two textures as a one, like in static_objects/dungeonbase/dungeonbase.dds, which is quite big but only one image.

That way, you use less disk space.

That is what I want to do... but I don't know how, this is why I started this thread in the first place.
03-23-2013, 08:56 PM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#6
RE: Merging custom entities textures into one?

Yeah, like Statyk said: combine everything into one mesh (mesh>combine). Don't forget to delete history and clean up your outliner after that, Maya makes quite a mess whenever you combine or separate meshes!

Then open up your UV editor and arrange everything so that it fits into the square. For example everything that should have the wall texture in one corner, the roof in another...you get the idea. You might need some additional polygons in the walls and roof to make it possible to tile/repeat that smaller piece of texture, though.

After that, you make a uv snapshot that you can use as reference in photoshop. Make a photoshop file that's, say, 2048² pixels and put all textures you need in there as layers. Scale, crop and rearrange them, until they are in the place where your respective UV pieces are. (Roof texture on your roof polygons, etc...)

...and that's pretty much it! Big Grin

I have to say though, it seems a bit odd to make a whole building one big mesh... it's not unusual for big structures like buildings to use several tiling textures at once. Since hpl doesn't allow multiple textures on one mesh (or at least I don't think so) having it in separate "sub-parts" actually makes sense...
(This post was last modified: 03-23-2013, 09:55 PM by xxxxxxxxxxxxxxxx.)
03-23-2013, 09:53 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#7
RE: Merging custom entities textures into one?

I wouldn't recommend pulling 3 textures into a 2048 - just for optimization's sake. Even though it might look clean and neat having all the files as one you're going to end up using more texture space than having 3x1024.

You can export them as three separate meshes, within one export and Amnesia will read that as one model with three textures.

[Image: mZiYnxe.png]


03-23-2013, 10:02 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#8
RE: Merging custom entities textures into one?

(03-23-2013, 10:02 PM)Acies Wrote: I wouldn't recommend pulling 3 textures into a 2048 - just for optimization's sake. Even though it might look clean and neat having all the files as one you're going to end up using more texture space than having 3x1024.

You can export them as three separate meshes, within one export and Amnesia will read that as one model with three textures.

This is what I was doing until now but I wanted to make them as one texture file for one model instead of one model that consists of 3 bodies and 3 textures.

-Hirnwirbel, thanks, I'll try doing so but I'll make it smaller probably.

EDIT: This is just too much trouble, all of the textures get mixed and shit goes wrong. I'll just stay with the good old 3 textures per model :/
(This post was last modified: 03-23-2013, 10:31 PM by ClayPigeon.)
03-23-2013, 10:15 PM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#9
RE: Merging custom entities textures into one?

Quote: I wouldn't recommend pulling 3 textures into a 2048 - just for optimization's sake. Even though it might look clean and neat having all the files as one you're going to end up using more texture space than having 3x1024.
That's true... but I think it's not only texture size that causes performance issues, the number of textures that need to be looked up also plays a role. I'm no engine coder however, so I might be wrong. I bet Your Computer would know more about that! Big Grin
(This post was last modified: 03-23-2013, 11:50 PM by xxxxxxxxxxxxxxxx.)
03-23-2013, 11:50 PM
Find
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#10
RE: Merging custom entities textures into one?

I actually just gave up on this idea because it's just too complicated to do, and for what? to save a 100, 200 kB of space?
I'd stick to the multiple textures idea, thanks for your efforts to help though Smile
03-24-2013, 12:20 AM
Find




Users browsing this thread: 1 Guest(s)