assimp

Assimp model loading library install/linking troubles

╄→尐↘猪︶ㄣ 提交于 2019-12-05 05:26:14
I'm trying to install Assimp to use in my projects, but I'm having some trouble. I'm currently using win 10 pro and visual studio 15 2017. I have downloaded Assimp 4.0.1.zip, extracted it into a directory, loaded cmakeGui and ran configuration twice, then generated into Assimp/build directory. Next I went into Assimp/build and I ran the Assimp.sln and chose the ALL_BUILD I think it was. I then copied all the files in the /code/debug that were alongside the .lib and .dll and moved them all into the Debug directory of my project where my exe is built to. I copied the .lib into my opengl/libs

Mirrored mesh and wrong UV map runtime export

断了今生、忘了曾经 提交于 2019-12-04 22:21:36
EDIT: So after a brief contact with the Assimp dev, I was pointed towards the import process. As I took over the code from someone else, I did not think looking that part: using (var importer = new AssimpContext()) { scene = importer.ImportFile(file, PostProcessSteps.Triangulate | PostProcessSteps.FlipUVs | PostProcessSteps.JoinIdenticalVertices); } FlipUVs does exactly what it says, it flips on the y axis so the origin is now top left corner. So now I am able to get the model with proper UV but still mirrored mesh. Setting the parent object with scale x = -1 flips it back to normal and makes

CMake error while configuring “install TARGETS given no RUNTIME DESTINATION for executable target ”assimp_simpletexturedogl“.”

牧云@^-^@ 提交于 2019-12-04 10:52:57
I'm trying to use CMake to configure assimp's samples but there are some error while configuring I've tried lot's of method but no one works. CMake Error at CMakeLists.txt:41 (INSTALL): install TARGETS given no RUNTIME DESTINATION for executable target "assimp_simpletexturedogl". CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.2) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help

Building assimp 3.2 does not work anymore

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I can't build assimp 3.2 anymore. Yesterday it worked but today it doesn't. I am downloading assimp from here . Then I'm doing cmake CMakeLists.txt -G 'Unix Makefiles' and make as described in their INSTALL file. However when doing make I get the following error: [ 84%] Performing configure step for 'gtest' CMake Error at /home/gartenriese/Documents/assimp/assimp-3.2/test/gtest/src/gtest-stamp/gtest-configure.cmake:16 (message): Command failed: 1 '/usr/bin/cmake' '-DCMAKE_BUILD_TYPE=' '-Dgtest_force_shared_crt=ON' '-Dgtest_disable_pthreads

[Qt OpenGL] mingw编译Assimp模型导入库

匿名 (未验证) 提交于 2019-12-03 00:22:01
问题 解决方案 最近在捣鼓用Qt框架下的OpenGL,所以想要在Qt中使用Assimp库。Assimp库作为著名的模型开源库,支持大量的格式的3D模型,还有骨骼动画等格式。一开始我直接使用在vs2015用过的assimp的lib,然后出现了链接未定义,Qt编译结果如下: 这看起来就是非常普通的 未链接相应的库的错误提示 ,但是我已经在.pro文件加入响应的库连接,而且我也知道对应相应的32位(我mingw为32位的)。但无论如何,都是未定义错误,接着我仔细观察发现,所有错误都是位置Assimp::Importer的, 但是在程序中我不仅用了Assimp的Importer,而且也用了Assimp的scene,只有Importer报了未定义 。 这说明很有可能是lib自身的问题,mingw与该lib不兼容,所有有格式解析的错误!我要用的lib应该要mingw编译的才行,然后我在网上找到了一个用mingw编译assimp的博文,虽然该文章有点远了,但是还有点参考价值,链接如下: https://blog.csdn.net/gamesdev/article/details/26969559 最后还是用cmake和mingw自己编译了一个Assimp的lib,问题才得已解决。 首先安装cmake,前往官网 https://cmake.org/ 下载一个适合自己系统的版本。

Assimp里的一些知识(2)

