[OP]Destroy-man 160 Share Posted October 9, 2009 Valaki tudna nekem mutatni egy olyan tutorialt, ahol részletesen leírják a 3D-s grafika (FBX) megjelenítését, illetve a kamera használatát? Valami olyasmi kéne, ami leírja minden egyes paramétert, hogy mit is módosít. Nem muszáj szövegesen, jó ha ábrán mutogatja (tengelyek segítségével). Szóval ehez kérnék egy részletessebb leírást: private void DrawModel(Model m) { Matrix[] transforms = new Matrix[m.Bones.Count]; float aspectRatio = graphics.GraphicsDevice.Viewport.Width / graphics.GraphicsDevice.Viewport.Height; m.CopyAbsoluteBoneTransformsTo(transforms); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(10.0f), aspectRatio, 1000.0f, 10000.0f); Matrix view = Matrix.CreateLookAt(new Vector3(left, up, 2050.0f), new Vector3(axisX,axisY,0.0f), Vector3.Up); foreach (ModelMesh mesh in m.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.View = view; effect.Projection = projection; } mesh.Draw(); } } A Projection és View Matrix leírása is elegendő nekem, ha elég részletesen (szemléletesen) bemutatja, hogy mi mit is módosít. Egy olyan demot szeretnék létrehozni, ahol egy kockát tudok tologatni, forgatni ide-oda, és ugyan ezt a kamerával. Egyedül a megjelenítéssel van gondom (hogy mit, és hogyan kell paraméterezni). Link to comment Share on other sites More sharing options...
[OP]Destroy-man 160 Author Share Posted October 12, 2009 Na akkor ITT a válasz a kérdésemre. Hátha valakinek szüksége lesz még rá. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now