Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Max Last Render to Photoshop

Max Last Render to Photoshop

Anonymous
Not applicable
714 Views
4 Replies
Message 1 of 5

Max Last Render to Photoshop

Anonymous
Not applicable
I would like a script that takes the latest render in max and bring it into Photohop.

Script Process
1. After render is finished in 3ds max I run the script.
2. It brings the latest render from 3ds max into photoshop.
- When bringing it into photoshop it pastes the "rendered image" into the already opened document.
- It also applies a layer mask to the "rendered image" using its alpha as the layer mask image. (Essentially bringing in the render from max along with its alpha)

That's it.


Anyone able to help out with this? It's a process I do a lot when doing curves and color corrections in photoshop to make the render match the background image.
0 Likes
715 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Search "OLE Automation" in maxscript reference. You can do what you want with it.

Here the code used to open a file in photoshop: ("filename" is a full file path)

(
local ps = CreateOLEObject "Photoshop.Application"
ps.visible=true
ps.open filename
releaseOLEObject ps
)
0 Likes
Message 3 of 5

Anonymous
Not applicable
You can find photoshop OLE functions here.
There is everything you need to create a new document and paste the clipboard to it.

But i don't know if you can access the vfb copy from maxscript.
0 Likes
Message 4 of 5

Anonymous
Not applicable
I've got this far with it so far.

If you could help kind explain how to use these OLE functions in the pdf.

Like once I open the document how do i select all and copy. Then do the same for the alpha of the image.
I've tried a handful of different things but i can not get it. It just keeps saying "Unknown property: "selectAll" in undefined"


(
--Save "Last Render" to temp file on desktop
RImage = GetLastRenderedImage copy:true
NewImage = bitmap (RImage.width) (RImage.height) filename:"C:\Users\Joker\Desktop\TempRender.tga"
copy RImage NewImage
save NewImage

-- Opens "Last Render" in photoshop
local ps = CreateOLEObject ("Photoshop.Application")
ps.application.name
ps.application.visible = true
PhotoDoc = ps.open "C:\Users\Joker\Desktop\TempRender.tga"
releaseOLEObject ps
)
Message 5 of 5

Anonymous
Not applicable
Hi John,

I posted an update to my Photoshop Automation project in March, with the methods you need to do this sort of thing - (the method : Channels_AlphatoLayerMask being one)

http://lonerobot.net/?p=1107
0 Likes