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

Multiple Content Processors

Last post 07/05/2008 11:52 by Shawn Hargreaves. 1 replies.
  • 07/05/2008 03:21

    Multiple Content Processors

    Hi, I was wondering if it is possible to import the same piece of content multiple times with different content processors.

    I have a content importer that imports a heightmap. The content processor then creates a model out of it. I have another content processor that can take the output from the importer and make it into a series of billboard for grass, etc.

    What I want to do is use both processors, so I can draw my terrain, then draw the billboarded grass and plants on top of it. The problem is that I can only set one processor for the heightmap.

    Is there a way to process the output from the importer twice using different processors, without having to use multiple copies of the heightmap?

  • 07/05/2008 11:52 In reply to

    Re: Multiple Content Processors

    At the underlying Content Pipeline and MSBuild level, you can just add your source asset to the same project twice, specifying a different processor each time. The Visual Studio UI doesn't let you do that, though, so you'd have to hand-edit your project XML to insert two copies.

    Alternatively you can have one processor invoke the other (using context.BuildAsset), or even write a third coordinator processor that just calls the main two in order.
    XNA Framework Developer - blog - homepage
Page 1 of 1 (2 items) Previous Next