Commit Graph

46 Commits

Author SHA1 Message Date
Takahito Tejima
d026aca006 use std::string instead of char* for regression shapes definition,
to avoid MSVC's literal length limitation on some big shapes.
2013-03-19 14:43:21 -07:00
Manuel Kraemer
8e9e832f94 When OpenCL is detected, make sure all the includes / libs are tacked on the build lines 2013-03-16 18:44:07 -07:00
Manuel Kraemer
d703ba0205 fix some unused variable warnings 2013-03-16 18:43:20 -07:00
Takahito Tejima
fbc139d39c fix compile errors on gcd kernel 2013-03-07 22:43:47 -08:00
Takahito Tejima
8efecb0fca Batching stuffs: generalized kernel batches, table/dispatcher refactoring, multiMeshFactory, drawContext, etc.
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)
2013-03-07 17:50:15 -08:00
manuelk
ea1a87441f Add support for hierarchical hole edits.
- 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
2013-03-01 18:27:19 -08:00
manuelk
25f79e7ff2 - change adaptive refinement in FarMeshFactory to not refine inside holes,
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
2013-02-20 14:12:09 -08:00
manuelk
a52c70ab8b First pass implementation of holes :
- 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
2013-02-13 14:34:33 -08:00
Andrew Wong
b25226134f fix warnings for having assignments inside conditionals
warning C4706: assignment within conditional expression
2013-02-09 23:34:58 -05:00
manuelk
ef408fc67c - remove the now obsolete glutViewer (replaced by glViewer)
- remove some glut-era callbacks in glViewer / ptexViewer
- fix OSX includes in osd_regression

