Skip to content

Commit

Permalink
Merge branch 'docs'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySmolenchuk committed Jan 9, 2024
2 parents 5418eb1 + 572ccda commit 7717318
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
6 changes: 5 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
[![exampleimage](docs/img1.jpg) ![exampleimage](docs/img2.jpg) ![exampleimage](docs/img3.jpg)](https://alexeysmolenchuk.github.io/hGeoPatterns/)

### What is hGeoPatterns
**hGeoPatterns** is a collection of RenderMan plugins for sampling Houdini geometry. This project is a mixture of **RIS** and **HDK** functionality to make operations like sampling and reading arbitrary Houdini Geometry Data in RenderMan shading networks. Similar to familiar *xyzdist()*, *prim_attribute()*, *nearpoints()* VEX functions. OSL shaders, headers and VOP definitions are included to make shader authoring easy.
**hGeoPatterns** is a collection of RenderMan plugins for sampling any Houdini compatible geometry. This project is a mixture of **RIS** and **HDK** functionality to make operations like sampling and reading arbitrary Houdini Geometry Data in RenderMan shading networks. Similar to familiar *xyzdist()*, *prim_attribute()*, *nearpoints()* VEX functions. OSL shaders, headers and VOP definitions are included to make shader authoring easy.

### Whats NEW
*:star:* Added Support for Packed geometry as well as Alembic and Usd.\
*:star:* New Utility Nodes added to simplify direct access to structure members.

### [Building and Installation](docs/Building.md)

Expand Down
45 changes: 33 additions & 12 deletions docs/Reference.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,65 @@
[HOME](../Readme.md)

## RIS Patterns / c++ plugins
# RIS Patterns / c++ plugins

Allows you to read data from any Houdini known geometry directly. This could be PrimPoly, PolySoups, Curves as well as Packed primitives, AlembicRefs and UsdRefs from **.bgeo**, **.bgeo.sc** or any other format which Houdini can digest e.g. **.abc** or **.usd**.*:star:*


## Point Cloud Specific
![network_example](network_example_pc.png)

#### SamplePoints
### SamplePoints
Allows you to sample the closest points from the file and store their sorted indexes and distances in the **ArrayData** structure for further reading. Similar to **pcopen**/**nearpoints** vex functions.

#### ReadAttribute
### ReadAttribute
Read specified point attributes from **ArrayData** structure indexes.
An empty filename means using the same file.
<br/><br/><br/>

<br/>

## Closest Point Specific
![network_example](network_example.png)

#### Closest
### Closest
The plugin is similar to the **xyzdist** vex function. It allows you to find the closest point on the surface/spline and store it in the **ClosestData** structure for further reading.

#### Interpolator
### Interpolator
Read interpolated attribute value from geometry at point matching the **ClosestData** structure. Similar to the **prim_attribute** vex function.
An empty filename means using the same file.
<br/><br/>

## OSL Patterns / Shaders

# OSL Patterns / Shaders
OSL shaders here are very simple examples demonstrating how you can manipulate results from samplers to build procedural effects.

![network_example](network_example_tex.png)
#### BuildCoords
### BuildCoords
Utility shader for building array of uv's from point-cloud-like data.

#### SampleTexture
### SampleTexture
Utility shader for batch reading textures from an array of uv's.
<br/><br/>

## VOP structures
# Utility Nodes *:star:*
![network_example](utilityNodes.png)

### UnpackArrayData
Utility node to direct access to ArrayData structure members.
### UnpackClosestData
Utility node to direct access to ClosestData structure members.
### UnpackManifold
Utility node to direct access to RenderMan Manifold structure members.
### PackManifold
Utility node to define RenderMan compatible Manifold.
<br/><br/>


# VOP structures
Custom structures are defined in C++ and OSL headers. They are also defined as a Houdini Vop type in *vop/structs.json*, which allows you to work with those structures in **OSL Generic Shader Builder**.
There also structure for RenderMan Manifold inputs.
<br/><br/>

## Note about derivatives in OSL and RIS

# Note about derivatives in OSL and RIS
The derivative calculation is required for Bump Mapping and Mip-Map optimization. RIS and OSL have very different mechanisms of derivative calculation in RenderMan. Be careful when using C++/RIS results as texture coordinates With OSL textures. Check if it works with **Dx()**, and **Dy()** functions or manually control texture filtering with the **width** parameter.

[HOME](../Readme.md)
Binary file added docs/utilityNodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7717318

Please sign in to comment.