将顶点和索引转换为模型
有没有办法将一组带有索引的顶点转换为模型,就像实际存储在 Model
对象中一样?
我问这个问题是因为我已经为我正在从事的项目实现了 BSP 加载程序。我可以使用顶点和索引来完美渲染 BSP,所以这不是问题。但是,我正在使用的引擎仅支持与实际模型的碰撞检测。我想可能有某种方法可以做到这一点,这样我就可以将每个面存储为单独的模型,并且仍然能够保留 BSP 的剔除和遮挡功能,说实话,我不知道如何编写内容管道处理器自动执行此操作。
那么,是否可以在不使用某种形式的 LoadContent 的情况下将该数据加载到 Model 中,或者我最好尝试学习如何编写 BSP 管道处理器?
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 Model
s. 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以制作一个构建模型的处理器。
在此示例中,您可以了解如何从高度图生成模型。
生成的几何示例
适应您的情况应该不会太难要求。
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.