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
Implemented correct flat/smooth normal handling by detecting shared vs unique vertex indexing and converting the vertex/index buffers accordingly. Custom helper functions exist to determine whether vertices are shared or unique by analyzing index usage. This correction fixes smooth-shading artifacts caused by incorrect vertex-sharing assumptions and ensures the appropriate flat or smooth shading path is selected.
-colored Enable color visualization by using normals as colors (optional)
22
+
23
+
Example:
24
+
python cow_example.py --shading flat -colored
25
+
26
+
27
+
<ForUSDImporterTask:>
28
+
The LoadScene_Blender method imports a USD scene exported from Blender and converts it into an Elements scene representation. It traverses the USD stage hierarchy, creates corresponding entities for each UsdGeom.Xform, and reconstructs parent–child relationships based on USD paths.
29
+
30
+
For each UsdGeom.Mesh, the method extracts geometry data including vertex positions, face topology, normals, and material color information. It supports both smooth and flat shading by handling different normal interpolation modes (vertex and faceVarying). Polygonal faces are triangulated appropriately, with corner-space triangulation used for flat shading.
31
+
32
+
The method uploads vertex attributes and indices to the GPU and performs coordinate system conversion from Blender’s Z-up convention to the engine’s Y-up convention.
33
+
34
+
Usage:
35
+
python usd_import_example.py [-colored]
36
+
37
+
Flags:
38
+
-colored Enable color visualization by using normals as colors (optional)
39
+
40
+
41
+
<ForBSPTask:>
42
+
The implemented method builds an axis-aligned Binary Space Partitioning (BSP) tree for triangle meshes.
43
+
44
+
At each node, the splitting axis is selected based on the largest spatial extent of the triangles, while the split position is chosen as the median of triangle centroids along that axis to avoid unbalanced partitions.
45
+
46
+
Triangles are classified as fully on one side of the split plane or intersecting it; intersecting triangles are propagated to all child leaf nodes to preserve spatial correctness.
47
+
48
+
During search, the BSP tree is traversed by testing each triangle against the split planes. Depending on whether the triangle lies on one side of the plane or intersects it, the traversal proceeds to the appropriate child nodes.
0 commit comments