The previous fix pointed far indexing tables to the origin vertex
of duped singular verts.
This fix goes one step further and actually shifts all vertex indexing
to start at the end of the coarse mesh vertices, using the space for
data that was previously occupied by duplicated singular verts.
The consequence is that client code no longer needs to duplicate vertex
data in vertex buffers (huzzah !).
- fix FarSubdivisionTablesFactory to shift factory vertex table offsets using Hbr's
singular verts map
- fix schema table factories (Catmark, Loop...) to correctly use these offsets
- remove vertex data duplication code from osdPolySmooth example
- remove some (unrelated) cruft from glViewer example
- shape_utils unfortunately still needs to dubplicate the singular verts to
allow the coarse edge drawing in our example viewers to work correctly
(although it could be fixed to avoid data duplication too...)
fixes#241
- Add a vector of index pairs to HbrMesh to track the index of a split
vertex and its origin vertex
- Correct the Far remap tables in FarSubdivisionTablesFactory to point split
vertices to their origin instead of themselves
- Fix regression/common/shape_utils.h to use the new HbrMesh::GetSplitVertices()
method.
- Fix the osdPolySmooth example to use the new HbrMesh::GetSplitVertices()
method.
- Add a paragraph to the documentation
fixes#241
Moving Takahito's implementation into the core API:
- added <gl/d3d11>PtexCommon.<glsl/hlsl> shader code
- added control to enable Ptex common trunk in <gl/d3d11>DrawRegistryBase classes
- fixed GL & D3D11 ptexViewer examples to use the new API
- implement virtual accessors in FarSubdivision tables that return a Scheme enum
- implement a safe typeid comparison in FarMeshFactory to get the same information
from Hbr subdivision classes
fixes#240
Also:
- add logic to locate the GUI mel scripts where the binary is located, then default to script search paths
- remove min/max macro defines
- remove iso646.h header (covered by CMake build)
- remove redundant Osd includes
- remove some build warnings
- code style fixes
- build tweak: move the mel scripts to the correct location in the build area
fixes#239
- remove unused variables
- isolate MSVC specific pragmas (these should eventually be cleaned up from the code...)
- add the plugin to the general build
The Chaikin crease interpolation mode seems to be broken:
- Catmark / Loop / Bilinear are passing the wrong halfedge vertex to the
SubdivideCreaseWeight function which results in sub-edge crease weights
being swapped
- the loop that iterates over adjacent edges needs to check against both
the original edge and its opposite, otherwise it may be incorrectly
accumulated into summation of these adjacent edges (with a 0.25 weight)
The proposed fix:
- Swaps the Dest/Org vertex passed to the SubdivideCreaseWeight (and
we probably want Julian to confirm that this the correct fix)
- Checks against both the original edge and its opposite in the iteration
over adjacent edges
- Replaces the std::vector based query with an HbrHalfedgeOperator for
better performance (hopefully)
The similar fix to OpenSubdiv been reviewed by Tony DeRose.
Also in the fix:
- fix "obj" tag parsing of the smooth triangle tag that was incorrectly
associated with the crease method (and reporting the wrong errors)
- add regression shapes for both Loop & Catmark schemes to hbr_regression
- add same shapes to the glViewer
- improve hbr_regression output to be more readable
- add command-line argument parsing to hbr_regression
- add functionality to dump an obj file when regression fails for comparison
fixes#235
Getting there, this code is being tested with Presto deformers and is working well. Valgrind reports no memory errors with the simple projectTest test harness.
set HBR_ADAPTIVE before including hbr code. Also use an ifndef in
far/meshFactory.h so that code can be included where someone else has
already defined HBR_ADAPTIVE.
Also:
- add 2 shape examples with Chaikin rule tag
- add shapes to the glViewer
- add a stub in the documentation
Note: the Chaikin rule currently applied by Hbr appears to be somewhat off...
fixes#236