Skip to content

Commit

Permalink
Merge pull request PixarAnimationStudios#1062 from barfowl/far_tutori…
Browse files Browse the repository at this point in the history
…al_additions

Additions and minor improvements to far/tutorials
  • Loading branch information
davidgyu committed Feb 14, 2019
2 parents aa3f75f + 6cae3a8 commit 6e52c57
Show file tree
Hide file tree
Showing 7 changed files with 366 additions and 10 deletions.
3 changes: 3 additions & 0 deletions documentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
far/tutorial_5/far_tutorial_5.cpp
far/tutorial_6/far_tutorial_6.cpp
far/tutorial_7/far_tutorial_7.cpp
far/tutorial_8/far_tutorial_8.cpp
far/tutorial_9/far_tutorial_9.cpp
far/tutorial_10/far_tutorial_10.cpp
osd/tutorial_0/osd_tutorial_0.cpp
)

Expand Down
29 changes: 24 additions & 5 deletions documentation/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Tutorials

The tutorial source code can be found in the `github.com repository
<https://github.com/PixarAnimationStudios/OpenSubdiv/tree/master/tutorials>`__
or in your local ``<repository root>/turorials``.
or in your local ``<repository root>/tutorials``.

----

Expand Down Expand Up @@ -65,7 +65,8 @@ or in your local ``<repository root>/turorials``.

* - | **Tutorial 0**
| This tutorial presents in a very succinct way the requisite steps to
instantiate a Far mesh from simple topological data. `[code] <far_tutorial_0.html>`__
instantiate a mesh as a Far::TopologyRefiner from simple topological
data. `[code] <far_tutorial_0.html>`__
| |far_tut_0|
|
| **Tutorial 1**
Expand All @@ -88,11 +89,11 @@ or in your local ``<repository root>/turorials``.
'face-varying' data recorded in the uv texture layout. `[code] <far_tutorial_3.html>`__
| |far_tut_3|
|
- | **Tutorial 4**
| This tutorial shows how to create and manipulate FarStencilTable. We use the
| **Tutorial 4**
| This tutorial shows how to create and manipulate a StencilTable. We use the
factorized stencils to interpolate vertex primvar data buffers. `[code] <far_tutorial_4.html>`__
|
| **Tutorial 5**
- | **Tutorial 5**
| This tutorial shows how to create and manipulate both 'vertex' and 'varying'
FarStencilTable to interpolate 2 primvar data buffers: vertex positions and
vertex colors. `[code] <far_tutorial_5.html>`__
Expand All @@ -106,6 +107,24 @@ or in your local ``<repository root>/turorials``.
| This tutorial shows how to create and manipulate tables of cascading
stencils to apply hierarchical vertex edits. `[code] <far_tutorial_7.html>`__
|
| **Tutorial 8**
| Building on tutorial 3, this example shows how to instantiate a simple mesh,
refine it uniformly, interpolate both 'vertex' and 'face-varying' primvar
data, and finally calculate approximated smooth normals. The resulting
interpolated data is output in 'obj' format. `[code] <far_tutorial_8.html>`__
|
| **Tutorial 9**
| Building on tutorial 6, this example shows how to manage the limit surface
of a potentially large mesh by creating and evaluating separate PatchTables
for selected groups of faces of the mesh. `[code] <far_tutorial_9.html>`__
|
| **Tutorial 10**
| In contrast to other tutorials, this tutorial makes use of a different vertex
data definition for use when vertex data is of arbitrary width. Uniform
refinement is applied to data buffers of three types: two of fixed size and
the third a union of the two that is dynamically sized and constructed.
`[code] <far_tutorial_10.html>`__
|
----

Expand Down
1 change: 1 addition & 0 deletions tutorials/far/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(TUTORIALS
tutorial_7
tutorial_8
tutorial_9
tutorial_10
)

foreach(tutorial ${TUTORIALS})
Expand Down
Binary file not shown.
37 changes: 37 additions & 0 deletions tutorials/far/tutorial_10/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# Copyright 2013 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#

set(SOURCE_FILES
far_tutorial_10.cpp
)

_add_executable(far_tutorial_10 "tutorials/far"
${SOURCE_FILES}
$<TARGET_OBJECTS:sdc_obj>
$<TARGET_OBJECTS:vtr_obj>
$<TARGET_OBJECTS:far_obj>
)

install(TARGETS far_tutorial_10 DESTINATION "${CMAKE_BINDIR_BASE}/tutorials")

Loading

0 comments on commit 6e52c57

Please sign in to comment.