The node TextureCoordGen is used for creating reflection and chromic effects,
by generating texture coordinates according to the mode specified.
The modes available (underlined ones are directly exportable from 3dsmax):
- SPHERE: creates texture coodinates for a spheric environment or "chrome" mapping based on the vertex normals transformed to camera space.
- CAMERASPACENORMAL / NORMAL: uses the vertex normal, transformed to camera space, as input texture coordinates, resulting coordinates are in -1..1 range. This mode is hardware accelerated in most Direct X Cards, for OpenGL BS Contact 6 is required. This mode is applicable for Cube Map Environment Texture.
- CAMERASPACEREFLECTIONVECTOR / REFLECTION: uses the reflection vector, transformed to camera space, as input texture coordinates. The reflection vector is computed from the input vertex position and normal vector in camera space. This mode is applicable for Cube Map Environment Texture.
- CAMERASPACEPOSITION: uses the vertex position, transformed to camera space, as input texture coordinates.
- NOISE: computed by applying Perlin solid noise function on vertex coordinates, parameter contatins scale & translation [scale.x scale.y scale.z translation.x translation.y translation.z]
- NOISE-EYE: same as above but tranform vertex coordinates to camera space first
- SPHERE-LOCAL: like SPHERE but computed in local coordinates
- COORD-LOCAL / OBJECTSPACEPOSITION: uses the vertex coordinates
- COORD-EYE / CAMERASPACEPOSITION: uses vertex coordinates transformed to the camera space
- SPHERE-REFLECT: similar to "CAMERASPACEREFLECTIONVECTOR" with optional index of refraction, parameter contains index of refraction. Resulting coordinates are in -1..1 range.
- SPHERE-REFLECT-LOCAL: similar to "SPHERE-REFLECT", parameter contains index of refraction, parameter[1..3] the eye point in local coordinates. By animating parameter [1..3] the reflection changes with respect to the point.
- BOX-LOCAL: box mapping on local coordinates
- CYLINDER-LOCAL: cylinder mapping on local coordinates
- GLSPHERE: OpenGL's GL_SPHERE_MAP mode (available only on OpenGL/DX9)
- CAMERASPACEPOSITION3: like CAMERASPACEPOSITION3 but generates 3D texture coordinates (available only on OpenGL)
- CAMERASPACEPOSITION4: Cameraspace 4D coordinate (available only on OpenGL)
- OBJECTSPACEPOSITION3: Vertex Position 3D
- WORLDSPACEPOSITION3: World Position 3D
- OBJECTPLANE: Like OBJECTSPACEPOSITION but with custom mapping planes, parameters contains up to 4 plane equatation for s,t,r,q texture coordinate generation (available only on OpenGL)
- EYEPLANE: Like CAMERASPACEPOSITION but with custom mapping planes, parameters contains up to 4 plane equatation for s,t,r,q texture coordinate generation (available only on OpenGL)
- OFF: Disable texture coordinate generation (available only on OpenGL)
As-is, it can already give excellent results, but use it with MultiTexture
and/or Drawgroup nodes and you can get even greater effects. Also, by using
a CompositeTexture3D node that would contain the rest of the scene and use it
as the texture, you could create an object reflecting it the scene, including
the animations that occur in it in realtime (unlike using a screenshot as
You can try your own textures by drag & dropping them on the texture's square
in the 3D scene. You may be surprised how even an ordinary image can give interesting
results. Models in average resolution usually give nice results (for example those
created using 3dsmax's HSDS modifier).