You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 13c8063
Browse filesBrowse the repository at this point in the historyBrowse files
The following part is a bit complex and requires heavy understanding of the UE4 internals.
98
+
99
+
Just read the code comments, we now need to extract the data in the dae file (vertices, uvs and normals) and build a LOD (Level of Detail) for the StaticMesh (a StaticMesh can have multiple LOD's, each one is a different Mesh).
100
+
101
+
In this case we use a single LOD (the LOD0). Pay attention to the data manipulation (using numpy). The collada format has different convention in respect to UE4. We flip UVs vertically and we swap axis to have Z on top (instead of y)
102
+
103
+
```python
104
+
from unreal_engine.classes import PyFactory, StaticMesh, Object, Class
105
+
106
+
import unreal_engine as ue
107
+
108
+
from collada import Collada
109
+
110
+
from unreal_engine.structs import StaticMeshSourceModel, MeshBuildSettings
111
+
from unreal_engine import FRawMesh
112
+
import numpy
113
+
114
+
classColladaFactory(PyFactory):
115
+
116
+
def__init__(self):
117
+
# inform the editor that this class is able to import assets
0 commit comments