-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
almost certainly obsolete, but some legacy notes
- Loading branch information
John Owens
committed
Oct 28, 2024
1 parent
cec5328
commit 0abe11a
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# How to go from a parsed .obj file to the starting data structures for subdivision | ||
|
||
Here's the data structures we need to derive: | ||
|
||
``` | ||
vertices_size # how many vertices in level-0 + level-1 | ||
# this is the entire vertex buffer | ||
base_vertex_positions # given in .obj | ||
base_faces # given in .obj | ||
subdiv_1_faces # must be generated | ||
triangle_indices # f(base_faces, base_face_valence) | ||
# and subdiv_1_{faces, valence} | ||
subdiv_1_triangles_count | ||
base_face_valence # f(base_faces) | ||
base_face_offset # exclusive-scan(+, base_faces) | ||
base_edges # f(?) | ||
base_vertex_valence # f(?) | ||
base_vertex_offset # 2 * exclusive-scan(+, base_vertex_vlnc) | ||
base_vertex_index # f(?) | ||
base_vertices # f(?) | ||
``` | ||
|
||
## Proposed data structure changes in subdivider code | ||
|
||
`offset` and `valence` can probably be put into one data structure that covers all vertices (and is the size of the vertex buffer). `valence` could be done as a segmented scan if necessary. | ||
|
||
Be better at explicitly exposing hierarchy (many data structures will be indexed internally by hierarchy level) | ||
|
||
## Q: When to convert from 1-based indexing (in .obj) vs. 0-based indexing (in subdivision code)? | ||
|
||
Probably after parsing (don't change the parser), then we can update the parser / get a different parser and use that unchanged. |