PDA

View Full Version : Script needed :One click export to photoshop


CodeFather
12-15-2006, 08:22 PM
Hi, I've just upgraded bodypaint to R3, and I was wondering if somebody can write a script that automates the export to photoshop the same way that ZAppLink in Zbrush does?

The steps are as fallows :

*Freeze the viewport in desireable resolution
*Enter Projection Painting mode
*Save out the temporary PP layer to a new .psd file
*Open the file in Photoshop

After editing in Photoshop:

*Merge the edited .psd file with the temporary PP layer
*Apply the content of the Projection Paint plane to the model

It's pretty annoying to do all this steps everytime you want to use photoshop for projection painting in BP...ZAppLink handles this in one click.

LucentDreams
12-19-2006, 08:25 AM
well because of a non mentioned feautre of BP3 it might be possible to script I"ll have to look into that.

Heres whats involved:

When you enter Projection Paint mode the Layers manager changes to show only the currently active projection Paint layers, not the actual texture you are painting on.

You can specify a resolution for a projection layer using a feature that came in 2.5 called Freeze 3D View (found in the EDIT Menu of the viewport) This freezes the specific view so you can't rotate around and such, but also allows you to paint at a specific resolution (perhaps higher resolution) which can then down sample to the textures resolution later when applied. This feature also means you can zoom in as pixels instead of 3D, and that the brush paints in true pixel size so it gets larger as the image does when you zoom in.

Then the new feature comes into play. you can right click on a layer when its in that layers manager and in the context menu there is a texture submenu that contains options to save texture, which actually lets you save out just the active projection paint layers as a new photoshop file. Now the cool part about this is its very intelligent the file loads into photoshop with a layer set that contains all the painting layers and a mask to mosk everything but the 3D object (like an object buffer really), then it has layers for the actual 3D view from BP with the object and current painting so far, a layer with flat shading of that same viewport, and then whichever layer was the active layer when you saved. No that could be a lot of layers, so this isn't the kind of thing you would want to keep all these layers around for, but it helps to check thing right in PS without jumping back to BP.

You can add more layers in the layer set, set them to blending modes etc, and you DON"T have to flatten before saving again.

So you saveyour image go back into BP and in the layers manager, you can right click and in that same textures sub menu is an option to merge texture. This option intelligently only merges the layers within that layerset and none of the other layers that were in the file (make sure not to rename or reorder those special layers while in PS though)

Unlike Zapplink, This feature preserves the layer information blending modes transparencies etc and allows you to continue painting and modifying before the projection is applied.

Even better, another option from 2.5 that got little attention, allows you to Detach projection layers. You'll have to temporarily turn off the FREEZE 3D view option which means you'll lose sight of the projection layer for a moment (I hope they can fix this in a small update) Then move rotate and zoom on your object, activate FREEZE 3D view again and then it will bring that projection layer back up so it now fits your object in that new direction you specified.


These are those highly unadvertised features of 2.5 and 3 that make Bodypaint unlike any other app out there.

I'm going to be gone for the holidays as of tomorrow, but I"ll look into how much of this I can automate with a script, in theory one should be able to make a script that atcivates projection paint, freezes 3D view, and activates the save texture command for the projection layer, you'd have to name it and load it inot PS manually, and then when back in BP click on the merge texture command manually, but that would get you pretty close to zapplink.

CodeFather
12-19-2006, 10:18 AM
@LucentDreams you are great! :) Thanks for the detailed information and for willing to automate the process, and yes the ability to preserve the layer information, blending modes, etc. is a feature that makes BP stand out from the rest of the software.
Actually I was not aware that the "freeze 3d view" feature exists in BP R2.5, thought it was a R3 new feature.

Have a nice day !

tcastudios
12-19-2006, 11:11 AM
This sounds very interesting, not being a BP master by any standards, this PS route sounds like a big help. - However-, no matter where I search, including the Command Manager, I cannot find or get into that Freeze 3D mode. I'm checking this out in R9.6 that I suppose is BP 2.5 (Mac UB version).

Cheers
Lennart

Rich-Art
12-19-2006, 11:27 AM
Hi Lennart,

Take a look at the screenie.

Peace,
Rich_Art. :thumbsup:

tcastudios
12-19-2006, 11:33 AM
Thanks Rich.
It's there ok in R10 but not in R9.6 for me. R9.6 is BP 2.5, right?

Cheers
Lennart

Rich-Art
12-19-2006, 11:48 AM
You're right. I think this is a new BP3 function.

Peace,
Rich_Art. ::thumbsup:

skillzie
02-16-2007, 06:14 PM
any updates to this script? it would be so useful!

LucentDreams
02-21-2007, 09:37 AM
yes actually, sorry should have posted when I found out, but currently the script simply isn't possible. I can't get the save texture as command to run at the appropriate time after Freeze 3D view is run within the script. it always runs the command even though freeze 3D view has not generated the appropriate layer to save yet :(

I've submitted it to maxon, but I'm sure we're more likely to see this as a feature sooner than a fix to allow me to script it. Least I"ll keep pushing for it to be a feature.

anyways for now heres a handy palette of the important commands to make life a little easier. stroe this in your prefs folder, and then in the window/layout menu choose load palette, and then choose the BPtoPSpalette.l4d file. now you have a palette you can dock anywhere and save into your layout.

Get the file here (http://www.kaithestuffguy.com/cinemajunk/BPtoPS.zip)

CodeFather
02-22-2007, 08:52 PM
@LucentDreams , thanks alot for your effort (and for the handy palette! :) ) , I wish Maxon implement this feature as sooner as posible, but anyway, 10x for spending the time!

CGTalk Moderation
02-22-2007, 08:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.