RemapPSD

8 votes
Version: 
0.8
Date Updated: 
05/31/2013

With RemapPSDyou can easily map your entire photoshop file to a different set of uvs. The script will handle any complexity in your photoshop files:

 

  • layers with masks
  • folders with masks
  • nested folders
  • adjustment layers with masks
  • layered tiffs

 

Additional Info: 

An example case: You have worked on a lowpoly game character and are almost done when the lead artist approaches you with the request to give the character's face more space on the texture. This is not so difficult if you are working on a flat image, but impossible to do with complex photshop files. With RemapPSD it's inredibly easy. You can change the uv-layout of an existing model and the psd file with all the layers, folders, adjustment layers, masks etc, will be remapped with just the click of a button.

I hope you will find it just as helpful as I do. To get started it is probably best to watch the video tutorial on vimeo:

INSTALLATION:

  1. Select Maxscript/run and choose „RemapPSD.mzp“
  2. You will find the macroscipt under customize in the category „3dhippie“. Assign it to a shortcut or make a new menu item.

USAGE:

Basically you need three things to make the script work.

  1. Any piece of textured geometry
  2. Two sets of UV's: Channel 1 for the old mapping, Channel 2 for the new mapping
  3. A standard material with a bitmap texture as it's diffuse map

RemapPSD will do the rest for you.

The script will run through four phases:

  1. Photoshop will pop up, open the document, save it under „[originalname]_remapped“ and do some preparations.
  2. Back in 3ds Max render to texture will render all layers.
  3. Photoshop will collect all rendered images and update the psdfile.
  4. In 3ds Max the original object's material will be updated to use the remapped psd file.

That's it. You can now continue working on your psd file which will be organized just the same as before, with all layers, adjustment layers, folders and so on.

LIMITATIONS

You cannot remap vector elements, such as vector masks, or text layers, or smartobjects. All of those elements will be rasterized.

Long layernames will be truncated.

SATISFIED?

If this script has saved your life maybe you could donate me some money? I have setup a paypal donation button on my blog: http://davidshelton.de/blog/?p=249

I am looking for part-time or full-time positions as a 3d generalist in the games or films industry, as well as for freelance jobs. Please take a look at my current showreel:

If you have comments or critique, you are always welcome to write me a line. I can't promise that I will implement new feature requests, but I will try my best.

History:

[0.1]
2011-12-02
first release

[0.2]
2011-12-03
    - fixed problem with too long layernames (more than 31 characters)
    - fixed error when trying to clear an adjustment layer
    - fixed error caused by slashes in layernames
    - fixed spelling error in messagebox

[0.3]
2011-04-26
    - fixed problem with slashes in remapped_name variable (thanks to Pixhellmann)

[0.4]
2012-07-06
    - fixed problem where projection was turned off and automatic unwrap got applied.

[0.5]
2013-04-03
    - checked with Photoshop CS6
    - fixed issues with empty layers
    - cleaned photoshop history
    - fixed issue with wrong settings in RTT dialog
    - fixed issue with forwardslashes in layernames
    - improved general stability

[0.6]
2013-04-30
    - fixed bug when render to texture dialog wasn't opened (thanks trebor777)

[0.7]
21.05.2013
    - removed unneccessary command and execute steps. Compatibility to 3dsmax 2012 established.

[0.8]
2013-05-31
    - Proper handling of premultiplied alphas (no more black halos).
    - fixed bug that occured when the baked layer's alpha was empty

 

 

Version Requirement: 
3ds Max 2012, 2013, 2014
Other Software Required: 
Adobe Photoshop CS or higher
Video URL: 
AttachmentSize
remappsd.mzp8.93 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
asymptote's picture

Cool, thanks for the

Cool, thanks for the update.
As far as my problem goes it's not the script, it works fine on a box mesh I create, but not on a RocketBox Libraries figure, and I can't work out why not.
I'll give your new script a go and see what happens.
It's just cool to watch it work ;) superb script.

3dhippie's picture

Hi. I updated the script

Hi. I updated the script again and made some bugfixes. It should be more stable now. I don't know if I adressed your problem, but I tested it on different scenes in 3ds Max 2011 and 2012 and it always succeeded.

David

ibizanhound's picture

unknown property "rollouts" error

Hello!

Your script looks incredible, but i cant make it to work. I get the same error as Asymptote said:

I get unknown property "rollouts"

I use win 7 3dsmax x32 2011

The first steps happen as they are supposed to, ps opens and rearranges layers, but the the error appears when the dialog box for render to texture appears.

Hope this info helps you improve it.
Congratulations for your script once again!

Additional notes: If i have PS open before i run the script, the script wont run. I have to have PS closed before. Also for everyone else to know, when importing the psd in the beginning in your diffuse slot, make sure you don't collapse its layers when it asks you.

asymptote's picture

I just tried it in 2012 64

I just tried it in 2012 64 trial with CS5 64 and i'm afraid it refuses to bake the textures for me too. It runs through everything, opens the psd in ps, goes through the baking procedure in max but doesn't actually bake anything, and nothing is changed in the psd, I've just spent a good 2 hours re-running and trying different methods including the ones posted here, but it won't work for me.
Maybe I'm missing an important step? can anyone suggest a cure ? I'd love to get this working
appreciate any advice, thanks.

asymptote's picture

I tried this in max 2010 and

I tried this in max 2010 and 2011 64, both times when I switch the uv channel on the unwrap uvw from 1 to 2 I don't get the channel change warning box.
In max 2010 I also get unknown property "rollouts" in undefined on this line...

oldpath = gTextureBakeDialog.rollouts.commonBakeProps.eFilePath.text

I know you say other versions "could" work do you have any suggestions for earlier versions. thx

I so want this script to work :)

3dhippie's picture

Okay. I updated the script

Okay. I updated the script inside the mzp file. Thank you for your help pixhellmann. Also thank you for the donation :-).

bye, David

pixhellmann's picture

yes it works

haha, you just wrote 1 line and I copied 100 lines of code together :D
nice.

Note:
in v.0.3 I changed the bake map to DiffuseMap() .. I forgot to change it back.

V0.4 is working and standard as it was before. thank you!

AttachmentSize
3dhippie-remap_psd_v0.4.mcr 21.37 KB

Interactive, real-time, apps, games, character, animation, visualization, TV commercials, marketing and print material. Visit www.mld-digits.de

3dhippie's picture

Please try the following and

Please try the following and look if it will do the job.
Change the orignal line:

remapped_name = (getFilenamePath original_name)+(getFilenameFile original_name)+"_remapped.psd"

to this:

remapped_name = substituteString ((getFilenamePath original_name)+(getFilenameFile original_name)+"_remapped.psd") "\\" "/"

and tell me if it works

pixhellmann's picture

i think i fixed it. but testing is required

http://www.scriptspot.com/3ds-max/scripts/converttovalidfilename

I used this nice little function to convert the path. and now it starts baking!
JIPPY :)
but i have to check if everything is connecting correct.

I added the code and commented my changes. Hope this will help :)
I really would like to get this script working!

I attached the script in v0.3

AttachmentSize
3dhippie-remap_psd_v0.3.mcr 29.56 KB

Interactive, real-time, apps, games, character, animation, visualization, TV commercials, marketing and print material. Visit www.mld-digits.de

3dhippie's picture

Thanks for the hint. I will

Thanks for the hint. I will look at the part as soon as possible and fix it if it is required.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.