vault backup: 2024-11-05 17:28:42
This commit is contained in:
parent
b2a6ff5b26
commit
4531245b66
@ -1,4 +1,4 @@
|
||||
# 11.4~11.8
|
||||
1. 给心仪的代码添加闪光效果,并且调整频率与指定音乐相同。
|
||||
2. 给NaiLin、BeiLa、JiaRan的夏日服制作IKRig以及重定向资产。
|
||||
3.
|
||||
3. 解决道具Spot会被剔除的问题。
|
14
03-UnrealEngine/Gameplay/Gameplay/RuntimeLoadStaticMesh.md
Normal file
14
03-UnrealEngine/Gameplay/Gameplay/RuntimeLoadStaticMesh.md
Normal file
@ -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
|
||||
```
|
57
04-ComputerGraphics/Assimp/Assimp使用笔记.md
Normal file
57
04-ComputerGraphics/Assimp/Assimp使用笔记.md
Normal file
@ -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:优化模型,减少模型数量?
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Loading…
x
Reference in New Issue
Block a user