News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 234
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 302
Total: 302

Author Topic: TextureOverride vs Texture Replace [How, When and Why]  (Read 5827 times)

0 Members and 83 Guests are viewing this topic.

TextureOverride vs Texture Replace [How, When and Why]
« on: »
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:
  • Editing the .dat file directly the line that needs to be writen is:

    <STRING>TEXTURE_OVERRIDE:media\models\monsters\mirka\mirka2.dds

    and point it to the texture to use, in this case to the second Mirka texture.
  • In Guts, we need to go to: Data Editors, Units, and then the type of unit we want to edit since all the editors have the field for this option.
    In the Items editor and the props, the field is in the top zone, under the mesh field.
    In the Monster editor and the player editor, the field is in the "Files" tab.

    Now, just like in the dat file this field should be filled with the relative direction of the texture file

Now lets see the results:

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:

  • If we want to edit the .dat file directly, the code will be:

    [TEXTURE_REPLACE]
          <STRING>NAME:sturm_melee_mat
          <STRING>TEXTURE:media/models/monsters/Corrupted_Sturmbeorn/C_sturm_melee/sturm_melee2.dds
    [/TEXTURE_REPLACE]


    In the NAME field, we need to write the internal material name, this is the name of the material that appears inside the .material file (open it wiht notepad+ or other text editor to see it), and just like in TextureOverride, in TEXTURE we use the relative direction of the file.
  • Now doing it in GUTS, just like with TextureOverride we need to go to any of the units editor, and there to the "TextureReplace" tab, there we find a table with the both fields, MATERIALNAME and TEXTUREFILE

And the results are:

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)

Share on Bluesky Share on Facebook


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #1 on: »
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:


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:



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:

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)
« Last Edit: September 11, 2014, 06:55:23 am by Anarch16sync »

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #2 on: »
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?


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #3 on: »
Great write up. Thanks for taking the time to do it. Looking forwards to part 2.  :)

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #4 on: »

May I place this tut in our wiki?

Sure, go ahead, take everything you need  :D

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #5 on: »
Sure, go ahead, take everything you need  :D
Thanks! It's done :)


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #6 on: »
Posted Part 2  :D

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #7 on: »
Posted Part 2  :D
Hey Anarch! Is part 2 your new post about not overwriting the wardrobesets.dat file, or is it somewhere else?


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #8 on: »
Is the second post in the Topic  :D
I reserved it to put the part two there.

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #9 on: »
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.
« Last Edit: September 13, 2014, 05:29:32 am by Phanjam »


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #10 on: »
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.  ::)

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #11 on: »
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!  ;)


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #12 on: »
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  :(


Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #13 on: »
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
Change textures as you need.
Create new gloves.

Re: TextureOverride vs Texture Replace [How, When and Why]
« Reply #14 on: »
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!


 

Recent Topics+-