Commit Graph

390 Commits

Author SHA1 Message Date
manuelk
bfbd868fe2 Modify Far::TopologyRefiner refinement options
- move level of refinement / isolation into the Options structs
- fix splash damage in rest of the code

note 1: this is less than ideal, because most compilers accept the previous
        call to these functions with an incorrect parameter list (ie. passing
        the level instead of the struct issues no warnings and compiles...)
        caveat emptor...

note 2: the level parameter names may not be final for adaptive modes
        as we will likely want independent controls over crease vs.
        extraordinary vertex isolation.
2014-12-30 14:07:24 -08:00
manuelk
7954fbab37 Fix tangents in Osd::EvalLimitController
- don't rotate (s,t) coordinates but rotate the patch instead !

- refactor osd/cpuEvalLimitKernels to share Far::PatchTables cubic spline
  interpolation functions : this replaces tensor product formulation with
  weight matrices, which does not really impact performance here, but would
  have to be replaced when implementing regular gridding functions.

- fix OsdCpuEvalLimitController to not rotate coordinates and pass the rotation bitfields

- expose Far::PatchTables spline interpolation API (protected -> public)

- fix glEvalLimit tangent buffers (remove empty padding - see below)

- change policy for tangent buffers : the output buffer descriptor is
  **NO LONGER APPLIED** to tangent output buffers. Tangent primvar data
  buffers are no longer applying the offset and stride from the descriptor
  (because it doesn't make sense to share it). If more flexiblity is
  required, we will consider adding independent descriptors for the tangent
  buffers. This change will impact existing code that generates tangents
  with the EvalLimit controller.

fixes #370
2014-12-25 13:22:27 -08:00
manuelk
5944ada0f9 Add Options structs to Far::TopologyRefiner refinement methods
- fix all splash damage to tutorials / examples...
2014-12-23 10:07:24 -08:00
manuelk
b59c36d691 Add glfw error callback to code examples 2014-12-20 14:44:50 -08:00
manuelk
15b4135cfb Fix infinitely sharp edges isolation
- change topology refiner to check for edge sharpnesses when selecting faces for isolation
- add face-aggregator for edge tags to Vtr::Level
- fix logic in Far::PatchTablesFactory to correctly tag single-crease patches along infinitely sharp edges

note : this fix is a bit of a cludge - barfowl confirms that the vertex crease tags (VTags) are intended to
carry neighborhood information, which they currently do not. we will revisit this shortly and fix the tags,
which will allow us to simplify the traversal logic when isolating topology features.

fixes #369
2014-12-19 18:18:13 -08:00
manuelk
4643a51fb0 Fix Png dependency in examples build (fixes screenshot ability in glViewer) 2014-12-18 11:13:28 -08:00
manuelk
48cf4b6528 Refactor Vtr::Array for better "const" safety
Const' declared instances of Vtr::Array do not protect the pointer held
privately by the class properly. In order to force the compiler to
protect this pointer, we removed all non-const accessors from Vtr::Array
(now renamed Vtr::ConstArray) and moved them to a child class (Vtr::Array),
which requires const_cast<> operators internally to allow access.

The change & renaming is then propagated to all internal dependencies.
2014-12-15 10:23:13 -08:00
manuelk
9a3a88546d Rename some members of Far::TopologyRefinerFactory::TopologyDescriptor for consistency
- propagate changes to tutorials / examples
2014-12-12 11:19:24 -08:00
manuelk
ce55f56d50 Rename Sdc::Options vertex boundary interpolation rule enums
- VVarBoundaryInterpolation is now VtxBoundaryInterpolation
- enum prefix change from VVAR to VTX
- generel cleanup / doxyfication
- update of beta / release notes
2014-12-12 11:10:17 -08:00
manuelk
544213b3f0 Fix smooth triangles catmark weights
- rename enums in sdc/options
- add support for "smoothtriangles" tag in Shapes
- add 2 test shapes to glViewer
2014-12-11 09:19:41 -08:00
manuelk
4236aa8c06 Fix glViewer crash for Win Debug build
- switch std::vector::reserve() to resize() so that boundary check on read doesn't have a size 0 vector

fixes #362
2014-12-05 10:50:09 -08:00
manuelk
0ff7b15711 Fix Win build
- make sure we don't get conflicting enums (CODE_ERROR)
- fix template specialization for Far::TopologyRefinerFactory in regression/common/vtr_utils
- fix remaining error reporting code around osd
2014-12-03 20:04:35 -08:00
manuelk
cc6c0925a3 Refactor error reporting system
- change error codes from situational to general (fatal / coding / run-time...)
- pull error functions from Osd into Far
- add a templated topology validation reporting system to Far::TopologyRefinerFactory
- fix fallout on rest of code-base
2014-12-03 17:19:07 -08:00
manuelk
538c13f394 Fix Windows build 2014-11-25 14:14:59 -08:00
manuelk
b27b55e4a8 Refactor Far::PatchTables
- split Far::PatchDescriptor into its own class (mirrors Far::PatchParam)
- hide PatchArray as a private internal structure
- add public accessors patterned after Far::TopologyRefiner (returning Vtr::Arrays)
- propagate new API to all dependent code

note: some direct table accessors have not been removed *yet* - see code for details
2014-11-25 12:41:19 -08:00
manuelk
2d0182e3e9 Enabling Loop test shapes in glViewer and glFVarViewer code examples 2014-11-18 12:44:52 -08:00
manuelk
b599bbc0cc Fix vtrViewer code example
- add control to toggle display of gregory basis
- add dedicated (yellow) color to common/patchColors for gregory basis
- fix display of end-cap quads
2014-11-18 10:57:19 -08:00
manuelk
e8210886a8 Extend stencil-driven Gregory basis code support to Osd::EvalLimit (cpu) 2014-11-11 17:35:52 -08:00
manuelk
f43854a2dd Add test shapes to glStencilViewer code example (gregory test 6 & 7) 2014-11-11 11:29:33 -08:00
manuelk
15725d28e8 Fix VtrViewer to display Gregory patch basis (debugging) 2014-11-11 11:28:39 -08:00
manuelk
c237ab00fc WIP check-point for Gregory basis factorization
- adding support for StencilTables creation from a Gregory basis
- fix a bug in the prot-stencil allocator (slow memory pool was not being cleared properly)
2014-11-04 11:14:21 -08:00
manuelk
9ee67664ae Adding visualization ability for Gregory patch basis to vtrViewer 2014-10-31 17:09:20 -07:00
manuelk
b3124649f8 Fix vtrViewer - breaks introduced by single-crease patch additions
note: adaptive wireframe display still needs work
2014-10-29 10:56:55 -07:00
David G Yu
e9aed5394a Fixed a few problems with the vtrViewer on OS X (Mavericks and Yosemite) 2014-10-24 22:16:47 -07:00
manuelk
5f810a0f8e Add support for 'hole' faces
- adaptive mode: remove faces tagged as holes from the selection of faces to isolate

- uniform mode: faces tagged as holes are still included in the refinement process,
                however they are removed from patch tables

- future improvements: add a 'selective refinement' code path separate from 'uniform refinement'
  to handle this case without un-necessary subdivision work.
2014-10-24 13:52:40 -07:00
David G Yu
cae2144f6c Fixed glPaintTest build error related to High DPI changes. 2014-10-24 11:25:28 -07:00
David G Yu
e99ac7e0c1 Updated example framework code to disable SSAO by default. 2014-10-24 11:18:51 -07:00
David G Yu
4c0f026bee Fixed a few problems with High DPI displays in the example programs. 2014-10-24 11:15:19 -07:00
David G Yu
e2bcc041d3 Added catmark_gregory_test{6,7} to a few examples. 2014-10-24 11:07:24 -07:00
David G. Yu
a9cbb1b3fd Fixed VS2012 compile error. 2014-10-23 14:17:49 -07:00
David G. Yu
cc71c8e741 Fixed Osd namespace use in DX examples. 2014-10-23 13:48:55 -07:00
manuelk
8e5426d93e Fix build for vtrViewer code example (match refactor of Far::StencilFactory) 2014-10-22 11:01:22 -07:00
manuelk
7d07e341e0 Adjust near clipping plane in glViewer automatically when SSAO is turned off
- when SSAO is turned off, we can bring the near clipping plane much closer to help close-up inspection...
2014-10-21 18:50:54 -07:00
manuelk
f145f70fd2 Refactor Far::StencilTablesFactory
- re-implement the pool allocator
    - use templates to remove code redundancy between regular & limit stencils
    - leverage [] operator overloading to simplify stencil factorization
    - add the ability to treat subdivision levels independently (see below)

- refactor Far::TopologyRefiner::Interpolate<>() methods to pass buffers by reference
  (allows overloading of [] operator)

- rename some of the stencil factory options
- propagate changes to Osd / examples / tutorials...
2014-10-21 16:36:26 -07:00
manuelk
7704d682d6 Reset default prim in glViewer code example to first in list 2014-10-13 11:27:43 -07:00
Takahito Tejima
c0907c7bc1 Introduces 'single-crease patch' : implements "Efficient Evaluation of Semi-Smooth Creases in
Catmull-Clark Subdivision Surfaces", Niessner et al, Eurographics 2012.

This change includes;
-topology identification for single-crease patch during adaptive refinement.
-patch array population (similar to boundary)
-sharpness buffer generation
-glsl shader

Eval stuffs will be coming.
2014-10-13 08:52:09 -07:00
manuelk
c30087cb52 Fix face-varying code in examples / tutorials to reflect changes in commit 4d84dfd7be 2014-10-10 11:57:43 -07:00
manuelk
a79832b3a1 Far::PatchTables re-factor & clean-up
- remove Descriptor iterators
- switch 'unsigned int' indices to typed Far::Index

We aren't done yet... but its a step in the right direction
2014-10-09 14:48:50 -07:00
manuelk
64610cacf7 Addng a regression shape to test face-varying boundary interpolation rules 2014-10-06 16:22:10 -07:00
manuelk
43c235b85d Adding 2 regression shapes to exercise face-varying interpolation code paths 2014-10-03 10:35:32 -07:00
manuelk
43493bb9ae Add support for bilinear stencils to the FarLimitStencilsFactory
- also update glSencilViewer code example to visualize the new stencil type
2014-10-02 16:09:17 -07:00
manuelk
431ee0fabb Fix boundary interpolation rule bug in glFVarViewer
- "propagate corner" rule was swapped with "always sharp" rule
2014-10-01 16:38:06 -07:00
manuelk
d898ab9779 Update glFVarViewer code example to match face-varying boundary policy changes in Sdc 2014-10-01 11:27:57 -07:00
manuelk
0d4582b34c Add 'sticles' to the glEvalLimit code example
Make the sample locations dynamic by adding a velocity vector. Face boundary
crossing is handled using the new ptex adjacency functionality recently
added to the Far::TopologyRefiner.
2014-09-30 18:53:47 -07:00
manuelk
82e7a1bcc5 Minor EvalLimit naming refactor
- also added some additional animation to the glEvalLimit code example
2014-09-22 16:01:43 -07:00
manuelk
d02bfc48d2 WIP on LimitStencilTablesFactory
- added an option to Far::StencilTablesFactory to generate stencils for
  coarse control vertices
- refactored interpolation code out into Far::PatchTables
- corrected tangent interpolation
- code cleanup & comments
2014-09-18 17:48:34 -07:00
manuelk
2e81594050 Fix GL_DEPTH_TEST in glStencilViewer 2014-09-17 17:52:37 -07:00
manuelk
cab8e0a038 Adding catmark_chaikin2 test shape
- this shape tests for Chakin rule around vertices with multiple incident creased edges
  (shows where Hbr is wrong)
2014-09-17 14:46:10 -07:00
Manuel Kraemer
4eb6450bfe Partial fix of bad tangents for arbitrary limit stencils 2014-09-13 07:38:12 -07:00
manuelk
c3cfb6824b Fix window title for glStencilViewer code example 2014-09-12 17:04:26 -07:00