everytime i try to import my fbx model with more than one texture as a TriangleMesh i get an error. can this even do multiple textures?
i am thinking about importing 2 models, one to do the physics and one to draw because i'll have a lot of transparent textures in my game. Does this make any sense?
Multiple Textures on a TriangleMesh
Multiple Textures on a TriangleMesh
Last edited by RyanGadz on Mon Aug 23, 2010 10:49 pm, edited 1 time in total.
Re: Multiple Textures on a TriangleMesh
The BEPUphysicsDrawer is just a demos/debugging drawer. You can technically draw arbitrary models using parts of it, and its source is available in the demos. However, if you need an actual rendering solution, I strongly recommend that you do not use the BEPUphysicsDrawer. It's built for drawing physics engine data, and trying to extend it for a game will only cause pain down the road.
I also wouldn't recommend creating any sort of BEPUphysics TriangleMesh unless they are actually going to be used in a simulation, since it's a heavy object with acceleration structures computed inside.
I also wouldn't recommend creating any sort of BEPUphysics TriangleMesh unless they are actually going to be used in a simulation, since it's a heavy object with acceleration structures computed inside.
Re: Multiple Textures on a TriangleMesh
i just read this in another one of your posts as well. it makes sense now thanks!Norbo wrote:The BEPUphysicsDrawer is just a demos/debugging drawer.
do you know of an easy way off hand to disable texture data when making the trianglemesh? it would be nice so i dont have to load basically the same object twice. this game is already getting larger than i want it to be.
Re: Multiple Textures on a TriangleMesh
The BEPUphysics TriangleMesh doesn't know about texture data; all that it wants is a vertex and index buffer. The specific way you get those vertices and indices depends on how you set things up. You could store a vertex/index buffer from a custom content processor, or just load in the vertices from a Model at runtime using the StaticTriangleGroup/TriangleMesh.GetVerticesAndIndicesFromModel method.