Torchmodders

Modding => Textures & Graphics => Topic started by: Anarch16sync on September 09, 2014, 05:49:17 am


Title: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 09, 2014, 05:49:17 am
Well, this is my first real tutorial, so bear with me for a second, more than a tutorial is a reference to the difference between this two properties in the units editor.

First, this two properties have the function to replace the texture of a model in-game, so using this we don't need to have multiple meshes to use different material, normaly this doesn't really matter, since one or two extra meshes won't bloat the mod size, but for the sake of optimization this should be the way to go.

Now, how to use this properties:

Like in a lot of things there are two ways to do this, one is to edit the unit .dat file directly with notepad, notepad+ or the text editor of your preference, and the other way is using the GUTS Units editor.

For TextureOverride:

Now lets see the results:
(http://i1224.photobucket.com/albums/ee373/IngQuimJesus/textureoverrideEX.png)
Left we have the normal mirka with the texture defined in the material file, and right we have the one with the textureoverride string added, both using the same mesh.


Now, let's see how to use TextureReplace:


And the results are:
(http://i1224.photobucket.com/albums/ee373/IngQuimJesus/texturereplaceEX.png)
Left we have the Sturmbeor with the TextureReplace strings, and right we have the normal sturmbeorn, with the texture defined in the material file.

Now, you are going to say... "Both do the same thing, DUH!" But you can't use them in every mesh, well you can't use TextureOverride in every mesh. So that makes for the second part of this... when to use one or the other.

To be Continued  8)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 09, 2014, 05:49:50 am
HERE COME A CHALLENGER PART 2!!

Previusly, we have seen HOW to use TextureOverride and TextureReplace, now we are going to see when to use one or the other.
 
First, lets look at TextureOverride, this one is pretty straight foward when it comes to use. It's going to work RIGHT only when the mesh doesn't have more than 1 texture image in the material file.

For example, lets look at the material file of our mirka:
(http://i1224.photobucket.com/albums/ee373/IngQuimJesus/textureoverrideEXMAT.png)

Here we see that, the mirka has 2 submeshes, but both point to the same texture image, making it posible for textureoverride to work right...

Now, prepare your eyes, 'cause I'm going to show you, what happens when Textureoverrite doesn't work right... For this example, we are gonna use a lovely Mimic.
This is the material file for the big mimic mesh:

(http://i1224.photobucket.com/albums/ee373/IngQuimJesus/textureoverrideEXMAT2.png)

Ok, here is a big difference, again 2 submeshes but this time they point to different image files. So if we apply texture override to the mimic, this is what happens:
(http://i1224.photobucket.com/albums/ee373/IngQuimJesus/textureoverrideEXMAT3.png)
Left the mimic with the mimic_chest_rare_01.png applied, and right the one with chest_rare_01.png applied
Kind of ugly,mmm... one looks a bit cool... but, that's what happens when TextureOverride doesn't work.

And Now, let's talk a bit about TextureReplace, as far as my testing goes... It will always works  8)

This makes look like TextureReplace is the better of the two, but textureoverride is important 'cause is the string used when you make skins for pets, since they use Texture_override_list.

Lastly, there is one thing neither of this options can achieve, and that is to change the material properties.
For example:
You want to have 2 monster, for example Dog and Ghost Dog, and you want the Ghost dog to be translucent... It doesn't matter how much alpha you put in your texture file, if the material file doesn't have alpha properties, it won't work.
So you will need to make a clone mesh to use a new material file. And example of this in the game files is the phase beast and the Jackal.  So you could check that up for reference on translucent materials.

And that is all folks, hope you enjoy it, and find it useful.  8)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on September 09, 2014, 07:25:40 am
Hi Anarch and thanks very much for this tut!

It's really helpful. The way I used to do it before was to make multiple copies of the .mesh and .material files. This is much more efficient and keeps mod-size down. Great!

May I place this tut in our wiki?
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Wolven on September 09, 2014, 07:42:39 am
Great write up. Thanks for taking the time to do it. Looking forwards to part 2.  :)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 09, 2014, 08:49:46 am

May I place this tut in our wiki?

Sure, go ahead, take everything you need  :D
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on September 10, 2014, 04:49:25 am
Sure, go ahead, take everything you need  :D
Thanks! It's done (http://torchmodders.com/wiki/doku.php?id=textureoverride_vs_texturereplace_1) :)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 11, 2014, 06:56:05 am
Posted Part 2  :D
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on September 12, 2014, 04:30:37 am
Posted Part 2  :D
Hey Anarch! Is part 2 your new post about not overwriting the wardrobesets.dat file, or is it somewhere else?
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 12, 2014, 08:45:26 am
Is the second post in the Topic  :D
I reserved it to put the part two there.
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on September 12, 2014, 06:04:44 pm
Is the second post in the Topic  :D
I reserved it to put the part two there.
LOL sorry about that! I was dropped on my head as a child so, y'know, brain damage  :D

I'll put this on the wiki as well!

EDIT:
Done :) it's on this page (http://torchmodders.com/wiki/doku.php?id=textureoverride_vs_texturereplace_2).
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on September 12, 2014, 09:07:15 pm
hehe don't worry, and thanks for passing it to the wiki (I'm kind of lazy), the second part is not so intersting for the people with experience but it will be useful for the newbies... I guess.  ::)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on October 05, 2014, 10:00:53 pm
hey Anarch just wanted to tell you that, thanks to your texture replace method, I was able to make additional units for the Destroyer skeleton summon skill without having to clone so many files. Worked really great! Thanks mucho!  ;)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on January 01, 2015, 09:50:09 am
Hi @Anarch16sync have you gotten your TEXTURE_REPLACE method to work for wardrobe items?

