Sign in to follow this  

How to Write a Photoshop Exporter?

This topic is 3452 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well now that I'm using OpenGL and it does not have a good format for textures like DirectX does. I think this would be a good time to write my own texture format but I need to write a plugin for photoshop to export it. So how would I do that for free or at least a reasonable price? I know there is the photoshop SDKs but adobe wants you to join some type of club which cost $200 a year and I can't spend that much because I wont have enough for rent this month... Edit: JUST TO MAKE IT CLEAR I NEED A FORMAT THAT SUPPORTS 3D VOLUME TEXTURES WHICH IS WHY I WANT TO MAKE MY OWN! [Edited by - EmptyVoid on August 4, 2008 6:12:29 AM]

Share this post


Link to post
Share on other sites
I'd say, be pragmatic. If there's a format already that suits your needs, use it. How about .tga?

Share this post


Link to post
Share on other sites
I don't have much experience dealing with the details of image formats, but it seems to me that you'd be paying for the privilege of building your format into Photoshop.

Correct me if I'm wrong, but wouldn't it be possible to simply write a separate converter tool that would take a standard image format (png, jpeg, tga, even bmp) and convert that to your format? If you made it capable of converting groups of images at once, it wouldn't really add much of an extra step.

Share this post


Link to post
Share on other sites
Quote:
Original post by EmptyVoid
Well now that I'm using OpenGL and it does not have a good format for textures like DirectX does. I think this would be a good time to write my own texture format but I need to write a plugin for photoshop to export it.

Or you use the native PS file and write an importer instead. The file format descriptions available from internet are plain old, but they still work if you be content with pure pixel maps. I'm currently using it to import files written by PS CS2.

Share this post


Link to post
Share on other sites
Your reasoning is faulty:
DirectX has a "native" texture file format.
OpenGL does not.
You want to use textures with OpenGL.
Therefore you want to make your own texture file format. <== logical error here! You're jumping to conclusions.

There are already dozens, if not hundreds, of image formats out there. Why not use one of those? In fact, you can use DirectX's own formats with OpenGL. All you'd have to do is either write a reader of those formats (somewhat difficult) or just find one online (pretty easy). Most image loaders are independent of which graphics API you are using (eg: SDL_Image).

This is like saying "They don't make nails that are the same brand name as my hammer, how can I make my own nails to work with my hammer?" Well, maybe not quite, but that's the gist of it. [smile]

Share this post


Link to post
Share on other sites
If you were to go with an existing format, then I'd wholeheartedly recommend png. You can load the exported images with libpng (free), which has shocking documentation, but once you figure out the important bits of their sample it is fairly easy to use. Note, libpng requires zlip(also free).

The main reason I'd recommend png however is it has better support for the way Photoshop works with transparency than bmp or tga. You don't need to make a separate alpha channel which almost always ends in tears and frustration. Just select the layers you want exported and the png exporter will combine them intelligently and add the correct alpha channel.

I know I sound like a salesman, but in retrospect it seems crazy to me that we ever had to create alpha channels in Photoshop to begin with.

Share this post


Link to post
Share on other sites
Well, image file formats and texture file formats are actually not totally the same. Textures know wrap modes, mip-mapping levels, cube-maps, 3D textures, and less, more, or other channels than R, G, B, and A (to name the specialities coming to my mind ATM). "Normal" image file formats seldom support these features.

However, I doubt that writing a PS exporter with all these features in mind is easy; on the other hand the OP hasn't stated what features are required at all. So I assume that exporting either a texture format using an exting plug-in, or else exporting standard images and assembling texture files externally are the both most practical possibilities.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ezbez
Your reasoning is faulty:
DirectX has a "native" texture file format.
OpenGL does not.
You want to use textures with OpenGL.
Therefore you want to make your own texture file format. <== logical error here! You're jumping to conclusions.

There are already dozens, if not hundreds, of image formats out there. Why not use one of those? In fact, you can use DirectX's own formats with OpenGL. All you'd have to do is either write a reader of those formats (somewhat difficult) or just find one online (pretty easy). Most image loaders are independent of which graphics API you are using (eg: SDL_Image).

This is like saying "They don't make nails that are the same brand name as my hammer, how can I make my own nails to work with my hammer?" Well, maybe not quite, but that's the gist of it. [smile]


No I need a 3D texture and the only format I know of that supports this is .DDS Which is the DirectX format...

Share this post


Link to post
Share on other sites
Quote:
Original post by haegarr
Well, image file formats and texture file formats are actually not totally the same. Textures know wrap modes, mip-mapping levels, cube-maps, 3D textures, and less, more, or other channels than R, G, B, and A (to name the specialities coming to my mind ATM). "Normal" image file formats seldom support these features.

However, I doubt that writing a PS exporter with all these features in mind is easy; on the other hand the OP hasn't stated what features are required at all. So I assume that exporting either a texture format using an exting plug-in, or else exporting standard images and assembling texture files externally are the both most practical possibilities.


Yes I need all of those features and more. I have already made a function which can load my file format and I just need a exporter for photoshop but I don't know how which is why I started this thread...

Share this post


Link to post
Share on other sites
Quote:
Original post by Moonshoe
Maybe this'll help.


I need up to 256 slices and I'm NOT making 256 files for one texture. I didn't ask how to load a texture I asked how to write a photoshop plugin!

Share this post


Link to post
Share on other sites
Quote:
Original post by EmptyVoid
I need up to 256 slices and I'm NOT making 256 files for one texture. I didn't ask how to load a texture I asked how to write a photoshop plugin!

Also not meaning an exporter plug-in, I still hint at importing a standard PS file. It provides you with named layers, so you can use a defined layer layout especially for your purposes. E.g. if the importer expects to get a cube map it requires the PS file to provide 6 layers in a defined order; if it expects a stacked 3D map it requires the PS file to provide 2 or more layers, and so on. You can also interpret the layer names for such purposes. I once used the layers for different states of sprite animations. Of course, you got 2 files then: The "original" PS file and the own compiled texture file.

Share this post


Link to post
Share on other sites
Did you try to do you own research? You can find the Adobe SDK with a few clicks on their website (you'll need to register), and Google includes links and references to it in nearly every sane-sounding search query for Photoshop plugin development.

Get the Photoshop SDK. It probably comes with a few examples, and there is documentation available.

Also, don't bump your posts the way you have been.

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Did you try to do you own research? You can find the Adobe SDK with a few clicks on their website (you'll need to register), and Google includes links and references to it in nearly every sane-sounding search query for Photoshop plugin development.

Get the Photoshop SDK. It probably comes with a few examples, and there is documentation available.

Also, don't bump your posts the way you have been.


Stupid site I went to told me I had to be a member with some type of club. Then I typed SDK in to the search on the adobe web site and it found nothing so I just figured I had to pay.

Well I submitted a request for the SDK and it said it will be 4 days before they get back to me...

Edit: Must have been a fake site because now when I search it works fine...

Share this post


Link to post
Share on other sites

This topic is 3452 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this