Did you know? Every one of these messages is hand-typed live, just for you.

Change texture assignment in .psk file

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: ividyon, Semfry, zYnthetic

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Change texture assignment in .psk file

Post Posted: 18 Dec 2014, 15:14

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!

User avatar Gizzy
Skaarj Berserker Skaarj Berserker
Posts: 449
Joined: 02 Feb 2010, 12:55

Subject: Re: Change texture assignment in .psk file

Post Posted: 18 Dec 2014, 22:00

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

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 19 Dec 2014, 04:24

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.

bob
Skaarj Lord Skaarj Lord
Posts: 199
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: Change texture assignment in .psk file

Post Posted: 19 Dec 2014, 05:31

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

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 19 Dec 2014, 22:21

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.

bob
Skaarj Lord Skaarj Lord
Posts: 199
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: Change texture assignment in .psk file

Post Posted: 20 Dec 2014, 03:34

weird about the textures there was 2 multiskins originally,
I wonder where they got dropped.

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 20 Dec 2014, 04:45

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.

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 20 Dec 2014, 09:30

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.

User avatar Gizzy
Skaarj Berserker Skaarj Berserker
Posts: 449
Joined: 02 Feb 2010, 12:55

Subject: Re: Change texture assignment in .psk file

Post Posted: 21 Dec 2014, 19:55

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

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 21 Dec 2014, 23:43

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.

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 130
Joined: 01 Aug 2008, 06:35

Subject: Re: Change texture assignment in .psk file

Post Posted: 14 Nov 2015, 02:43

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!


Who is online

Users browsing this forum: No registered users and 2 guests