Commit Graph

1031 Commits

Author SHA1 Message Date
manuelk
5c4e8286e5 Fix build warning from osdutil/adaptiveEvaluator.cpp 2014-01-03 15:43:16 -08:00
manuelk
1d4891fe8f Fix include paths for new common example objects build (windows build) 2014-01-03 15:29:43 -08:00
jcowles
eb09b9e14c Use obj targets for faster CPU/GPU lib builds
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
2014-01-03 14:52:35 -08:00
manuelk
94d2408c15 File missing from commit: 00b0d95058 2014-01-03 14:22:48 -08:00
manuelk
00b0d95058 Remove CMake compiling redundancies
- 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>)
2014-01-03 13:39:48 -08:00
jcowles
e8a25c511a Make osd a cmake object library.
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.
2014-01-03 11:02:51 -08:00
Dirk Van Gelder
1329ea34de Update license headers to apache. 2014-01-01 21:08:53 -08:00
Dirk Van Gelder
01fa0eac63 Add C compatible API to access the adaptiveEvaluator class from non-C++.
This is the case with blender.
2014-01-01 21:02:56 -08:00
Dirk Van Gelder
7f22c49cd3 Install was incorrectly set to bindir. Changed to libdir. 2014-01-01 10:31:11 -08:00
David G. Yu
570ebf7156 Fixed VS2010 warnings/errors. 2013-12-31 23:50:55 -08:00
David G. Yu
fdc3d11852 Added 'f' suffix to float constants in stencil factory data tables. 2013-12-31 23:43:37 -08:00
Dirk Van Gelder
7e0f6955c7 Added adaptiveEvaluator class inspired by Sergey's work in blender.
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.
2013-12-31 22:35:52 -08:00
Dirk Van Gelder
8b65c1b2f4 Updates for blender development. Add convenience function
for adding faces and specify that osdutil is an installed
library.
2013-12-23 08:59:13 -08:00
manuelk
1a8b41287e Fix OsdCpuEvalLimitKernel
Correct some vertex buffer descriptor mixups between length & stride

fixes #248
2013-12-20 15:40:52 -08:00
manuelk
d41cb5cd1f Fix maxvalence calculation in FarMeshFactory
The lowest max valence should always be 4: even a triangle
generates 4 quads.

fixes #249
2013-12-20 15:24:14 -08:00
manuelk
69ebcb8cc3 Fix FarStencilTablesFactory: replace limit tangents table
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
2013-12-20 11:01:58 -08:00
David G Yu
35a4d45cf2 Changed the hud to ignore mouse clicks when not visible. 2013-12-16 12:08:56 -08:00
David G Yu
8990d5712f Fixed iOS build 2013-12-15 23:39:32 -08:00
manuelk
bb13047db2 Fix FarStencilFactory control stencil caching
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
2013-12-13 16:23:19 -08:00
manuelk
a4f3627ec2 Removing asset for high-valence vertices running off limit tangent pre-computed table.
Note: the stencils generated will be incorrect for extraordinary crease vertices with valence > 11.

fixes #246
2013-12-11 13:30:36 -08:00
manuelk
96b63884f0 Fix degenerate stencil limit tangent code path.
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
2013-12-10 14:13:30 -08:00
Manuel Kraemer
a565526977 Fix unused variable build warnings (gcc 4.8.2 - Fedora 19) 2013-12-08 13:47:14 -08:00
manuelk
57ab6fc1ac Merge branch 'release/v2_3_3' into dev 2013-12-05 11:29:29 -08:00
manuelk
cc819a8e19 Merge branch 'release/v2_3_3' 2013-12-05 11:29:09 -08:00
manuelk
8a335c3858 Release 2.3.3 2013-12-05 11:28:42 -08:00
manuelk
14f5d60af9 Update release notes for release 2.3.3 2013-12-05 11:12:38 -08:00
Takahito Tejima
f7f2ca2581 Move uniform block definitions out of osd common shader into client shader.
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.
2013-12-03 15:59:38 -08:00
manuelk
469a196fee Fix FarStencilTablesFactory to correctly check for tangent output pointers
And not perform interpolation if output pointers for tangents weren't passed to the
factory

fixes #243
2013-12-03 10:53:05 -08:00
manuelk
d9562164f7 Fix stencil tangents incorrect magnitude scale
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
2013-12-02 19:07:09 -08:00
manuelk
ee26835d47 Fix CMake error message 2013-11-27 10:35:49 -08:00
manuelk
e072b19c2a Fix regex in FindMaya.cmake that breaks with recent versions of Maya 2013-11-26 15:53:14 -08:00
manuelk
b3b2e56a26 Adding recommended isolation output to OsdPolySmooth node.
- added attribute to the maya example node
- added AE template for editor display
- added ReSt documentation for the plugin
2013-11-25 17:12:57 -08:00
manuelk
8484d1e318 Adding stdlib.h include to fix OSX build. 2013-11-22 15:23:40 -08:00
manuelk
000cb400ca Revisit singular vertex fix for FarSubdivisionTables
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
2013-11-22 11:27:01 -08:00
manuelk
575d931f2d Fixing build break from hbr_regression 2013-11-21 16:27:13 -08:00
manuelk
c3cb17fa99 Modify Far remapping of singular vertices to point to their source vertex.
- 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
2013-11-21 16:05:31 -08:00
manuelk
25f6565238 Fix incorrect capitalization in GL ptexViewer shader.glsl: it's PtexMip*m*apLookup
fixes #242
2013-11-20 18:36:29 -08:00
David G. Yu
d881ea6046 Fixed VS2010 build warning 2013-11-20 18:03:28 -08:00
manuelk
791995cf32 Refactoring Ptex Mipmap and Analytic Displacement code
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
2013-11-20 15:47:59 -08:00
Dirk Van Gelder
8bc953fd3f Better tag support, removed debug print statements, added support for writing
refined .obj files, currently a bug there though.
2013-11-19 22:03:55 -08:00
manuelk
ab0cd0f8a2 Fix crashes induced by typeid
- 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
2013-11-19 16:19:27 -08:00
manuelk
fdfdb1cc8b Adding an error check on version parsing of main CMakeLists 2013-11-18 16:02:27 -08:00
manuelk
32fe4c54a4 Adding some documentation for Chaikin crease rule 2013-11-18 15:56:07 -08:00
manuelk
86b27e1ade Small code refactoring in FarPatchTablesFactory
- move private mthods computePatchParam() and computeFVarData() as private members of the FarPatchTablesFactory
- minor code cleanups
2013-11-15 17:42:57 -08:00
manuelk
33ff82246c Merge branch 'release/v2_3_2' into dev 2013-11-15 15:16:53 -08:00
manuelk
bfa042f548 Merge branch 'release/v2_3_2' 2013-11-15 15:16:28 -08:00
manuelk
cb93045236 Release 2.3.2 2013-11-15 15:15:51 -08:00
manuelk
beecafbd35 Update release notes for release 2.3.2 2013-11-15 15:12:34 -08:00
manuelk
c621c93aca Fix singular vertex handling by correctly populating the vertex buffer data.
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
2013-11-15 14:55:46 -08:00
manuelk
5a473033f2 Fix OsdPolySmoothNode build
- remove cruft
- add installation rule for mel script
2013-11-14 11:37:35 -08:00