Page 1 of 1

Change texture assignment in .psk file

Posted: 18 Dec 2014, 15:14
by gopostal
Is there an easy way to do this without having to open the model in some sort of modelling software? I often use UnrealFX to do this on _d.3d models but is there something with this same functionality for psk?

My issue is I have a couple of models that need a second texture assigned to them (one is holding a custom gun for example) and a couple more need the texture to be alpha channel (like for flowing hair).

Thanks guys and Merry Christmas!

Re: Change texture assignment in .psk file

Posted: 18 Dec 2014, 22:00
by Gizzy
Assuming you're talking about what I think you're talking about, you'll wanna check out pskhack. It's basic command line and it takes a while to set up but you don't need to be a whizz at C to use it.

I made a sort of gui frontend in c# for it a long time ago but I never got round to making it presentable and I also lost it when my ssd crapped out. Enter bob reminding me that dropbox is a thing

Re: Change texture assignment in .psk file

Posted: 19 Dec 2014, 04:24
by gopostal
Thanks Giz. That's a serious step in the direction I would like to go! It's amazing this isn't a ready-to-use toolset by now.
If I write a frontend on this I'll post it back here.

Re: Change texture assignment in .psk file

Posted: 19 Dec 2014, 05:31
by bob
Gizzy you know dropbox is a thing............

Btw I wonder if some of those textures are even the right textures.alot of those were originally shaders. Need to check maybe

Re: Change texture assignment in .psk file

Posted: 19 Dec 2014, 22:21
by gopostal
There is some shader use but the textures that really need changed are very obviously a second texture, like the robot santa's gun. It has a texture all it's own but I can't apply it because the entire model uses the same call.
I installed the max demo. It's time to just throw down and learn this stuff. BTW the models look pretty good so far:
https://www.youtube.com/watch?v=Sa1mYA_jSKU

The only things left is some very minor things like these skin fixes and some minor tweaking of the anims and collision boxes to get them tight.

Re: Change texture assignment in .psk file

Posted: 20 Dec 2014, 03:34
by bob
weird about the textures there was 2 multiskins originally,
I wonder where they got dropped.

Re: Change texture assignment in .psk file

Posted: 20 Dec 2014, 04:45
by gopostal
Yeah, it's really bizarre. Previewing it in UModel shows the correct textures but once you export the model it changes all the assignments to the first texture (if there is more than one). FWIW I emailed Gildor.

Re: Change texture assignment in .psk file

Posted: 20 Dec 2014, 09:30
by gopostal
OK, got something both interesting and also probably very technical to ask of any modellers who happen to be reading...

In brief I spent the afternoon cramming how to import/export psk using 3ds and actorx. I checked my model and exported it using the 2 distinct skin texture assignments. Proof it worked:
► Show Spoiler

I then checked the psk file with UModel and it looks good, both textures are assigned. So then I coded my UScript import and checked the actor in editor: back to single texture (the first one) applied across the entire model.
I even tried to manually assign the texture in the script like this:
#Exec MESHMAP SETTEXTURE MESHMAP=MYMODEL NUM=1 TEXTURE=Texture2
It compiles again, no error thrown on the NUM value as being out of bounds but still the actor has a single skin that ignores the second one. BTW, if I manually place the second skin using multiskin in ed the gun texture is correct so it's somehow combining both into a single NUM assignment on import.

Could someone please spitball me some "It could be this" things? I promise you that I'll make a set of video tuts for all this once I'm proficient so no one else has to piecemeal it together again like I've had to do. I've followed everything I can find on this and nothing seems to work. Like everything UDev it's going to be something either simple I'm not doing or it's a bug in the export code.

Re: Change texture assignment in .psk file

Posted: 21 Dec 2014, 19:55
by Gizzy
gopostal wrote:...
I even tried to manually assign the texture in the script like this:
#Exec MESHMAP SETTEXTURE MESHMAP=MYMODEL NUM=1 TEXTURE=Texture2
It compiles again, no error thrown on the NUM value as being out of bounds but still the actor has a single skin that ignores the second one. BTW, if I manually place the second skin using multiskin in ed the gun texture is correct so it's somehow combining both into a single NUM assignment on import.


A long shot, but did you try using:

#Exec MESHMAP SETTEXTURE MESHMAP=MYMODEL NUM=0 TEXTURE=Texture1
#Exec MESHMAP SETTEXTURE MESHMAP=MYMODEL NUM=1 TEXTURE=Texture2

Re: Change texture assignment in .psk file

Posted: 21 Dec 2014, 23:43
by gopostal
Yeah, I tried several different combinations but nothing was affected. I'm really thinking this is something that wasn't done correctly in the UV mapping part of the model export because the placeholder exists for the NUM(1) assignment. Importing and placing a texture to it doesn't result in any errors so something is definitely there.
I'm slowing working my way through 3ds MAX so maybe I'll find the answer there. My guess is that actorX exports it as a single texture and you have to do something different in the model to assign more than one UV wrapper.
I'll post back when I find an answer.

Re: Change texture assignment in .psk file

Posted: 14 Nov 2015, 02:43
by gopostal
Sorry to necro this but I found a solution (thanks to Gizzy). If you import the psk into Milkshape then export it back out it fixes the textural assignments. I have no idea why this works but it does. You don't need to know anything about Milkshape or do anything with the model while it is opened.

Thanks Gizzy!