how to load a 3D model with DirectX11?

Started by
3 comments, last by x5reunion 10 years ago

I want to load a 3D model with DirectX11,but I don't know what's the format of 3d models that I can use and how to use it? Please give me a help.

I am a Chinese, Please forgive me for the poor English.

Advertisement

Use Assimp SDK to load models : http://assimp.sourceforge.net/

Use Assimp SDK to load models : http://assimp.sourceforge.net/

This is probably your best bet given the question. It's a ready-made solution. But just so you know, it's up to you to define the vertex format, and how you load, store, and represent models and materials. The format is whatever you say it is.

This may be helpful: https://directxtk.codeplex.com/wikipage?title=Model&referringTitle=DirectXTK

DirectX 11 dont have 3dmodel's loader. In directX 10 only DXUT have 3d models loader, but DXUT its for demo ( and he can load only sdkmesh* you need convert it ). I dont know DXUT in directX 11 have his models loader or no.

For directX 11 you need write you parser. You can read about it and can take source code here.

http://www.braynzarsoft.net/index.php?p=D3D11OBJMODEL

Its parser for obj models, they are very simple, but for models like grass, trees etc its ok.

p.s

If DXUT in directX 11 can download models you can use Meshconvert.exe.

...\DSDK\Utilities\bin\x86

Meshconvert.exe convert from X* format to sdkmesh* format. For 3DS Max you need download plugin here http://www.cgdev.net/help.php he convert models from 3ds max to X* format.

meshconvert /o NameModel.sdkmesh NameModel.x

This topic is closed to new replies.

Advertisement