加载FBX模型导入的DirectX应用程序 [英] Loading FBX model into DirectX application

查看:710
本文介绍了加载FBX模型导入的DirectX应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图呈现从FBX文件的3D模型在我的DirectX应用程序, 所以我已经装好了使用FBX SDK,但我发现一个很大的问题,可能会造成不同的坐标系:使用DirectX的左手,FBX - 右撇子, 所以最后我把它渲染,但有两个问题:

I am trying to render a 3d model from FBX file in my directx application, so I have loaded it using fbx sdk, but I found a big problem, probably caused by different coordinate system: DirectX use left handed, Fbx - right handed, so finally I got it rendered, but with two issues:

  • 模型的所有部分看起来由Z轴镜像(或用X - 它不清楚)
  • 部分的位置对于所提供的FBX应用变换矩阵后不正确 各部分;
  • all parts of the model look mirrored by Z axis (or by X - its not clear)
  • position of the parts is incorrect after applying transformation matrix provided by FBX for each part;

那么怎么样,我可以用顶点数据和/或转换矩阵办?

So how what I can do with Vertex data and/or transformation matrix?

推荐答案

您将需要保存模型和转换数据,您的应用程序不同于它们存储在文件中。在一般情况下,这听起来像你需要做的是:

You will need to save the model and transformation data in your application differently than they are stored in the file. In general, it sounds like what you need to do is:

  • 加载FBX
  • 应用转换到每个部分根据FBX
  • 应用变换以反转Z轴上的所有顶点的
  • 渲染/使用生成的模型。

应用在错误的FBX变换坐标系将产生不正确的结果。

Applying the FBX transformations in the wrong coordinate systems will yield incorrect results.

这篇关于加载FBX模型导入的DirectX应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