XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Blender, FX Composer 2, XNA and X Files

Last post 04-07-2008 11:44 AM by WillieTheKing. 6 replies.
  • 03-20-2008 6:04 PM

    Blender, FX Composer 2, XNA and X Files

    Folks,

    The purpose of this post is to describe some of my team's recent experience working to build an art pipeline process for XNA using open source/freeware tools. We're at the early preproduction stages of our game, and are just starting to have some gameplay prototypes. We want to have the art pipeline established before we go into any sort of production mode, since pipeline problems during production can really slow things down, in a bad way.

    So, having used Blender in the past, and both understanding and believing in its workflow, we selected Blender as our basic modeling package. And based on some of the XNA tutorials, we wanted to use FX Composer 2 to author/configure shaders. to this end, I've been struggling to build an art pipeline for XNA using Blender and FX Composer 2. Initially, our team had hoped to use FBX files, but in some instances we need to apply multiple sets of texture coordinates, and, as has been mentioned in these forums previously, the current content pipeline does not read multiple tex coordinates from an FBX file.

    The content pipeline can read multiple tex coordinates from X files. I began playing with the X File exporter from Blender, and found that it does not export multiple texture coordinates. I have modified the exporter, and now have a Blender exporter for X files that will write the FVFData block that includes the multiple texture coordinates, up to 8, in the order applied in Blender. The updated exporter isn't final...but at this point I am writing all the coordinates out properly. I am able to load the exporter files into XNA via the content pipeline, and it appears that the vertex buffer has all the data, e.g., the vertex buffer is the correct size. Need to attach a shader that exploits the vertex data to see for certain if that is true.

    Once I got the exporter up and running, I decided to try importing my model into FX Composer 2, and discovered that its X file importer is ignoring FVFData. So, using X files, it isn't going to grab the multiple texture coordinates. Currently working on updating that importer.

    I feel like, based on some of the posts here, that this combination of tool updates (updated Blender exporter/updated FX Composer importer), and even the information, would be beneficial to the XNA community. So, if I decide that some or all of this is working to my satisfaction, I'll somehow make it available.

    Graham

     

  • 03-20-2008 6:23 PM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    You might want to talk to the guys at Blender, and se if they can slot your importers into the main build. I also have the contact deatils to the guy who put the FBX Exporter for Blender together, I might be able to get you guys together.
  • 03-20-2008 8:15 PM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    Graham: You want some flowers or what? Make it, check it, give it. Thats how it works at "community". Nobody is going to praise you for that. :)
  • 03-21-2008 2:33 PM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    Well, duh! Of course I want flowers! Why else would I make a claim with no evidence as to who I am or whether or not I'm capable of anything like that!? Where are my flowers, man!? ;).

    But seriously, I posted that to sort of gauge interest. I might spend a bit more time working this if I think someone might actually use it. Internally, it may or may not be something we actually use. It is certainly a good exercise in understanding what works and what doesn't, both with the tools that are popular amongst XNA developers and in the stock content pipeline itself. A better here approach might simply be to update or seek out an update to the FBX model importer rather than messing with X files.

    Graham

     

  • 03-25-2008 8:30 AM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    I believe that an updated FBX importer for XNA would benifit the majority of the community. I use Blender myself and have just decided to try .x-files because of the multiple texture-coordinates, but FBX seems to be just as popular.

    By the way, could you post a link to you modified x-exporter, or is it included in 2.46 RC1 ?

    Cheers
  • 03-26-2008 2:43 PM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    sweetm16, I think you're correct about FBX being more beneficial. I'd love to do that, but I don't seem to have source code for the native importer and so the benefit of working with .x files is that I have source code, I think, for all the bits that I need to modify. I'd really like to not have to write a complete model importer from scratch. (Its obvious by now that custom model processors are required for all but the most basic, static models.)

    So, my updated version of the Blender x-exporter isn't available yet. I have it working, and I also modified the FX Composer 2 x-file importer to read the extra texture coordinates that I'm now writing. But I have not yet tested my version of the FX Composer importer. I need to do a few tests before I believe the code is good. If I can confirm permission, based on the license for Blender, I plan to make my version available, and certainly I'd submit it to the Blender Foundation to see if they want to included it in future distributions. Same goes for FX Composer 2.

    sweetm16:
    I believe that an updated FBX importer for XNA would benifit the majority of the community. I use Blender myself and have just decided to try .x-files because of the multiple texture-coordinates, but FBX seems to be just as popular.

    By the way, could you post a link to you modified x-exporter, or is it included in 2.46 RC1 ?

    Cheers

  • 04-07-2008 11:44 AM In reply to

    Re: Blender, FX Composer 2, XNA and X Files

    A brief status update. I now have done a test of export to *.x from Blender with multiple texture coordinates followed by an import to FXComposer 2 from *.x with multiple texture coordinates, using my updated versions of the Blender export script and the FXComposer 2 import plugin. It works. There's a bit more testing and code polish to do on each. I'm working, at this time, to get the FXComposer plugin update made available through official channels. That is the most tested bit at this point. I hope to make more progress on the Blender side this week, but I have a meeting on Friday that I have to be preparing for that will delay things a bit. The Blender export is, probably, in decent enough shape as-is, but there's something more I hope to add + reviewing the code before I submit it to the Blender Foundation.

    Graham

    moderator, math & physics, gamedev.net

Page 1 of 1 (7 items) Previous Next