fixes #117
2013-02-08 14:06:44 -08:00
manuelk
c53f973651 - fixed GL context crashes for Linux / GLFW 3.0
- refactored CLI arguments parsing
- minor code style cleanups
2013-02-06 14:07:47 -08:00
Manuel Kraemer
758a788b32 Merge pull request #110 from aras-p/osd_regression_work
osd_regression: add "CL" backend that tests OpenCL kernel
2013-02-06 08:00:09 -08:00
David G Yu
88679ce187 Fixed WIN32 build breakage.
GLFW tries to avoid including windows.h, but by hijacking
macro definitions provided by windows.h GLFW actually
further pollutes the global namespace.
2013-02-05 17:05:59 -08:00
Aras Pranckevicius
663a62cb08 osd_regression: add "CL" backend that tests OpenCL kernel with GL buffer backing 2013-02-04 22:01:59 +02:00
Aras Pranckevicius
660fd15e3b osd_regression: implement raw CPU and CPU with GL VBO backing tests. Actually count test failures; they were not counted before ;) 2013-02-03 19:25:22 +02:00
Aras Pranckevicius
e0b231424f osd_regression: towards running all test cases per backend (checkBackend function) 2013-02-03 19:07:04 +02:00
Aras Pranckevicius
1fbdf77bb4 osd_regression: towards testing multiple backends; adding cmdline arg parsing 2013-02-03 19:00:28 +02:00
Aras Pranckevicius
2d00699c8d osd_regression does not need GLEW on OSX 2013-02-03 18:34:41 +02:00
manuelk
055ab17357 migrate osd_regression from GLUT to GLFW (this regression still needs work)
fixes #98
2013-01-31 18:19:56 -08:00
manuelk
4b199f7587 Make sure that shape strings are post-fixed with a null-char when read from file.
fixes #85
2012-12-11 11:40:57 -08:00
manuelk
10c687ecd5 Release Candidate 1.0 :
- [Feature Adaptive GPU Rendering of Catmull-Clark Surfaces](http://research.microsoft.com/en-us/um/people/cloop/tog2012.pdf).

- New API architecture : we are planning to lock on to this new framework as the basis for backward compatibility, which we will enforce from Release 1.0 onward. Subsequent releases of OpenSubdiv should not break client code.

- DirectX 11 support

- and much more...
2012-12-10 17:15:13 -08:00
U-octave\dyu
3467673a6b Fixed a build issue with Visual Studio 2010 2012-10-09 10:57:47 -07:00
manuelk
5f5207999f Refactoring far (cliff notes):
- All data representation classes are now single-templated for a vertex class 'U'

    - All constructors / instancing code has been moved into "Factory" functions that are dual-templated
      for two vertex classes <class T, class U=T>. This allows hbr specialization with a placeholder
      vertex flass 'T' for faster analysis without paying interpolation costs, while far can still specialize
      a fully implemented vertex class 'U' with full subdivision functionality.

    - Some preliminary clean-up work on FarVertexEditTables with the addition of a FarVertexEdit class
      as a replacement for the former HbrVertedEdit which was introducing back dependencies on hbr. The
      implementation is very lightweight. Some slight renaming / cleanup of the code, with some more to
      be done.

    - there are no more dependencies on hbr (not even #include) from far's data structure !

Notes :
    - the FarDispatcher mechanism has become somewhat awkward and should be re-evaluated when refactoring osd.

    - the "Factory" pattern survives this round of refactoring until we can find something better.

Closes #34
2012-09-17 18:41:48 -07:00
manuelk
2f5a14af87 (not so great) Fix for the hard-wired hbr regression path to work
with Windows.

Closes #58
2012-08-22 16:40:17 -07:00
Manuel Kraemer
832670c9ff Oops - need osd regression to add proper libraries even if we don't really use them yet.
Closes #55
2012-08-21 07:49:50 -07:00
manuelk
2bbf5fb27e First pass at an hbr regression test :
- generate baseline data with the new hbr_baseline tool
- run the a regression of the current hbr code over the baseline data-set with hbr_regression

There is still some cleanup to do to generalize some of the "shape" code as our intermediate
obj-like file format is unfortunately entrenching itself (we should really be using RIB...)

There is also a fair amounto f copy/pasted stuff in the regression code that needs to be refactored

Closes #32
2012-08-17 16:58:01 -07:00
manuelk
783eed920a Remove IlmBase dependencies for now as we are not using any of the features.
Leaving cmake/FindIlmBase.cmake in case we need the API in the future.

Closes #36
2012-08-10 16:40:22 -07:00
manuelk
e2217e182c From now on, hbr assumes that its clients will provide the defition of a
mutex class with Lock / Unlock public functions.

- remove Mutex implementation from Hbr (and revert to original PRman code)
- provide a Mutex class stub in osd
- add some forward declarations in OsdMesh to limit some of the mutex spills
- #include <osd/mutex.h> where needed (little hackish until we can refactor
some of far better)
- remove ILM_BASE from some CMakeLists

Closes #48
2012-08-10 15:14:02 -07:00
manuelk
a1552cfe82 Siggrpah 2012 - rolling over all of prepro work into beta 1.1 2012-08-03 19:51:27 -07:00
manuelk
3920f9c39a Add a SHARED target for OSD and direct dependent example / regression code
to link against that version (except on Windows where we stay on STATIC mode
until all the kinks can be worked out)

Closes #27.
2012-06-20 18:20:41 -07:00
manuelk
b6b2a0aadd Defaulting the regression to kCPU type kernels until an automatic
regression system is implemented.

Closes #26.
2012-06-20 16:18:58 -07:00
manuelk
7dc52d2a64 Actual regression code (currently hard-locked in single CPU mode - need to branch for all kernel types)
Closes #18.
2012-06-19 19:01:01 -07:00
manuelk
eb26c65a88 first pass at an osd regression suite, following similar lines to the far regression.
- modify shape_utils to return a vector of coarse vertices when creating an hbr mesh

- minor cleanup of osd mesh and the addition of a vector parameter in the creator to
  save the remapping between the hbr mesh progenitor and the current serialized osd mesh.

- minor fallout modifications to the glutViewer & far regression code

Notes :

- the dual template of far is causing a lot of complications
  -> suggest finding a way to isolate the T template to the factory code.
  -> far needs a concept of a vector of vertex & varying data (to abstract the vertex buffer
     away from osd)
  -> the dispatched mechanism is awkward and needs refactoring
  -> suggest moving the default CPU kernels away from the subdivision tables
  -> suggest finding a way to completely untemplate the tables (we might need a templated
     factory function though)
  -> osd should be able to call delete on the far mesh to get rid of all the CPU-bound data
     once the GPU data has been laid-out.

Closes #18.
2012-06-19 17:15:07 -07:00
manuelk
2494262b4d tabulation fix 2012-06-18 18:20:34 -07:00
manuelk
f651dea885 * Fixed a while loop that could crash when boundary interpolation
rules are set to "none" (both in Catmark & Loop)

* Amended shape_utils to always set a default boundary interp. rule
  even when no tag was read (ie. don't default to "none")

* Added a regression test for the "dart" shape to test both
  "edge only" and "edge corner" boundary interp. rules.

Closes #2.
2012-06-15 19:13:29 -07:00
manuelk
7a6fd95f6b Move Hbr behind the OpenSubdiv namespace
Fix all regressions / plugins.

Closes #3.
2012-06-14 18:47:57 -07:00
Manuel Kraemer
ac8c01879a Enlarge token buffer from 15 to 50 chars to accommodate the
larger prman tag names.

Closes #5
2012-06-13 08:30:01 -07:00
Manuel Kraemer
4705b6dba1 Revert "Enlarging the token string to be 50 chars instead of 15 to accomodate"
This reverts commit b8cfe4b0bb.
2012-06-13 08:29:07 -07:00
Manuel Kraemer
b8cfe4b0bb Enlarging the token string to be 50 chars instead of 15 to accomodate
the longer prman tag keywords.
2012-06-13 08:18:25 -07:00
Manuel Kraemer
c2f42fa239 fixing error message for IlmBase dependency 2012-06-11 11:20:36 -07:00
Manuel Kraemer
36dc03f3b0 fix memory allocation problem : vertex size is 3 floats... 2012-06-11 07:53:10 -07:00
Manuel Kraemer
284a2884bb checkpoint for the glutViewer in the example code (not functional yet) 2012-06-10 19:59:04 -07:00
Manuel Kraemer
624baf4738 minor cosmetic changes to far regression 2012-06-09 14:23:49 -07:00
Manuel Kraemer
a055967056 first pass at osd module - no GLSL / CUDA / CL kernels yet 2012-06-08 17:06:35 -07:00
Manuel Kraemer
52f2b55423 oops 2012-06-08 14:54:57 -07:00
Manuel Kraemer
dcb6572ae9 Base check-in of Hbr / Far 2012-06-08 11:18:20 -07:00