PDA

View Full Version : What can you do with Sample Info?


tjnyc
07-11-2003, 05:00 PM
Hey,

Sample Info is a great little node, but I'm curious what other things has been or can be done with it besides the ones listed below, especially what can be done with the other options other than facing ratio and if it can be used for more than shaders.

- dirt/velvet/peach fuzz material
- back highlights
- toon lines


regrads,

zzzrByte
07-16-2003, 12:47 AM
Great question!
And no, I don't have an answer... I'm just replying to pop this thread to the top of this forum...
I'd love to hear a few answers to this one.

NeonGuy
07-16-2003, 08:00 AM
hi.

you can do 2 sided shaders with the sampler info and a condition node.

all you have to do is to connect the sampler info's flipped normal attribute to the condition node's first term attribute, then set the second term to 0.5, the operation to greater than or less than.
after this you may create the two sides as you create normal one sided shaders. you have to connect theese to the conditions color if true or color if false attribute.

loked
07-16-2003, 08:35 AM
Great question, I'd definitely like to hear what some of the real shading pro's can do with it.

later:wavey:
loked

overmind
11-20-2003, 01:11 AM
I personaly love them, am working at the moment with a project where i need to use these in depth with the point camera, to control other values.

from maya 4.5 help docs.

Sampler Info Attributes:

Point World

Provides the position currently being sampled relative to the X-,Y-, and Z-axis of the world.

Point Obj

Provides the position currently being sampled relative to the X-,Y-, and Z-axis of the object.

Point Camera

Provides the point of the object being shaded. This point is located in XYZ camera space. You can connect this surface point in materials for the object being shaded to show some interesting effects based on the camera view.

Normal Camera

Provides the orientation of a face relative to the camera.

Uv Coord

Provides the UV coordinates of a point to be shaded. The convention is that UV coordinates are measured from 0 0 to 1 1.

Ray Direction

Indicates the direction in which the current point is seen from the camera. Use this attribute in materials for objects to provide the direction towards the camera for every pixel in the object.

Tangent UCamera, Tangent VCamera

Sets the surface tangents in camera space (as opposed to world space or object space). For polygons, the tangents are generally not defined. NURBS have a well-defined tangent space (as visible in Maya; create a NURBS object, display its CVs and notice the NURBS object has a U direction and a V direction).

Mathematically, tangents provide an instantaneous direction perpendicular to their point of origin on a surface. Their magnitude is affected by the rate of change (curvature) of the surface. Any good math book should have a diagram showing the tangent to a curve, which can then be extrapolated to give you an idea of what tangents on a surface look like. Tangent U and Tangent V Camera attributes are for advanced users only.

Pixel Center

Provides Pixel Center X and Pixel Center Y. The result depends on the image, not on the geometry.

Facing Ratio

Produces a value that varies between 0 and 1 depending on the angle between the surface normal and view direction.

Flipped Normal

Turn on or off depending on whether the object is textured differently on either side. The flipped normal attribute indicates if the surface normal is flipped which also tells you which side of the surface Maya is shading.

CGTalk Moderation
01-15-2006, 03:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.