I have been trying all sorts of combinations in the wardrobe definitions, like...

Code: [Select]
[WARDROBE]
<STRING>RACE:HUMAN
<STRING>GENDER:MALE
<STRING>MESH:media/wardrobe/alch_gauntlet/HUM_ALCHEMIST_01.MESH
<STRING>SET:GLOVESSTANDARD
[/WARDROBE]
[TEXTURE_REPLACE]
<STRING>NAME:hum_alchemist_01/Exhand
<STRING>TEXTURE:media/wardrobe/alch_gauntlet/GAUNTLET_PINK.PNG
[/TEXTURE_REPLACE]

and

Code: [Select]
[WARDROBE]
<STRING>RACE:HUMAN
<STRING>GENDER:FEMALE
<STRING>MESH:media/wardrobe/alch_gauntlet/HUF_ALCHEMIST_01.MESH
<STRING>SET:GLOVESSTANDARD
[TEXTURE_REPLACE]
<STRING>NAME:huf_alchemist_01/Exhand
<STRING>TEXTURE:media/wardrobe/alch_gauntlet/GAUNTLET_PINK.PNG
[/TEXTURE_REPLACE]
[/WARDROBE]

but nothing seems to work  :(
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Kva3imoda on January 01, 2015, 07:11:26 pm
I have been trying all sorts of combinations in the wardrobe definitions, like...
As far as I know, this does not work.
Create several folders, as Alchemist_01b, Alchemist_01c, Alchemist_01d etc.
Put these files in each folder:
gloves (https://drive.google.com/file/d/0BwZNatjl1ZmpMU9qN3BZU2hsZDQ/view?usp=sharing)
Change textures as you need.
Create new gloves.
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on January 01, 2015, 07:30:19 pm
Thx Anarch! I know the multiple MESH+MATERIAL file combinations will work ;) i was just hoping i could use your technique to avoid that and keep the mod-size from getting too big. Thx again!
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on January 02, 2015, 12:38:41 pm
Hey Guys, I'm on vacation, so I'm not on my "Modder and other RL life stuff" Pc right now, and won't be until the first week of February...

But, from my experience, and since I work mostly from GUTS, the Texture Replace line should be on the  Item Unit file, not one the wardrobe file, I really don't know what really can be done on the Wardrobe file since that is not something you can edit in GUTS as far as I know.

So you would only have one entry in the wardrobe file for your armour set, but every time you use it in a unit you can use the texture replace in the Unit file.

Edit: By the way, when I'm back from vacation I'll give you all a really cool something for all hehe
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on January 02, 2015, 06:35:25 pm
Hey Anarch thx for replying even on vacation!
Hope its a great one for you! :)
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Anarch16sync on January 02, 2015, 07:49:14 pm
No problem Phanjam, I wanted to give a hand before all my communitations are cut, I'm going on a Roadtrip so won't touch a PC on a while. So I won't know what great stuff will start cooking around here.  :D

So hope you get the Texture replace to work on the armours.

PS: A hint about the cool something, It will help more people make cool stuff. :-\
Title: Re: TextureOverride vs Texture Replace [How, When and Why]
Post by: Phanjam on January 03, 2015, 01:36:54 am
Quote from: Anarch16sync
PS: A hint about the cool something, It will help more people make cool stuff. :-\
O ho! It sounds great already! Cant wait to find out :D