'Houdini/SHOPs'에 해당되는 글 11건

  1. 2013.01.11 vex shading 참고 그림
  2. 2012.11.29 Optional rendering parameters
  3. 2012.11.29 Global variable access in shading contexts




'Houdini > SHOPs' 카테고리의 다른 글

fog shader 2  (0) 2013.01.17
fog shader  (0) 2013.01.17
dPds, dPdt  (0) 2013.01.14
Optional rendering parameters  (0) 2012.11.29
Global variable access in shading contexts  (0) 2012.11.29
Posted by scii
:

Optional rendering parameters

Note

When you specify a texture, such as with the "environment" keyword, you can also use the image filtering keyword arguments.


Keyword Functions Description
“scope”, string spec all

Allows an override of the scope for ray-intersections. A special scope argument, scope:self, will match the currently shading object.

“bias”, float value irradiance occlusion

The irradiance and occlusion functions take an optional bias parameter which gives control over self-intersection.

“maxdist”, float value all

Allows an override of the maximum distance the ray can travel when testing for intersections. Some functions (i.e. fastshadow()) have the maximum distance implicitly defined (by the length of the ray) and should probably avoid using this option. However, this option can be used effectively when computing reflections, global illumination, refraction etc.

“variance”, float value reflectlight refractlight fastshadow filtershadow trace

Overrides the global variance control (mantra’s -v option) which is used to determine anti-aliasing quality of ray tracing. For more information please refer to the documentation on mantra.

“angle”, float value reflectlight refractlight fastshadow filtershadow trace

Specifies a cone angle over which samples will be distributed. To be effective, the samples parameter should also be specified. The value is specified in radians.

“samples”, int value

reflectlight refractlight fastshadow filtershadow trace irradiance occlusion

How many samples should be sent out to filter rays. For the irradiance and occlusion functions, specifying a samples parameter will override the default irradiance sampling.

“environment”, string map reflectlight refractlight trace irradiance occlusion

If the ray sent out to the scene misses everything, then it’s possible to specify an environment map to evaluate.

Using the ray’s direction, the environment map specified will be evaluated and the resulting color will be returned. Most likely, it will be necessary to specify a transform space for the environment map evaluations.

In the case of refractlight and trace the Of and Af variables will be set to 0 regardless of the background color specified. the resulting color.

When an environment map is specified, the filtering options from texture() are also supported.

See how to create an environment/reflection map.

“envobject”, string objectname

“envlight”, string lightname

“envfog”, string fogname

reflectlight refractlight trace irradiance occlusion

If an environment map is used, the orientation of the environment map can be specified by transforming the ray into the space of another object, light or fog object in the scene. In Houdini, null objects can be used to specify the orientation. For example:

Cf = R*reflectlight(bias, max(R), "environment", "map.rat", "envobject", "null_object_name");

“envtint”, vector color reflectlight refractlight trace irradiance occlusion

If an environment map is used, it’s possible to “tint” the resulting color.

“background”, vector color reflectlight refractlight trace irradiance occlusion

If a ray misses all objects, it’s possible to specify the background color of the scene. In the case of refractlight and trace the Of and Af variables will be set to 0 regardless of the background color specified.

“distribution”, string style irradiance occlusion

Distribution for computing irradiance. The default is to use a cosine distribution (diffuse illumination). The possible values for the style are:

  • nonweighted - Uniform sampling

  • cosine - Cosine weighted sampling

See irradiance and occlusion for issues related to this keyword. 

'Houdini > SHOPs' 카테고리의 다른 글

fog shader 2  (0) 2013.01.17
fog shader  (0) 2013.01.17
dPds, dPdt  (0) 2013.01.14
vex shading 참고 그림  (0) 2013.01.11
Global variable access in shading contexts  (0) 2012.11.29
Posted by scii
:

Global variable access in shading contexts

Each shading context is responsible for setting or modifying different variables. For example, the displacement context can modify the position of the surface being rendered, while the light context is responsible for setting the color of the light source. The Read/Write access of the global variables for each context is summarized in this table.

Variable Type Description Displacement Surface Light Shadow Fog
Cf vector

The final color for the surface. The vector represents the RGB color for the surface.

- W - - R/W
Of vector

The final opacity for the surface. A value of {1,1,0} will be opaque in red/green, but let through blue light from behind. See opacity vs. alpha.

- W - - R/W
Af float

The final alpha for the surface. This is the value which is placed in the alpha channel of the output image. See opacity vs. alpha.

- W - - R/W
P vector

The position of the point on the surface being shaded. In light or shadow shaders, the P variable contains the point on the light source.

Although P is modifiable in the surface context, changing P will not affect rendering of the surface, only shading.

R/W R/W* R R R
Pz float

The Z component of the point being shaded.

R R - - R
Ps vector

In light & shadow shaders, this is the position of the point on the surface being illuminated.

- - R R -
I vector - R R R R
Eye vector

The position of the eye.

- R R R R
s, t float

The parametric S and T (sometimes called U and V) coordinates on the surface being shaded.

R R R R R
dPds, dPdt vector

The delta between the current position (P) and the position of the neighboring micropolygon vertex along S and T. You can use these vectors to get the approximate length of micropolygon edges.

R R R R R
N vector

The shading normal for the surface.

vector R/W R/W R R R
Ng vector

The geometric normal for the surface. This normal represents the “true” normal of the surface being shaded. For example, with Phong shading, the N variable represents the interpolated normal, while the Ng variable represents the true polygon normal

R R R R R
Cl vector

Light color.

- R/W W R/W R/W
L vector

The vector from the point on the surface to the light source. The length of this vector represents the distance to the light source. See how the L variable is initialized.

- R R/W R R
Lz vector

The Z-axis in the space of the light. This is a unit vector.

- - R R -

'Houdini > SHOPs' 카테고리의 다른 글

fog shader 2  (0) 2013.01.17
fog shader  (0) 2013.01.17
dPds, dPdt  (0) 2013.01.14
vex shading 참고 그림  (0) 2013.01.11
Optional rendering parameters  (0) 2012.11.29
Posted by scii
: