mib_texture_vector

 
 
 

Category: mental ray > Texture

Shader Family: Texture

Output: Vector

This shader returns a texture vector derived from orthographic projections of the 3D point in space (XY, XZ, YZ) or non-orthographic projections (spherical or cylindrical); or it returns a numbered texture vector from the texture vector list. Optionally, this shader can base its calculations on object, camera, world, or screen space.

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

select

Specifies the value to look up, as described in Texture Space Mapping below.

selspace

The source space selected for projections, as described in Texture Space Mapping below. Space conversion is done before the projection specified by the select parameter.

If this parameter is 4 (screen space), then the select, vertex, and project parameters are ignored.

vertex

Specifies the location of the vertex: 0 is the intersection point; 1, 2, and 3 are the vertices of the intersected triangle. It has no effect if select is -10.

project

Specifies a projection that is performed after selection and space conversion. It has no effect if select is -10. See Texture Space Mapping below.

Texture Space Mapping

The mib_texture_vector, mib_texture_remap, mib_texture_rotate, mib_bump_basis, mib_bump_map, and mib_passthrough_bump_map shaders take care of selecting, creating, and remapping texture spaces, computing basis vectors, and other tasks necessary before a color or displacement can be applied.

Some of these functions have a select parameter that has one of the following values:

0..63

Selects a texture vector. If this exceeds the number of defined texture spaces, it defaults to -1 (the point in space).

-1

Selects the 3D point in space directly, and may apply a space point transformation.

-2

Selects the normal vector, and may apply a space vector transformation.

-3

Selects the motion vector, and may apply a space vector transformation.

-4

Selects the ray direction, and may apply a space vector transformation.

-5..-9

Selects a surface derivative vector, and may apply a space vector transformation. The values are The object must be defined to contain derivatives.

-10

Selects a 2D background plate coordinate with (0,0,0) in the lower-left corner of the screen, and (1,1,0) is just outside the upper-right corner of the screen. The selspace parameter has no effect in this mode. The transformation is similar to the one in mib_lookup_background.

-11

Selects the texture coordinate in the state, where it is typically put by a material shader when evaluating a parameter of type texture, for use by a texture shader.

Space transformations allow transforming the vector that the projection is based on into object, world, or camera coordinates. The selspace parameter may have the following values:

0

Does not apply a transformation, using internal space.

1

Converts the vector into object space.

2

Converts the vector into world space

3

Converts the vector into camera space.

4

Returns the current screen space coordinates in the interval [0,0 ... 1,1).

An additional projection can be applied to the resulting vector by setting the project parameter:

0

Disables projections.

1

Selects an UV projection if available.

2

Selects an orthographic XY projection.

3

Selects an orthographic XZ projection.

4

Selects an orthographic YZ projection.

5

Selects a spherical projection.

6

Selects a cylindrical projection. U=0 is at +X, and V=0 is at +Y. Y is also the cylinder axis.

7

Selects the lollipop projection, which puts the center of the texture (after texture vector normalization) at X=0.5 Z=1, and the corners at the parameter corners. On a sphere, the texture center is at the north pole and the texture corners are at the south pole, like a lollipop wrapper.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License