- FarKernelBatch becomes a class w/ accessors
- split the FarKernelBatchFactory to its own header file
- add doxy doc
- propagate fallout to the rest of the code base
creases and other features and determine the isolation level needed.
Minor improvements:
- we now have a custom "corner" isolation level : with edge-only boundary
interpolation rules, corner vertices are rounded and would require an
isolation level of 10. In practice however, 5 appears to be more than
enough to produce a perfectly rounded shape and is set as a default
for this value.
- the logic has been made a little more efficient by moving the vertex
sharpness tags tests to a separate loop so as not to repeat the check
multiple times for a given vertex
Also added some doxy comments
fixes#161
of this quad to be tagged as boundary. These vertices will cause the
feature adaptive pass to generate sub-faces where appropriate, however
the face itself will not be identified as "non-patch", which causes the
FarPatchTables factory to mis-identify it and fall-back on an assert.
This fix flags these particular quad faces in the first adaptive pass.
The particular shape that caused the crash has also been addded to our
regression suite.
fixes#159
a new function is added to avoid confusion.
-GetNumVertices() returns number of vertices
-GetNumVerticesTotal() returns total number of vertices includins number of lower levels.
#closes 156
be used as intended to specify an installation directory, which can be located anywhere on the
file system.
Also improved the doxygen target and made the doxy build "quiet".
fixes#154
note : this is not using traditional bit-fields as we cannot guarantee that the CPU-side
compiler will match the bit-packing of the compilers used on the GPU-side.
- replace ptex indexing with the FarPtexCoord structure as a way to pass per-patch
ptex data to the shaders.
We are replacing a vector<int> arranged as :
int[0] : ptex face index
int[1] : (u,v) as 16 bits encoding the log2 coordinate of the top left corner
Instead we are now using a struct arranged as :
int[0] : ptex face index
int[1] : is a bit-field containing u,v, rotation, depth and non-quad
The u,v coordinates have been reduced to 10 bits instead of 16, which still
gives us a lot of margin.
- Replace OsdVertexBufferDescriptor with something more adequate for general
primvar representation (this name will probably eventually change...)
- Improve OsdPatchDescriptor
- add a "loop" boolean (true if the patch is of loop type)
- add a GetPatchSize() accessor
- OsdPatchArray :
- remove some redundant elements (still more to do there)
- Fix all shader / examples / regressions & stuff to make this all work.
fixes#143
2 client APIs are changed.
- VertexBuffer::UpdateData() takes start vertex offset
- ComputeController::Refine() takes FarKernelBatchVector
Also, ComputeContext no longer holds farmesh.
Client can free farmesh after OsdComputeContext is created.
(but still need FarKernelBatchVector to apply subdivision kernels)
- add tag parsing for h-hole in shape_utils
- re-create Renderman's test shape from the documentation (catmark_square_hedit.h)
- fix Hbr to correctly pass the hole tag from parent to child face
- fix FarSubdivisionTables to handle disconnected face-vertices without crashing
fixes#75
while retaining a necessary 1-ring on the inside of a hole edge
- add IsInsideHole() function to HbrHalfEdge
- add HasChild() function to HbrVertex and HbrHalfedge
- add a regression shape with adjacent holes and creases (tests dart, crease & boundaries)
Note : this does not address hierarchical edits inside holes or hole tags in hierarchical edits
fixes#78
Now a ComputeController is passed as an
argument to OsdMesh::Create(). This is
a better match to the underlying object
model and can be much more efficient for
compute controllers that have expensive
resources, e.g. compiled shader kernels.
Fixes#103
- make sure HBR passes down the hole tag to children when subdividing faces
- minor API modification : allow to unset the hole flag on a face
- modify uniform / adaptive FarMeshFactory to be aware of the flag
- make the FarSubdivisionTableFactory assert when finding unconnected HBR vertices (as it should)
* Uniform subdivision :
The refinement scheme only creates faces & vertices necessary
to maintain the one-ring around the edges of a hole, so this solution
is quite efficient.
* Adaptive subdivision :
At the moment we are still performing full topological analysis on holes and
only skipping patches associated to holes. This is sub-optimal in 2 ways :
1. the topological analysis can potentially be cranking on a lot of unnecessary
geometry
2. even though we may not be drawing the patches, the compute stage is still
applying kernels on all the control vertices of these patches.
We will have to revisit feature adaptive subdivision & holes, so keep the issue active.
fixes#78