Jump to content
  • Advertisement
Sign in to follow this  
Ashkan

3D file formats capable of exporting shaders

This topic is 3989 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

As you know a lot of file formats supported by digital content creation tools are already capable of exporting basic material properties of objects in terms of ambient, diffuse and specular components plus a bunch of textures assigned to faces. But with the advent of shaders and programmable function pipelines, those days where materials used to carry a limited amount of visual properties are long gone. Shaders have come to greatly enhance what materials used to mean. But after writing a couple of importers for frequently used formats, Google SketchUp (.SKP) and Autodesk DWF (.DWF), I have yet to find a format that fully supports shaders; a format that can satisfy my needs. DWF is a huge and complex format based on HOOPS Streaming File Format. It's a format with a great deal of potentials and capabilities but as far as I know it lacks support for shaders, which (considering the amount of attentions Autodesk is paying to it) somehow has led me to believe there really are not that many formats that support shaders. The first thing that comes to mind then is Microsoft's .X file format which has been designed to support shaders, where a bunch of objects can actually be told to use a specified shader (i.e. an effect), instead of just playing around with the classic ambient, diffuse and specular properties. This is certainly an option but it binds the application to Direct3D, if you're too lazy to write the full-fledged generic importer instead of using the pre-written D3DX helper functions. So this leads me to the first question. Are there any file formats with 1) multi-texturing and 2) shader support? In case you're wondering why I may need such capability, I must add that my goal is basically to assign shaders to objects using a simple drag and drop approach, pretty much the same way materials are assigned to objects in 3DS Max or Maya. From there, I want the artist to be able to tweak the parameters. I'm not an artist so there is the possibility that those softwares currently support such features and have already designed shader-capable file formats which I am not aware of, in which case a short description of how to achieve this goal would be highly appreciated. If writing a simple editor that imports geometry and assigns pre-written shaders (that are supported by the engine) to objects is the way to go, some links to probably already written, ready to use editors is welcome. I'm looking forward for your opinions and suggestions. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Looked into Collada?

It's designed mostly as an interop format (for example, I have a preprocess tool that compiles all my Collada .dae files into my custom geometry format), but it might provide what you need.

FX Composer and RenderMonkey both have artist-centric modes of operation as well, you could look into those. A lot of places I've seen write plugins for their team's modelling tools to achieve similar goals as well.

Share this post


Link to post
Share on other sites
Thank you. I will look into it.

Well, don't DCC tools such as 3D Studio Max or Maya have a built-in tool to assign shaders to geometries? If not, which of the following approaches can lead to acceptable results within a shorter period of time? Which one is more flexible?
1) Writing a plugin for the DCC tool
2) Writing an editor to get the job done

By the way, are there any formats that support multi-texturing?

Thanks again

Share this post


Link to post
Share on other sites
Quote:
Original post by Ashkan
Thank you. I will look into it.

Well, don't DCC tools such as 3D Studio Max or Maya have a built-in tool to assign shaders to geometries? If not, which of the following approaches can lead to acceptable results within a shorter period of time? Which one is more flexible?
1) Writing a plugin for the DCC tool
2) Writing an editor to get the job done

By the way, are there any formats that support multi-texturing?

Thanks again


Again COLLADA will answer most of your problems there... And writing a converter from COLLADA to a custom binary format is probably the solution that will take less time. Plug-ins such as ColladaMax, ColladaMaya will export from the DCC tools and then you write a converter to only one of those formats.

But keep in mind that COLLADA is an exchange format and shouldn't be used as the format used in the end. For example in my case... I made a importer plug-in using FCollada in my engine, in other words my engine can open COLLADA files directly using a plug-in, but it is not intended to be used on any release of any work I make. The best thing with COLLADA is that one importer/converter will allow you to work with a lot of DCC tools: Softimage|XSI, 3d Studio Max, Maya, Blender, Houdini and probably a lot more.


You can find the plug-ins I mentioned earlier for free after registering on Feeling software website. There is also FCollada which is also the company's COLLADA library. You also get access to the code of the "FREE" version (which is more than enough for 90% of us) and everything is licensed under the MIT license.

Otherwise, you could use COLLADA DOM to load the files or write your own loader but I will suggest you to use one of the already made libraries mostly because the complexity of the format and the time you'll save by not reinventing the wheel.


JFF

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!