天大地大妈咪最大 提交于 2019-12-02 03:01:41
上一节的Mesh类主要的目标是将加载进来的模型相关数据做处理,然后绘制出来。那么在Mesh类之前,我们还需要一个Model类去加载这些模型,将其转化为数据并对另外的一些数据做一些处理。 话不多说,直接上code: class Model { public: /* 函数 */ Model(char *path) { loadModel(path); } void Draw(Shader shader); private: /* 模型数据 */ vector<Mesh> meshes; string directory; //文件所在的目录路径,非文件路径。 /* 函数 */ void loadModel(string path); void processNode(aiNode *node, const aiScene *scene); Mesh processMesh(aiMesh *mesh, const aiScene *scene); vector<Texture> loadMaterialTextures(aiMaterial *mat, aiTextureType type, string typeName); }; Draw函数没什么好讲的啦,遍历所有的网格(处理过的),并且调用网格各自的Draw函数: void Draw(Shader shader) { for

Assimp里的一些知识(1)

浪尽此生 提交于 2019-12-02 02:48:38
OpenGL 学习到模型加载的时候,介绍了一个模型导入库(Open Asset Import Library,Assimp)的用法。初学的时候觉得稍微有些复杂,故借由这篇blog来简单地捋一下其中的细节。 首先,当我们使用Assimp导入模型的时候,它通常会将整个模型加载到一个场景(Scene)对象,这个对象包含了导入模型的所有数据。具体结构如下图所示(这个图结构十分重要,需要充分理解): Scene 场景。 Scene 场景有3个成员,分别是 mRootNode (场景根节点), mMeshes (场景中所有网格 Mesh 的集合), mMaterials (网格的材质属性)。 Node 节点。 场景的根节点( Root Node , mRootNode 指向)包含了子节点,同时每个节点中有一系列指向场景对象中具体mMeshes成员的索引(Scene下的 mMeshes 数组储存了真正的 Mesh 对象,节点中的 mMeshes 数组保存的只是场景中网格数组的索引)。此外,这个子结构让我们可以使用递归的方式来处理节点(稍后讲到)。 Mesh 网格, 一个 Mesh 网格是可以看做渲染的一个单位,它包含了顶点数据,法线,纹理坐标(只是坐标数据,不是纹理对象),面等 数组 ,以及材质索引(指向 Scene 中的 mMaterials ) Face 面, 面数组由面组成(废话),概念上

ThreeJS 3d模型简介

瘦欲@ 提交于 2019-12-02 02:00:34
本文主要是对Threejs中加载模型的种类进行简单的知识科普。 3ds (.3ds) 3ds是3ds max通用储存文件格式。使用的范围更宽,可被更多的软件识别使用. amf (.amf) AMF是以目前3D打印机使用的“STL”格式为基础、弥补了其弱点的数据格式,新格式能够记录颜色信息、材料信息及物体内部结构等。AMF标准基于XML(可扩展标记语言)。 3mf (.3mf) 由微软牵头的3MF联盟,于2015年推出全新的3D打印格式——3MF(3D Manufacturing Format),相较于STL格式,3MF档案格式能够更完整地描述3D模型,除了几何信息外,还可以保持内部信息、颜色、材料、纹理等其它特征。3MF同样也是一种基于XML的数据格式, assimp & assimp2json (.assimp |.json) Assimp是一个强大的模型加载和转换库,支持多种格式的加载和转换,可通过c++进行调用开发。assimp2json顾名思义就是assimp格式的json格式导出。 awd (.awd) AWD是一种用于三维场景的二进制格式,并且通常与 AWD 引擎一起使用。 Babylon (.babylon) 微软的基于webgl的开发框架. Babylon.js BVH (.bvh) BVH是BioVision等设备对人体运动进行捕获后产生文件格式的文件扩展名

Matrix calculations for gpu skinning

ⅰ亾dé卋堺 提交于 2019-11-30 17:42:12
I'm trying to do skeletal animation in OpenGL using Assimp as my model import library. What exactly do I need to the with the bones' offsetMatrix variable? What do I need to multiply it by? Let's take for instance this code, which I used to animate characters in a game I worked. I used Assimp too, to load bone information and I read myself the OGL tutorial already pointed out by Nico. glm::mat4 getParentTransform() { if (this->parent) return parent->nodeTransform; else return glm::mat4(1.0f); } void updateSkeleton(Bone* bone = NULL) { bone->nodeTransform = bone->getParentTransform() // This

Matrix calculations for gpu skinning

坚强是说给别人听的谎言 提交于 2019-11-30 01:28:26
问题 I'm trying to do skeletal animation in OpenGL using Assimp as my model import library. What exactly do I need to the with the bones' offsetMatrix variable? What do I need to multiply it by? 回答1: Let's take for instance this code, which I used to animate characters in a game I worked. I used Assimp too, to load bone information and I read myself the OGL tutorial already pointed out by Nico. glm::mat4 getParentTransform() { if (this->parent) return parent->nodeTransform; else return glm::mat4(1