Because our plugin sets UVs with individual face-varying vertices,
Maya interprets the buffer as discontinuous everywhere. Adding a
node in the graph that merges UVs along non-boundary edges resolves
this problem (until the plugin outputs the UV vertex indices in
an aggregated manner).
Also:
- Add a _numVertices member to cpuSmoothNormalContext (for memory reset function)
- Fix memory reset function in cpuSmoothNormalContext (was performing redundant memsets)
- Add a resetMemory boolean to cpuSmoothNormalContext to make reset step optional (default is off)
- added a _stringify function to top CMakeLists
- switched all stringification tasks to use the macro
- all suffixes are now .gen.h instead of .inc (to help cmake track dependencies)
Further leverage cmake object libraries to share object files for CPU
and GPU OSD libraries, avoiding duplicate complation for dynamic/static
build passes.
CMake restricts object library inputs to header and source files, so the
.inc files were renamed to .gen.h (which seems like a better name
anyway) to make CMake happy.
Also updated the .gitignore file to ignore .gen.h files.
Conflicts:
opensubdiv/osd/CMakeLists.txt
- set OBJECT targets for osd cpu & gpu libs, and use the obj target for
static and dynamic linking
- add a new examples_common_obj OBJECT target
- replace direct source dependencies to obj target in all examples CMakeLists
This change makes it possible to not re-compile the same source files
multiple times when they are used in multiple targets. Thanks to jcowles
for uncovering the CMake functionality.
Note: it seems that multi-process build is working again (gmake -j <x>)
An object library allows other build targets to use the object files
from this library.
The change introduces osd_static_cpu_obj which is consumed by
osd_static_cpu.
This will be useful for emscripten integration where we cant use the
compiled library, rather it will use the object files, targeting
osd_static_cpu_obj.
Do feature adaptive refinement, then use the cpuEvalLimit API to evaluate
grids of points on faces.
Test harness is tessellateObjFile which has a -blender option to trigger
the gridding tessellation code.
The new table accomodates verts with valence up to 20.
Dr. DeRose provided me with a python script to generate the tables, but wants to
investigate a closed-form alternative to pre-computed tables.
Also: our logic is incorrect - it is missing adjacent face-points in the
interpolation (apparently this has been incorrect since day 1). Further fixes
coming next year...
fixes#246
The logic that invalidates the vertices in the control stencil and
the cached bspline patch weights was not triggering correctly.
Hopefully this new bit of logic should clear up some of the incorrect results.
fixes#246
Limit tangent stencil crease rule was accumulating the wrong vertices. This
change switches from using an Hbr operator to using a less efficient std::list,
but allows us to rotate around the vertex from an arbitrary starting incident
edge.
The values returned are "plausible", but more extensive testing would be required
to validate this new code.
fixes#246
Important notice: all client shader code must have following functions and compose them to osd intrinsic shaders (vertex/tessEval/tessControl)
mat4 OsdModelViewMatrix()
mat4 OsdProjectionMatrix()
mat4 OsdModelViewProjectionMatrix()
float OsdTessLevel()
int OsdGreogryQuadOffsetBase()
int OsdPrimitiveIdBase()
We probably should write a utility class for basic binding of them, to make client code simpler.
The tangents were only scaled in the "bail-out" code branch that
pushes vertices to the limit and performs bi-linear interpolation.
Now we are also scaling the bi-cubic patch interpolation code branch.
There may be another code path left to fix (as well as some pointers
being currently unchecked)
fixes#243
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