diff --git a/01-Diary/周小结/2024.11.md b/01-Diary/周小结/2024.11.md index 69de05b..f40a81f 100644 --- a/01-Diary/周小结/2024.11.md +++ b/01-Diary/周小结/2024.11.md @@ -1,4 +1,4 @@ # 11.4~11.8 1. 给心仪的代码添加闪光效果,并且调整频率与指定音乐相同。 2. 给NaiLin、BeiLa、JiaRan的夏日服制作IKRig以及重定向资产。 -3. \ No newline at end of file +3. 解决道具Spot会被剔除的问题。 \ No newline at end of file diff --git a/03-UnrealEngine/Gameplay/Gameplay/RuntimeLoadStaticMesh.md b/03-UnrealEngine/Gameplay/Gameplay/RuntimeLoadStaticMesh.md new file mode 100644 index 0000000..ea01d15 --- /dev/null +++ b/03-UnrealEngine/Gameplay/Gameplay/RuntimeLoadStaticMesh.md @@ -0,0 +1,14 @@ +--- +title: Untitled +date: 2024-11-05 16:57:23 +excerpt: +tags: +rating: ⭐ +--- +# 前言 +- StaticMesh:https://zhuanlan.zhihu.com/p/702589732 + +## 相关函数 +```text +UStaticMesh::BuildFromMeshDescription +``` \ No newline at end of file diff --git a/04-ComputerGraphics/Assimp/Assimp使用笔记.md b/04-ComputerGraphics/Assimp/Assimp使用笔记.md new file mode 100644 index 0000000..fea4e6e --- /dev/null +++ b/04-ComputerGraphics/Assimp/Assimp使用笔记.md @@ -0,0 +1,57 @@ +# 前言 +- https://github.com/assimp/assimp +- 知乎文章 + - Assimp与模型渲染的故事:模型加载,骨骼蒙皮动画:https://zhuanlan.zhihu.com/p/559637598 + - Assimp库的编译总结:https://zhuanlan.zhihu.com/p/533138560 + +# 数据结构 +![[assimp_structure.png]] + +|Struct|Content| +|---|---| +|aiScene|mRootNode,mMeshes,mMaterials,mAnimations,mTextures,mLights,mCameras| +|aiNode|mTransformation,mParent,mChildren,mMeshes(索引)| +|aiMesh|mVertices,mNormals,mTangents,mBitangents,mColors,mTextureCoords,mFaces,mBones,mAnimMeshes| +|aiFace|mIndices| +|aiMaterial|GetTextureCount(...),GetTexture(...)| +|aiAnimation|mDuration,mTicksPerSecond,mChannels,mMeshChannels| +|aiNodeAnim|mNodeName,mPositionKeys,mRotationKeys,mScalingKeys,mPostState| +## Model类 +## Scene(场景) +- mRootNode:[根节点](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E6%A0%B9%E8%8A%82%E7%82%B9&zhida_source=entity),是整个场景图的起点,包含了其他所有[子节点](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E5%AD%90%E8%8A%82%E7%82%B9&zhida_source=entity)的引用。 +- mMeshes[]:包含了场景中所有的网格(Mesh)数据的数组。 +- mMaterials[]:包含了场景中所有材质的数组。 + +## Node(节点) +- Root Node:顶层的根节点,可以有多个子节点。 +- Child Node:子节点,可以进一步包含更多的子节点和网格。 +- mChildren[]:[子节点数组](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E5%AD%90%E8%8A%82%E7%82%B9%E6%95%B0%E7%BB%84&zhida_source=entity)。 +- mMeshes[]:当前节点所含网格的数组。 +- 每个节点都可能包含对其他子节点的引用和/或对一个或多个网格的引用。这构成了一个[树状结构](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E6%A0%91%E7%8A%B6%E7%BB%93%E6%9E%84&zhida_source=entity),用于表示3D模型的层次和组成。 +## Mesh(网格) +- mVertices[]:存储网格顶点的数组。 +- mNormals[]:存储顶点法线的数组,用于光照和渲染。 +- mTextureCoords[]:存储[纹理坐标](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E7%BA%B9%E7%90%86%E5%9D%90%E6%A0%87&zhida_source=entity)的数组,用于将[纹理映射](https://zhida.zhihu.com/search?content_id=242521769&content_type=Article&match_order=1&q=%E7%BA%B9%E7%90%86%E6%98%A0%E5%B0%84&zhida_source=entity)到模型上。 +- mFaces[]:存储面(由顶点构成)的数组。 +- mMaterialIndex:材质索引,用于从场景中的材质数组mMaterials[]中引用对应的材质。 + +## Face(面) +- mIndices[]:存储构成面的顶点索引的数组。 + +# 载入文件 +```c++ +mScenePtr = mImporter.ReadFile(file, + aiProcess_Triangulate | + aiProcess_MakeLeftHanded | + aiProcess_CalcTangentSpace | + aiProcess_GenSmoothNormals | + aiProcess_OptimizeMeshes); +``` + +## 枚举说明 +- aiProcess_Triangulate:非三角形几何图元,主动拆分成三角形。 +- aiProcess_MakeLeftHanded:转换成左手坐标系,一般用于Direct3D渲染程序。 +- aiProcess_CalcTangentSpace: +- aiProcess_GenSmoothNormals:生成平滑法线。 +- aiProcess_OptimizeMeshes:优化模型,减少模型数量? + diff --git a/08-Assets/Images/ImageBag/Rendering/Direct3D12/assimp_structure.png b/08-Assets/Images/ImageBag/Rendering/Direct3D12/assimp_structure.png new file mode 100644 index 0000000..b93ef0d Binary files /dev/null and b/08-Assets/Images/ImageBag/Rendering/Direct3D12/assimp_structure.png differ