Question

Is there any way to turn a set of vertices with indexes into a Model, as in one that is actually stored inside of a Model object?

I ask because I have implemented a BSP loader for a project that I'm working on. I can take the vertices and indexes to render the BSP perfectly, so that's not an issue. However, the engine that I am working with only supports collision detection with actual Models. I figured there may be some way to do this so that I can store each face as a separate model and still be able to keep the culling and occlusion functionality of the BSP, and to be honest I have no idea how to write a Content Pipeline Processor to automatically do this.

So, is there anyway to load that data into a Model without using some form of LoadContent, or would I be better off trying to learn how to write a BSP Pipeline processor?

Was it helpful?

Solution

you can make a proccesor that build the model.

in this sample you can learn how generate a model from a heightmap.

Generated Geometry Sample

it should not be too hard to adapt to your requirements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top