• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Changing model textures?

Status
Not open for further replies.
Level 3
Joined
Apr 28, 2010
Messages
48
Changing model diffuse textures?

Alright so, I got the art I need. But, after tinkering with Actors I realized that models have links to textures. They're not separate entities, so you can't change the texture path.

So, I tried overwriting them with import in Assets\Textures. But, they got overridden by default.

So, I take it theres no way to actually change the texture without importing a large model file?
 
Last edited:
Level 3
Joined
Apr 28, 2010
Messages
48
I swear I replied earlier.

Basically, I try to mimic how the dark protoss textures change. Have actor textureselectbyid. Have texture, with slot "main.diffuse" and in model applies to file, slot main, substring as _Diffuse. I get an error saying cannot find the file from the texture in data, expression main variation 0.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Its referencing texture data. Those texture data then further reference real files. The slot represents which texture slot in the model it replaces. The File represents the path for an actual texture file within the data system of SC2. Use imports or mods to enxtend the existing data system.
 
Level 3
Joined
Apr 28, 2010
Messages
48
When you import your textures through the "Assets / Textures /" editor shows a standard texture on the model, but in the game texture is changed to imported. Check it.

Pretty sure that doesn't work anymore post 1.2.

Its referencing texture data. Those texture data then further reference real files. The slot represents which texture slot in the model it replaces. The File represents the path for an actual texture file within the data system of SC2. Use imports or mods to enxtend the existing data system.

Texture declarations applies to file is boolean. You can't set it to a path that way?

I set the path via actor settextureID, then in data textures, I created a new texture with the path to the imported file with slot main.diffuse.

Ok... weird somehow I got it working with a different model. Must have something to do with substring or the prefix.

At first I thought it was that the M3 model has some type of path attachment to it. It appears to not be that way.

Heres a pic with proof that it can be done.

Sorry for shitty image everyone of my goto upload sites is buggin out for some reason.

texturereplace.jpg


But, as soon as I change the model itself. I get this error.

Gateway2 Assets\Units\Zerg\Hydralisk\Hydralisk.m3; Could not find texture with id GatewayDarkDiffuse2 and expression 1.

See this is why this site is the best site for modding. Must be cursed with awesomeness.

I did it.

howtotexture.png


Here is a quick custom diffuse proof of concept.

product.png
 
Last edited by a moderator:
Level 3
Joined
Apr 28, 2010
Messages
48
But it does ;0 The texture declaration thing is interesting though, I don't suppose you wanna add a quick tutorial about it to Galaxywiki.net? If not I'll do it myself when I have time.

got proof of that? I might be doing it wrong. But, I don't see how.
 
Level 3
Joined
Apr 28, 2010
Messages
48
Ya, that definitely does not work for me, just tested and the orginal file overwrites the path of the newly imported one after save/closing. Anyway, doesn't really matter anymore

Also, this way is better too because you can change textures any time and you can use the original texture model too instead of being constrained to the import.

Made a tutorial video, its shitty as hell but whatever. I can't make youtube videos for the life of me.

http://www.youtube.com/watch?v=zaIJ_LKijuU

Yeh, I found out that inorder for the select texture ID thing to work you need to add data via the orignal fields I pointed in the actor's model.

This is shown in some of the dark protoss units (texture swapped ones not unique models).

Ya, have to have texture declarations to the path.

Path names come with models, and inorder to overwrite them. You need the substring _Diffuse_blood.dds for example. I just used _Diffuse because that is the other file. And, prefix is the name that comes before that in the dds file. Like Hydralisk_.
 
Last edited by a moderator:
Level 3
Joined
Apr 28, 2010
Messages
48
That's weird that the tutorial didn't work for you, are you sure you followed it exactly, using the same unit?
If you don't mind I'll put your tutorial in the galaxywiki.net page for reference. I'll credit you, dun worry ;o

Ya, it didn't work. The original SC2 file overrides the imported one. Maybe its just me, maybe I am doing something wrong dunno. But, if you have done it recently it must work then. But, I seriously can't get it to work.

Also, not really uptight about that kinda stuff. But, thanks.
 
Status
Not open for further replies.
Top