Jump to content
  • Advertisement
Sign in to follow this  
EmptyVoid

How to Write a Photoshop Exporter?

This topic is 3610 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!